forked from mirror/OpenTTD
(svn r23622) -Add: a set of events to trigger in a GameScript
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "vehicle_func.h"
|
||||
#include "sprite.h"
|
||||
#include "smallmap_gui.h"
|
||||
#include "game/game.hpp"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -563,6 +564,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
|
||||
if (is_ai && (!_networking || _network_server)) AI::StartNew(c->index);
|
||||
|
||||
AI::BroadcastNewEvent(new ScriptEventCompanyNew(c->index), c->index);
|
||||
Game::NewEvent(new ScriptEventCompanyNew(c->index));
|
||||
|
||||
return c;
|
||||
}
|
||||
@@ -905,6 +907,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
CompanyID c_index = c->index;
|
||||
delete c;
|
||||
AI::BroadcastNewEvent(new ScriptEventCompanyBankrupt(c_index));
|
||||
Game::NewEvent(new ScriptEventCompanyBankrupt(c_index));
|
||||
CompanyAdminRemove(c_index, (CompanyRemoveReason)reason);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user