From 11ae61c013d663304086ecfd5d845040ebf2f144 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Jun 2018 16:57:13 +0300 Subject: [PATCH] Enable and disable display of oases +Now during the installation (or after installation in the admin panel) you can enable or disable oasis display for villages in the player profile. NOTE: To play this version of the game, you need to reinstall the server OR you can simply add these lines of code into your file: GameEngine/config.php ///////////////////////////////////////////////// // **** NEW MECHANICS AND FUNCTIONS **** // ///////////////////////////////////////////////// define("NEW_FUNCTIONS_OASIS", True); GameEngine/Admin/Modsconstant_format.tpl ///////////////////////////////////////////////// // **** NEW MECHANICS AND FUNCTIONS **** // ///////////////////////////////////////////////// define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%); NOTICE 2: pay special attention to the fact that these are two different records !!! If the records are entered incorrectly, you will receive a non-working code! --- Admin/Templates/config.tpl | 17 +++ Admin/Templates/editNewFunctions.tpl | 44 +++++++ GameEngine/Admin/Mods/editAdminInfo.php | 2 + GameEngine/Admin/Mods/editExtraSet.php | 2 + GameEngine/Admin/Mods/editLogSet.php | 2 + GameEngine/Admin/Mods/editNewFunctions.php | 133 ++++++++++++++++++++ GameEngine/Admin/Mods/editNewsboxSet.php | 2 + GameEngine/Admin/Mods/editPlusSet.php | 2 + GameEngine/Admin/Mods/editServerSet.php | 2 + Templates/Profile/overview.tpl | 139 ++++++++++++--------- install/data/constant_format.tpl | 5 +- install/process.php | 3 + install/templates/config.tpl | 13 ++ 13 files changed, 306 insertions(+), 60 deletions(-) create mode 100644 Admin/Templates/editNewFunctions.tpl create mode 100644 GameEngine/Admin/Mods/editNewFunctions.php diff --git a/Admin/Templates/config.tpl b/Admin/Templates/config.tpl index eb56cd0d..ddaa86a6 100644 --- a/Admin/Templates/config.tpl +++ b/Admin/Templates/config.tpl @@ -179,7 +179,24 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); + + + + + + +
New Mechanics and Functions
+ + + + + + + + + +
Display oasis in profile ?Turns on or off the display of oases of each village in the player profileEnabled" : "Disabled"; ?>
diff --git a/Admin/Templates/editNewFunctions.tpl b/Admin/Templates/editNewFunctions.tpl new file mode 100644 index 00000000..a9ac52c4 --- /dev/null +++ b/Admin/Templates/editNewFunctions.tpl @@ -0,0 +1,44 @@ + +

+ + +
+
+ + + + + + + + + + + +
Edit New Mechanics and Functions
Display oasis in profile ?Turns on or off the display of oases of each village in the player profile + +
+
+ + + + +
<<
+ diff --git a/GameEngine/Admin/Mods/editAdminInfo.php b/GameEngine/Admin/Mods/editAdminInfo.php index 54314f7b..9b8f35db 100755 --- a/GameEngine/Admin/Mods/editAdminInfo.php +++ b/GameEngine/Admin/Mods/editAdminInfo.php @@ -48,6 +48,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $NEWSBOX2=(NEWSBOX2==false)? "false":"true"; $NEWSBOX3=(NEWSBOX3==false)? "false":"true"; $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); @@ -123,6 +124,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editExtraSet.php b/GameEngine/Admin/Mods/editExtraSet.php index ab14969a..d88046ba 100755 --- a/GameEngine/Admin/Mods/editExtraSet.php +++ b/GameEngine/Admin/Mods/editExtraSet.php @@ -47,6 +47,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text); @@ -120,6 +121,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editLogSet.php b/GameEngine/Admin/Mods/editLogSet.php index 053a5b7f..4341312d 100755 --- a/GameEngine/Admin/Mods/editLogSet.php +++ b/GameEngine/Admin/Mods/editLogSet.php @@ -43,6 +43,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); @@ -120,6 +121,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editNewFunctions.php b/GameEngine/Admin/Mods/editNewFunctions.php new file mode 100644 index 00000000..f991d216 --- /dev/null +++ b/GameEngine/Admin/Mods/editNewFunctions.php @@ -0,0 +1,133 @@ +' . + 'Please download constant_format.tpl file and copy it into the GameEngine/Admin/Mods ' . + 'directory - otherwise saving configuration won\'t work.

' . + 'The constant_format.tpl file can be downloaded at ' . + 'https://raw.githubusercontent.com/Shadowss/TravianZ/master/install/data/constant_format.tpl'); +} + +$myFile = "../../config.php"; +$fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\config.php"); + + $text = file_get_contents("constant_format.tpl"); + + $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); + $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); + $REG_OPEN = (REG_OPEN == false ? 'false' : 'true'); + $QUEST = (QUEST == false ? 'false' : 'true'); + + // SERVER SETTINGS - we need to keep these intact + $text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text); + $text = preg_replace("'%ERROR%'", ERROR_REPORT, $text); + $text = preg_replace("'%SERVERNAME%'", SERVER_NAME, $text); + $text = preg_replace("'%STIMEZONE%'", TIMEZONE, $text); + $text = preg_replace("'%STARTTIME%'", COMMENCE, $text); + $text = preg_replace("'%SSTARTDATE%'", START_DATE, $text); + $text = preg_replace("'%SSTARTTIME%'", START_TIME, $text); + $text = preg_replace("'%LANG%'", LANG, $text); + $text = preg_replace("'%SPEED%'", SPEED, $text); + $text = preg_replace("'%MAX%'", WORLD_MAX, $text); + $text = preg_replace("'%GP%'", GP_ENABLE, $text); + $text = preg_replace("'%GP_LOCATE%'", GP_LOCATE, $text); + $text = preg_replace("'%INCSPEED%'", INCREASE_SPEED, $text); + $text = preg_replace("'%EVASIONSPEED%'", EVASION_SPEED, $text); + $text = preg_replace("'%TRADERCAP%'", TRADER_CAPACITY, $text); + $text = preg_replace("'%CRANNYCAP%'", CRANNY_CAPACITY, $text); + $text = preg_replace("'%TRAPPERCAP%'", TRAPPER_CAPACITY, $text); + $text = preg_replace("'%VILLAGE_EXPAND%'", CP, $text); + $text = preg_replace("'%DEMOLISH%'", DEMOLISH_LEVEL_REQ, $text); + $text = preg_replace("'%STORAGE_MULTIPLIER%'", STORAGE_MULTIPLIER, $text); + $text = preg_replace("'%QUEST%'", $QUEST, $text); + $text = preg_replace("'%QTYPE%'", QTYPE, $text); + $text = preg_replace("'%BEGINNER%'", PROTECTION, $text); + $text = preg_replace("'%WW%'", (WW ? 'true' : 'false'), $text); + $text = preg_replace("'%SHOW_NATARS%'", (SHOW_NATARS ? 'true' : 'false'), $text); + $text = preg_replace("'%NATARS_UNITS%'", NATARS_UNITS, $text); + $text = preg_replace("'%NATARS_SPAWN_TIME%'", NATARS_SPAWN_TIME, $text); + $text = preg_replace("'%NATARS_WW_SPAWN_TIME%'", NATARS_WW_SPAWN_TIME, $text); + $text = preg_replace("'%NATARS_WW_BUILDING_PLAN_SPAWN_TIME%'", NATARS_WW_BUILDING_PLAN_SPAWN_TIME, $text); + $text = preg_replace("'%NATURE_REGTIME%'", NATURE_REGTIME, $text); + $text = preg_replace("'%OASIS_WOOD_MULTIPLIER%'", OASIS_WOOD_MULTIPLIER, $text); + $text = preg_replace("'%OASIS_CLAY_MULTIPLIER%'", OASIS_CLAY_MULTIPLIER, $text); + $text = preg_replace("'%OASIS_IRON_MULTIPLIER%'", OASIS_IRON_MULTIPLIER, $text); + $text = preg_replace("'%OASIS_CROP_MULTIPLIER%'", OASIS_CROP_MULTIPLIER, $text); + $text = preg_replace("'%T4_COMING%'", (T4_COMING ? 'true' : 'false'), $text); + $text = preg_replace("'%ACTIVATE%'", (AUTH_EMAIL ? 'true' : 'false'), $text); + $text = preg_replace("'%MEDALINTERVAL%'", MEDALINTERVAL, $text); + $text = preg_replace("'%GREAT_WKS%'", (GREAT_WKS ? 'true' : 'false'), $text); + $text = preg_replace("'%TS_THRESHOLD%'", TS_THRESHOLD, $text); + $text = preg_replace("'%REG_OPEN%'", $REG_OPEN, $text); + $text = preg_replace("'%PEACE%'", PEACE, $text); + $text = preg_replace("'%LOGBUILD%'", (LOG_BUILD ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGTECH%'", (LOG_TECH ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGLOGIN%'", (LOG_LOGIN ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGGOLDFIN%'", (LOG_GOLD_FIN ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGADMIN%'", (LOG_ADMIN ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGWAR%'", (LOG_WAR ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGMARKET%'", (LOG_MARKET ? 'true' : 'false'), $text); + $text = preg_replace("'%LOGILLEGAL%'", (LOG_ILLEGAL ? 'true' : 'false'), $text); + $text = preg_replace("'%BOX1%'", (NEWSBOX1 ? 'true' : 'false'), $text); + $text = preg_replace("'%BOX2%'", (NEWSBOX2 ? 'true' : 'false'), $text); + $text = preg_replace("'%BOX3%'", (NEWSBOX3 ? 'true' : 'false'), $text); + $text = preg_replace("'%SSERVER%'", SQL_SERVER, $text); + $text = str_replace("%SPORT%", SQL_PORT, $text); + $text = preg_replace("'%SUSER%'", SQL_USER, $text); + $text = preg_replace("'%SPASS%'", SQL_PASS, $text); + $text = preg_replace("'%SDB%'", SQL_DB, $text); + $text = preg_replace("'%PREFIX%'", TB_PREFIX, $text); + $text = preg_replace("'%CONNECTT%'", DB_TYPE, $text); + $text = preg_replace("'%LIMIT_MAILBOX%'", (LIMIT_MAILBOX ? 'true' : 'false'), $text); + $text = preg_replace("'%MAX_MAILS%'", MAX_MAIL, $text); + $text = preg_replace("'%ARANK%'", (INCLUDE_ADMIN ? 'true' : 'false'), $text); + $text = preg_replace("'%AEMAIL%'", ADMIN_EMAIL, $text); + $text = preg_replace("'%ANAME%'", ADMIN_NAME, $text); + $text = preg_replace("'%ASUPPMSGS%'", $SUPPORT_MSGS_IN_ADMIN, $text); + $text = preg_replace("'%ARAIDS%'", $ADMINS_RAIDABLE, $text); + $text = preg_replace("'%UTRACK%'", "TRACK_USR", $text); // not in use, text only in a comment + $text = preg_replace("'%UTOUT%'", "USER_TIMEOUT", $text); // not in use, text only in a comment + $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); + $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); + $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $_POST['new_functions_oasis'], $text); + + // PLUS settings need to be kept intact + $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); + $text = preg_replace("'%PLUS_PRODUCTION%'", PLUS_PRODUCTION, $text); + $text = preg_replace("'%PAYPAL_EMAIL%'", (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'), $text); + $text = preg_replace("'%PAYPAL_CURRENCY%'", (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'), $text); + $text = preg_replace("'%PLUS_PACKAGE_A_PRICE%'", (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99'), $text); + $text = preg_replace("'%PLUS_PACKAGE_A_GOLD%'", (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : '60'), $text); + $text = preg_replace("'%PLUS_PACKAGE_B_PRICE%'", (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99'), $text); + $text = preg_replace("'%PLUS_PACKAGE_B_GOLD%'", (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : '120'), $text); + $text = preg_replace("'%PLUS_PACKAGE_C_PRICE%'", (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99'), $text); + $text = preg_replace("'%PLUS_PACKAGE_C_GOLD%'", (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : '360'), $text); + $text = preg_replace("'%PLUS_PACKAGE_D_PRICE%'", (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99'), $text); + $text = preg_replace("'%PLUS_PACKAGE_D_GOLD%'", (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : '1000'), $text); + $text = preg_replace("'%PLUS_PACKAGE_E_PRICE%'", (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99'), $text); + $text = preg_replace("'%PLUS_PACKAGE_E_GOLD%'", (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : '2000'), $text); + + fwrite($fh, $text); + fclose($fh); + +$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$id.",'Changed New Mechanics and Functions Settings',".time().")"); + +header("Location: ../../../Admin/admin.php?p=config"); + +?> diff --git a/GameEngine/Admin/Mods/editNewsboxSet.php b/GameEngine/Admin/Mods/editNewsboxSet.php index 988cd665..2b4c3a38 100755 --- a/GameEngine/Admin/Mods/editNewsboxSet.php +++ b/GameEngine/Admin/Mods/editNewsboxSet.php @@ -50,6 +50,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); @@ -127,6 +128,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editPlusSet.php b/GameEngine/Admin/Mods/editPlusSet.php index 2f61014f..e71620a6 100644 --- a/GameEngine/Admin/Mods/editPlusSet.php +++ b/GameEngine/Admin/Mods/editPlusSet.php @@ -31,6 +31,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); // SERVER SETTINGS - we need to keep these intact $text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text); @@ -104,6 +105,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); // PLUS SETTINGS $text = preg_replace("'%PLUS_TIME%'", $_POST['plus_time'], $text); diff --git a/GameEngine/Admin/Mods/editServerSet.php b/GameEngine/Admin/Mods/editServerSet.php index 5554c2c0..c7b169bc 100755 --- a/GameEngine/Admin/Mods/editServerSet.php +++ b/GameEngine/Admin/Mods/editServerSet.php @@ -42,6 +42,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $_POST['error'], $text); @@ -115,6 +116,7 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/Templates/Profile/overview.tpl b/Templates/Profile/overview.tpl index 7e5deca9..a3317df5 100644 --- a/Templates/Profile/overview.tpl +++ b/Templates/Profile/overview.tpl @@ -152,64 +152,85 @@ if($displayarray['vac_mode'] == 1) echo "getMapCheck($vil['wref'])."\">".$vil['name'].""; - if($vil['capital'] == 1) echo " (capital)"; - echo ""; - - // OASIS PART - must to be activated from install part - - $oases = $database->getOasis($vil['wref']); - foreach ($oases as $oasis){ - switch ($oasis['type']) { - case 1: - case 2: - echo " "; - break; - case 3: - echo " "; - break; - case 4: - case 5: - echo " "; - break; - case 6: - echo " "; - break; - case 7: - case 8: - echo " "; - break; - case 9: - echo " "; - break; - case 10: - case 11: - echo " "; - break; - case 12: - echo " "; - break; - } + + + + + Villages + + + Name + Inhabitants + Coordinates + + + "; + foreach($varray as $vil) { + $coor = $database->getCoor($vil['wref']); + echo "getMapCheck($vil['wref'])."\">".$vil['name'].""; + if($vil['capital'] == 1) echo " (capital)"; + echo "".$vil['pop'].""; + echo "
(".$coor['x']."
|
".$coor['y'].")
"; } - - echo ""; - echo "".$vil['pop'].""; - echo "
(".$coor['x']."
|
".$coor['y'].")
"; + echo ""; + } else { + echo " + + + + + + + + + + + + "; + foreach($varray as $vil) { + $coor = $database->getCoor($vil['wref']); + echo ""; + echo ""; + } + echo "
Villages
NameOasisInhabitantsCoordinates
getMapCheck($vil['wref'])."\">".$vil['name'].""; + if($vil['capital'] == 1) echo " (capital)"; + echo ""; + $oases = $database->getOasis($vil['wref']); + foreach ($oases as $oasis) { + switch ($oasis['type']) { + case 1: + case 2: + echo " "; + break; + case 3: + echo " "; + break; + case 4: + case 5: + echo " "; + break; + case 6: + echo " "; + break; + case 7: + case 8: + echo " "; + break; + case 9: + echo " "; + break; + case 10: + case 11: + echo " "; + break; + case 12: + echo " "; + break; + } + } + echo "".$vil['pop'].""; + echo "
(".$coor['x']."
|
".$coor['y'].")
"; } - ?> - +?> diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl index ab8fe301..51c40db8 100644 --- a/install/data/constant_format.tpl +++ b/install/data/constant_format.tpl @@ -296,7 +296,10 @@ define("ADMIN_RECEIVE_SUPPORT_MESSAGES", %ASUPPMSGS%); // ***** Allow Admin accounts to be raided and attacked define("ADMIN_ALLOW_INCOMING_RAIDS", %ARAIDS%); - +///////////////////////////////////////////////// +// **** NEW MECHANICS AND FUNCTIONS **** // +///////////////////////////////////////////////// +define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%); ////////////////////////////////////////// // **** DO NOT EDIT SETTINGS **** // diff --git a/install/process.php b/install/process.php index dd8cf793..48a2c946 100644 --- a/install/process.php +++ b/install/process.php @@ -141,6 +141,9 @@ class Process { $findReplace["%T4_COMING%"] = $_POST['t4_coming']; $findReplace["%REG_OPEN%"] = $_POST['reg_open']; $findReplace["%PEACE%"] = $_POST['peace']; + + //New Mechanics and Functions + $findReplace["%NEW_FUNCTIONS_OASIS%"] = $_POST['new_functions_oasis']; fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text)); diff --git a/install/templates/config.tpl b/install/templates/config.tpl index c3720c41..0829cf28 100644 --- a/install/templates/config.tpl +++ b/install/templates/config.tpl @@ -268,7 +268,20 @@ echo "
Error creating constant.php + +

+

+ NEW MECHANICS AND FUNCTIONS RELATED + + + +
Display oasis in profile: + +