summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-08-11 21:48:27 +0000
committertruelight <truelight@openttd.org>2004-08-11 21:48:27 +0000
commit6679afc48a1bec985b6687dee105730b89682224 (patch)
tree04d7c5ab82129e04bf774c3c74652144180fc63c
parent0806a1ef751ddc7da59b3fc0ba33a1e74b69b659 (diff)
downloadopenttd-6679afc48a1bec985b6687dee105730b89682224.tar.xz
(svn r22) Add: Competitors menu under patches
Fix: I forgot to delete a local var from ai.c
-rw-r--r--ai.c2
-rw-r--r--lang/english.txt1
-rw-r--r--settings_gui.c16
3 files changed, 11 insertions, 8 deletions
diff --git a/ai.c b/ai.c
index 1ab2b6f40..70679deca 100644
--- a/ai.c
+++ b/ai.c
@@ -1490,8 +1490,6 @@ static void AiStateWantNewRoute(Player *p)
i = 200;
for(;;) {
- byte dis;
-
r = (uint16)Random();
if (r < 0x7626) {
diff --git a/lang/english.txt b/lang/english.txt
index 33f24c355..88868e17d 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -987,6 +987,7 @@ STR_CONFIG_PATCHES_CONSTRUCTION :{BLACK}Construction
STR_CONFIG_PATCHES_VEHICLES :{BLACK}Vehicles
STR_CONFIG_PATCHES_STATIONS :{BLACK}Stations
STR_CONFIG_PATCHES_ECONOMY :{BLACK}Economy
+STR_CONFIG_PATCHES_AI :{BLACK}Competitors
STR_CONFIG_PATCHES_DISABLED :disabled
STR_CONFIG_PATCHES_INT32 :{INT32}
diff --git a/settings_gui.c b/settings_gui.c
index 9a654a654..646b137d8 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -717,11 +717,6 @@ static const PatchEntry _patches_vehicles[] = {
{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_ROADVEH, &_patches.servint_roadveh, 30, 1200, 10},
{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_AIRCRAFT, &_patches.servint_aircraft, 30, 1200, 10},
{PE_UINT16, PF_0ISDIS, STR_CONFIG_PATCHES_SERVINT_SHIPS, &_patches.servint_ships, 30, 1200, 10},
-
- {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_TRAINS, &_patches.ai_disable_veh_train},
- {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH, &_patches.ai_disable_veh_roadveh},
- {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT, &_patches.ai_disable_veh_aircraft},
- {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_SHIPS, &_patches.ai_disable_veh_ship},
};
static const PatchEntry _patches_stations[] = {
@@ -748,6 +743,13 @@ static const PatchEntry _patches_economy[] = {
{PE_BOOL, 0, STR_CONFIG_PATCHES_SMOOTH_ECONOMY, &_patches.smooth_economy},
};
+static const PatchEntry _patches_ai[] = {
+ {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_TRAINS, &_patches.ai_disable_veh_train},
+ {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_ROADVEH, &_patches.ai_disable_veh_roadveh},
+ {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_AIRCRAFT, &_patches.ai_disable_veh_aircraft},
+ {PE_BOOL, 0, STR_CONFIG_PATCHES_AI_BUILDS_SHIPS, &_patches.ai_disable_veh_ship},
+};
+
typedef struct PatchPage {
const PatchEntry *entries;
uint num;
@@ -759,6 +761,7 @@ static const PatchPage _patches_page[] = {
{_patches_vehicles, lengthof(_patches_vehicles) },
{_patches_stations, lengthof(_patches_stations) },
{_patches_economy, lengthof(_patches_economy) },
+ {_patches_ai, lengthof(_patches_ai) },
};
static int32 ReadPE(const PatchEntry*pe)
@@ -939,7 +942,7 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
break;
}
- case 4: case 5: case 6: case 7: case 8:
+ case 4: case 5: case 6: case 7: case 8: case 9:
WP(w,def_d).data_1 = e->click.widget - 4;
DeleteWindowById(WC_QUERY_STRING, 0);
SetWindowDirty(w);
@@ -978,6 +981,7 @@ static const Widget _patches_selection_widgets[] = {
{ WWT_CLOSEBOX, 3, 184, 270, 16, 27, STR_CONFIG_PATCHES_VEHICLES, 0},
{ WWT_CLOSEBOX, 3, 271, 357, 16, 27, STR_CONFIG_PATCHES_STATIONS, 0},
{ WWT_CLOSEBOX, 3, 10, 96, 28, 39, STR_CONFIG_PATCHES_ECONOMY, 0},
+{ WWT_CLOSEBOX, 3, 97, 183, 28, 39, STR_CONFIG_PATCHES_AI, 0},
{ WWT_LAST},
};