Index: src/ai/ai_gui.cpp
===================================================================
--- src/ai/ai_gui.cpp (revision 27549)
+++ src/ai/ai_gui.cpp (working copy)
@@ -685,7 +685,7 @@
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_JUST_STRING, STR_AI_DEBUG_SETTINGS_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
@@ -751,6 +751,21 @@
break;
}
break;
+ case WID_AIC_CONFIGURE:
+ switch (selected_slot) {
+ case OWNER_DEITY:
+ SetDParam(0, (_game_mode == GM_NORMAL && IsEditable(selected_slot)) ? STR_AI_DEBUG_SETTINGS : STR_AI_CONFIG_CONFIGURE);
+ break;
+
+ case INVALID_COMPANY:
+ SetDParam(0, STR_AI_CONFIG_CONFIGURE);
+ break;
+
+ default:
+ 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);
+ break;
+ }
+ break;
}
}