(svn r25761) -Change: Disable story/goal buttons when there is no content to show instead of when there is zero companies

This commit is contained in:
zuu
2013-09-13 12:45:25 +00:00
parent 6516afae50
commit 4e74a4c5cc
5 changed files with 41 additions and 14 deletions

View File

@@ -34,6 +34,8 @@
#include "vehicle_func.h"
#include "smallmap_gui.h"
#include "game/game.hpp"
#include "goal_base.h"
#include "story_base.h"
#include "table/strings.h"
@@ -934,6 +936,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
AI::BroadcastNewEvent(new ScriptEventCompanyBankrupt(c_index));
Game::NewEvent(new ScriptEventCompanyBankrupt(c_index));
CompanyAdminRemove(c_index, (CompanyRemoveReason)reason);
if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
break;
}