summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-05 19:36:41 +0000
committerfrosch <frosch@openttd.org>2012-12-05 19:36:41 +0000
commitd1ab0f03bcfc01be933d70edda9b95fb0ffeb8b4 (patch)
treee0ea4cdde0c4d20de3c397ba2453ee6b2e312246 /src/table
parent812ae4140a8566c2b4b43c6aa5bab5eecf82f18a (diff)
downloadopenttd-d1ab0f03bcfc01be933d70edda9b95fb0ffeb8b4.tar.xz
(svn r24790) -Remove: Classic difficulty profiles.
Diffstat (limited to 'src/table')
-rw-r--r--src/table/gameopt_settings.ini9
-rw-r--r--src/table/settings.ini26
2 files changed, 12 insertions, 23 deletions
diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini
index 10373c965..968191f12 100644
--- a/src/table/gameopt_settings.ini
+++ b/src/table/gameopt_settings.ini
@@ -9,6 +9,7 @@
[pre-amble]
static const uint GAME_DIFFICULTY_NUM = 18;
static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
+uint8 _old_diff_level; ///< Old difficulty level from old savegames
/* Most of these strings are used both for gameopt-backward compatability
* and the settings tables. The rest is here for consistency. */
@@ -39,6 +40,7 @@ static const SettingDesc _gameopt_settings[] = {
};
[templates]
SDTG_GENERAL = SDTG_GENERAL($name, $sdt_cmd, $sle_cmd, $type, $flags, $guiflags, $var, $length, $def, $min, $max, $interval, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
+SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDT_NULL = SDT_NULL($length, $from, $to),
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat),
@@ -89,10 +91,11 @@ full = NULL
from = 4
##
-[SDT_VAR]
-base = GameSettings
-var = difficulty.diff_level
+[SDTG_VAR]
+name = ""diff_level""
+var = _old_diff_level
type = SLE_UINT8
+flags = SLF_NOT_IN_CONFIG
def = SP_CUSTOM
min = SP_EASY
max = SP_CUSTOM
diff --git a/src/table/settings.ini b/src/table/settings.ini
index fa1ab0754..243d59db7 100644
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -25,8 +25,6 @@ static bool TrainSlopeSteepnessChanged(int32 p1);
static bool RoadVehSlopeSteepnessChanged(int32 p1);
static bool DragSignalsDensityChanged(int32);
static bool TownFoundingChanged(int32 p1);
-static bool DifficultyReset(int32 level);
-static bool DifficultyChange(int32);
static bool DifficultyNoiseChange(int32 i);
static bool MaxNoAIsChange(int32 i);
static bool CheckRoadSide(int p1);
@@ -75,6 +73,7 @@ SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def,
SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDT_NULL = SDT_NULL($length, $from, $to),
+SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
SDT_END = SDT_END()
[defaults]
@@ -122,7 +121,6 @@ min = 0
max = 4
interval = 1
strval = STR_NUM_VERY_LOW
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -136,7 +134,6 @@ min = 0
max = ID_END - 1
interval = 1
strval = STR_FUNDING_ONLY
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -149,7 +146,6 @@ def = 300000
min = 100000
max = 500000
interval = 50000
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -162,7 +158,6 @@ def = 2
min = 2
max = 4
interval = 1
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -176,7 +171,6 @@ min = 0
max = 2
interval = 1
strval = STR_SEA_LEVEL_LOW
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -189,7 +183,6 @@ min = 0
max = 4
interval = 1
strval = STR_AI_SPEED_VERY_SLOW
-proc = DifficultyChange
cat = SC_BASIC
[SDT_NULL]
@@ -207,7 +200,6 @@ min = 0
max = 2
interval = 1
strval = STR_DISASTER_NONE
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -220,7 +212,6 @@ min = 0
max = 3
interval = 1
strval = STR_SUBSIDY_X1_5
-proc = DifficultyChange
[SDT_VAR]
base = GameSettings
@@ -233,7 +224,6 @@ min = 0
max = 2
interval = 1
strval = STR_SEA_LEVEL_LOW
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -247,7 +237,6 @@ min = 0
max = 3
interval = 1
strval = STR_TERRAIN_TYPE_VERY_FLAT
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -261,7 +250,6 @@ min = 0
max = 4
interval = 1
strval = STR_SEA_LEVEL_VERY_LOW
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -274,7 +262,6 @@ min = 0
max = 1
interval = 1
strval = STR_ECONOMY_STEADY
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -287,7 +274,6 @@ min = 0
max = 1
interval = 1
strval = STR_REVERSE_AT_END_OF_LINE_AND_AT_STATIONS
-proc = DifficultyChange
[SDT_VAR]
base = GameSettings
@@ -299,7 +285,6 @@ min = 0
max = 1
interval = 1
strval = STR_CONFIG_SETTING_OFF
-proc = DifficultyChange
cat = SC_BASIC
[SDT_VAR]
@@ -314,15 +299,16 @@ interval = 1
strval = STR_CITY_APPROVAL_PERMISSIVE
proc = DifficultyNoiseChange
-[SDT_VAR]
-base = GameSettings
-var = difficulty.diff_level
+[SDTG_VAR]
+name = ""diff_level""
+var = _old_diff_level
type = SLE_UINT8
+flags = SLF_NOT_IN_CONFIG
from = 97
+to = 177
def = 3
min = 0
max = 3
-proc = DifficultyReset
cat = SC_BASIC
; There are only 21 predefined town_name values (0-20), but you can have more with newgrf action F so allow