Old revision #phjlypvuw | New revision #po4ime8wf | ||
---|---|---|---|
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,20 @@ | 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,29 @@ | ||
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 | + | 21 | + if (_game_mode == GM_NORMAL && IsEditable(selected_slot)) { |
22 | + SetDParam(0, STR_AI_DEBUG_SETTINGS); | ||
23 | + } else { | ||
24 | + SetDParam(0, STR_AI_CONFIG_CONFIGURE); | ||
25 | + } | ||
13 | + break; | 26 | + break; |
14 | + | 27 | + |
15 | + case INVALID_COMPANY: | 28 | + case INVALID_COMPANY: |
16 | + | 16 | + SetDParam(0, STR_AI_CONFIG_CONFIGURE); |
17 | + break; | 30 | + break; |
18 | + | 31 | + |
19 | + default: | 32 | + default: |
20 | + | 33 | + if (_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()))) { |
34 | + SetDParam(0, STR_AI_CONFIG_CONFIGURE); | ||
35 | + } else { | ||
36 | + SetDParam(0, STR_AI_DEBUG_SETTINGS); | ||
37 | + } | ||
21 | + break; | 38 | + break; |
22 | + } | 39 | + } |
40 | + break; | ||
23 | } | 41 | } |
24 | } | 42 | } |