Old revision #px30pn7fd | New revision #po4ime8wf | ||
---|---|---|---|
11 | NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL), | 11 | NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL), |
12 | EndContainer(), | 12 | EndContainer(), |
13 | NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7), | 13 | NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7), |
14 | @@ -751,6 +751,2 | 14 | @@ -751,6 +751,29 @@ |
15 | break; | 15 | break; |
16 | } | 16 | } |
17 | break; | 17 | break; |
18 | + case WID_AIC_CONFIGURE: | 18 | + case WID_AIC_CONFIGURE: |
19 | + switch (selected_slot) { | 19 | + switch (selected_slot) { |
20 | + case OWNER_DEITY: | 20 | + case OWNER_DEITY: |
21 | + SetDParam(0, (_game_mode == GM_NORMAL && IsEditable(selected_slot)) ? STR_AI_DEBUG_SETTINGS : STR_AI_CONFIG_CONFIGURE); | 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 | + } | ||
22 | + break; | 26 | + break; |
23 | + | 27 | + |
24 | + case INVALID_COMPANY: | 28 | + case INVALID_COMPANY: | … | … |
26 | + break; | 30 | + break; |
27 | + | 31 | + |
28 | + default: | 32 | + default: |
29 | + 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); | 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 | + } | ||
30 | + break; | 38 | + break; |
31 | + } | 39 | + } |
32 | + break; | 40 | + break; |