Loading

Paste #po4ime8wf

  1. Index: src/ai/ai_gui.cpp
  2. ===================================================================
  3. --- src/ai/ai_gui.cpp   (revision 27549)
  4. +++ src/ai/ai_gui.cpp   (working copy)
  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 @@
  15.                         break;
  16.                 }
  17.                 break;
  18. +           case WID_AIC_CONFIGURE:
  19. +               switch (selected_slot) {
  20. +                   case OWNER_DEITY:
  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. +                       }
  26. +                       break;
  27. +
  28. +                   case INVALID_COMPANY:
  29. +                       SetDParam(0, STR_AI_CONFIG_CONFIGURE);
  30. +                       break;
  31. +
  32. +                   default:
  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. +                       }
  38. +                       break;
  39. +               }
  40. +               break;
  41.         }
  42.     }

Version history

Revision # Author Created at
px30pn7fd Anonymous 24 Apr 2016, 11:08:05 UTC Diff
peogdurqu Anonymous 24 Apr 2016, 10:02:16 UTC Diff
phjlypvuw Anonymous 23 Apr 2016, 17:51:14 UTC Diff
pgd6a1c5y Anonymous 23 Apr 2016, 14:25:12 UTC Diff
pmbdhv4ft Anonymous 22 Apr 2016, 23:09:52 UTC Diff

Comments