Old revision #pmbdhv4ft | New revision #px30pn7fd | ||
---|---|---|---|
1 | Index: src/ai/ai_gui.cpp | 1 | Index: src/ai/ai_gui.cpp |
2 | =================================================================== | 2 | =================================================================== |
3 | --- src/ai/ai_gui.cpp (revision 2754 | 3 | --- src/ai/ai_gui.cpp (revision 27549) |
4 | +++ src/ai/ai_gui.cpp (working copy) | 4 | +++ src/ai/ai_gui.cpp (working copy) |
5 | @@ -751,6 +751,23 @@ | 5 | @@ -685,7 +685,7 @@ |
6 | EndContainer(), | ||
7 | NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7), | ||
8 | NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP), | ||
9 | - NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP), | ||
10 | + NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_JUST_STRING, STR_AI_DEBUG_SETTINGS_TOOLTIP), | ||
11 | NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL), | ||
12 | EndContainer(), | ||
13 | NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7), | ||
14 | @@ -751,6 +751,21 @@ | ||
6 | break; | 15 | break; |
7 | } | 16 | } |
8 | break; | 17 | break; |
9 | + case WID_AIC_CONFIGURE: | 18 | + case WID_AIC_CONFIGURE: |
10 | + switch (selected_slot) { | 19 | + switch (selected_slot) { |
11 | + case OWNER_DEITY: | 20 | + case OWNER_DEITY: |
12 | + SetDParam(0, _game_mode == GM_NORMAL ? IsEditable(this->selected_slot) ? STR_AI_CONFIG_CONFIGURE_SETTINGS : STR_AI_CONFIG_CONFIGURE_CONFIGURE : STR_AI_CONFIG_CONFIGURE_CONFIGURE); | 12 | + SetDParam(0, (_game_mode == GM_NORMAL && IsEditable(selected_slot)) ? STR_AI_DEBUG_SETTINGS : STR_AI_CONFIG_CONFIGURE); |
13 | + SetDParam(1, _game_mode == GM_NORMAL ? IsEditable(this->selected_slot) ? STR_AI_CONFIG_CONFIGURE_SETTINGS_TOOLTIP : STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP : STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP); | ||
14 | + break; | 22 | + break; |
15 | + | 23 | + |
16 | + case INVALID_COMPANY: | 24 | + case INVALID_COMPANY: |
17 | + SetDParam(0, STR_AI_CONFIG_CONFIGURE_CONFIGURE); | 17 | + SetDParam(0, STR_AI_CONFIG_CONFIGURE); |
18 | + SetDParam(1, STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP); | ||
19 | + break; | 26 | + break; |
20 | + | 27 | + |
21 | + default: | 28 | + default: |
22 | + SetDParam(0, (_game_mode == GM_NORMAL && IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()) ? STR_AI_CONFIG_CONFIGURE_SETTINGS : STR_AI_CONFIG_CONFIGURE_CONFIGURE); | 22 | + SetDParam(0, (_game_mode != GM_NORMAL || (_game_mode == GM_NORMAL && IsEditable((CompanyID)selected_slot) && (!Company::IsValidID(selected_slot) || Company::IsValidAiID(selected_slot) && Company::Get(selected_slot)->ai_instance->IsDead()))) ? STR_AI_CONFIG_CONFIGURE : STR_AI_DEBUG_SETTINGS); |
23 | + SetDParam(1, (_game_mode == GM_NORMAL && IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidID(this->selected_slot) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()) ? STR_AI_CONFIG_CONFIGURE_SETTINGS_TOOLTIP : STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP); | 23 | + break; |
24 | + break; | ||
25 | + } | 31 | + } |
32 | + break; | ||
26 | } | 33 | } |
27 | } | 27 | } |
28 | |||
29 | Index: src/lang/english.txt | ||
30 | =================================================================== | ||
31 | --- src/lang/english.txt (revision 27548) | ||
32 | +++ src/lang/english.txt (working copy) | ||
33 | @@ -3999,8 +3999,12 @@ | ||
34 | STR_AI_CONFIG_CHANGE_AI :AI | ||
35 | STR_AI_CONFIG_CHANGE_GAMESCRIPT :Game Script | ||
36 | STR_AI_CONFIG_CHANGE_TOOLTIP :{BLACK}Load another script | ||
37 | -STR_AI_CONFIG_CONFIGURE :{BLACK}Configure | ||
38 | -STR_AI_CONFIG_CONFIGURE_TOOLTIP :{BLACK}Configure the parameters of the Script | ||
39 | +STR_AI_CONFIG_CONFIGURE :{STRING} | ||
40 | +STR_AI_CONFIG_CONFIGURE_TOOLTIP :{STRING} | ||
41 | +STR_AI_CONFIG_CONFIGURE_CONFIGURE :{BLACK}Configure | ||
42 | +STR_AI_CONFIG_CONFIGURE_CONFIGURE_TOOLTIP :{BLACK}Configure the parameters of the Script | ||
43 | +STR_AI_CONFIG_CONFIGURE_SETTINGS :{BLACK}Settings | ||
44 | +STR_AI_CONFIG_CONFIGURE_SETTINGS_TOOLTIP :{BLACK}Change the settings of the script | ||
45 | |||
46 | # Available AIs window | ||
47 | STR_AI_LIST_CAPTION :{WHITE}Available {STRING} |