summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index ca6315438..2126a6cac 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -39,6 +39,7 @@
#include "subsidy_func.h"
#include "core/backup_type.hpp"
#include "object_base.h"
+#include "game/game.hpp"
#include "table/strings.h"
#include "table/industry_land.h"
@@ -482,6 +483,7 @@ static CommandCost ClearTile_Industry(TileIndex tile, DoCommandFlag flags)
if (flags & DC_EXEC) {
AI::BroadcastNewEvent(new ScriptEventIndustryClose(i->index));
+ Game::NewEvent(new ScriptEventIndustryClose(i->index));
delete i;
}
return CommandCost(EXPENSES_CONSTRUCTION, indspec->GetRemovalCost());
@@ -1876,6 +1878,7 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
AddIndustryNewsItem(indspec->new_industry_text, NS_INDUSTRY_OPEN, ind->index);
AI::BroadcastNewEvent(new ScriptEventIndustryOpen(ind->index));
+ Game::NewEvent(new ScriptEventIndustryOpen(ind->index));
}
return CommandCost(EXPENSES_OTHER, indspec->GetConstructionCost());
@@ -1989,6 +1992,7 @@ static void AdvertiseIndustryOpening(const Industry *ind)
}
AddIndustryNewsItem(ind_spc->new_industry_text, NS_INDUSTRY_OPEN, ind->index);
AI::BroadcastNewEvent(new ScriptEventIndustryOpen(ind->index));
+ Game::NewEvent(new ScriptEventIndustryOpen(ind->index));
}
/**
@@ -2597,6 +2601,7 @@ static void ChangeIndustryProduction(Industry *i, bool monthly)
if (closeit) {
ns = NS_INDUSTRY_CLOSE;
AI::BroadcastNewEvent(new ScriptEventIndustryClose(i->index));
+ Game::NewEvent(new ScriptEventIndustryClose(i->index));
} else {
switch (WhoCanServiceIndustry(i)) {
case 0: ns = NS_INDUSTRY_NOBODY; break;