diff options
-rw-r--r-- | bin/ai/compat_0.7.nut | 22 | ||||
-rw-r--r-- | bin/ai/compat_1.0.nut | 23 | ||||
-rw-r--r-- | bin/ai/compat_1.1.nut | 24 | ||||
-rw-r--r-- | bin/ai/regression/regression.nut | 4 | ||||
-rw-r--r-- | src/script/api/ai/ai_event.hpp.sq | 46 | ||||
-rw-r--r-- | src/script/api/ai_changelog.hpp | 2 | ||||
-rw-r--r-- | src/script/api/script_event.hpp | 46 | ||||
-rw-r--r-- | src/script/api/script_event_types.hpp | 42 |
8 files changed, 140 insertions, 69 deletions
diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 0616a8124..dca1849a0 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -328,3 +328,25 @@ AICompany.GetCompanyValue <- function(company) } AITown.GetLastMonthTransported <- AITown.GetLastMonthSupplied; + +AIEvent.AI_ET_INVALID <- AIEvent.ET_INVALID; +AIEvent.AI_ET_TEST <- AIEvent.ET_TEST; +AIEvent.AI_ET_SUBSIDY_OFFER <- AIEvent.ET_SUBSIDY_OFFER; +AIEvent.AI_ET_SUBSIDY_OFFER_EXPIRED <- AIEvent.ET_SUBSIDY_OFFER_EXPIRED; +AIEvent.AI_ET_SUBSIDY_AWARDED <- AIEvent.ET_SUBSIDY_AWARDED; +AIEvent.AI_ET_SUBSIDY_EXPIRED <- AIEvent.ET_SUBSIDY_EXPIRED; +AIEvent.AI_ET_ENGINE_PREVIEW <- AIEvent.ET_ENGINE_PREVIEW; +AIEvent.AI_ET_COMPANY_NEW <- AIEvent.ET_COMPANY_NEW; +AIEvent.AI_ET_COMPANY_IN_TROUBLE <- AIEvent.ET_COMPANY_IN_TROUBLE; +AIEvent.AI_ET_COMPANY_MERGER <- AIEvent.ET_COMPANY_MERGER; +AIEvent.AI_ET_COMPANY_BANKRUPT <- AIEvent.ET_COMPANY_BANKRUPT; +AIEvent.AI_ET_VEHICLE_CRASHED <- AIEvent.ET_VEHICLE_CRASHED; +AIEvent.AI_ET_VEHICLE_LOST <- AIEvent.ET_VEHICLE_LOST; +AIEvent.AI_ET_VEHICLE_WAITING_IN_DEPOT <- AIEvent.ET_VEHICLE_WAITING_IN_DEPOT; +AIEvent.AI_ET_VEHICLE_UNPROFITABLE <- AIEvent.ET_VEHICLE_UNPROFITABLE; +AIEvent.AI_ET_INDUSTRY_OPEN <- AIEvent.ET_INDUSTRY_OPEN; +AIEvent.AI_ET_INDUSTRY_CLOSE <- AIEvent.ET_INDUSTRY_CLOSE; +AIEvent.AI_ET_ENGINE_AVAILABLE <- AIEvent.ET_ENGINE_AVAILABLE; +AIEvent.AI_ET_STATION_FIRST_VEHICLE <- AIEvent.ET_STATION_FIRST_VEHICLE; +AIEvent.AI_ET_DISASTER_ZEPPELINER_CRASHED <- AIEvent.ET_DISASTER_ZEPPELINER_CRASHED; +AIEvent.AI_ET_DISASTER_ZEPPELINER_CLEARED <- AIEvent.ET_DISASTER_ZEPPELINER_CLEARED; diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut index 9a3cb3401..c25967cbe 100644 --- a/bin/ai/compat_1.0.nut +++ b/bin/ai/compat_1.0.nut @@ -79,3 +79,26 @@ AICompany.GetCompanyValue <- function(company) } AITown.GetLastMonthTransported <- AITown.GetLastMonthSupplied; + +AIEvent.AI_ET_INVALID <- AIEvent.ET_INVALID; +AIEvent.AI_ET_TEST <- AIEvent.ET_TEST; +AIEvent.AI_ET_SUBSIDY_OFFER <- AIEvent.ET_SUBSIDY_OFFER; +AIEvent.AI_ET_SUBSIDY_OFFER_EXPIRED <- AIEvent.ET_SUBSIDY_OFFER_EXPIRED; +AIEvent.AI_ET_SUBSIDY_AWARDED <- AIEvent.ET_SUBSIDY_AWARDED; +AIEvent.AI_ET_SUBSIDY_EXPIRED <- AIEvent.ET_SUBSIDY_EXPIRED; +AIEvent.AI_ET_ENGINE_PREVIEW <- AIEvent.ET_ENGINE_PREVIEW; +AIEvent.AI_ET_COMPANY_NEW <- AIEvent.ET_COMPANY_NEW; +AIEvent.AI_ET_COMPANY_IN_TROUBLE <- AIEvent.ET_COMPANY_IN_TROUBLE; +AIEvent.AI_ET_COMPANY_ASK_MERGER <- AIEvent.ET_COMPANY_ASK_MERGER; +AIEvent.AI_ET_COMPANY_MERGER <- AIEvent.ET_COMPANY_MERGER; +AIEvent.AI_ET_COMPANY_BANKRUPT <- AIEvent.ET_COMPANY_BANKRUPT; +AIEvent.AI_ET_VEHICLE_CRASHED <- AIEvent.ET_VEHICLE_CRASHED; +AIEvent.AI_ET_VEHICLE_LOST <- AIEvent.ET_VEHICLE_LOST; +AIEvent.AI_ET_VEHICLE_WAITING_IN_DEPOT <- AIEvent.ET_VEHICLE_WAITING_IN_DEPOT; +AIEvent.AI_ET_VEHICLE_UNPROFITABLE <- AIEvent.ET_VEHICLE_UNPROFITABLE; +AIEvent.AI_ET_INDUSTRY_OPEN <- AIEvent.ET_INDUSTRY_OPEN; +AIEvent.AI_ET_INDUSTRY_CLOSE <- AIEvent.ET_INDUSTRY_CLOSE; +AIEvent.AI_ET_ENGINE_AVAILABLE <- AIEvent.ET_ENGINE_AVAILABLE; +AIEvent.AI_ET_STATION_FIRST_VEHICLE <- AIEvent.ET_STATION_FIRST_VEHICLE; +AIEvent.AI_ET_DISASTER_ZEPPELINER_CRASHED <- AIEvent.ET_DISASTER_ZEPPELINER_CRASHED; +AIEvent.AI_ET_DISASTER_ZEPPELINER_CLEARED <- AIEvent.ET_DISASTER_ZEPPELINER_CLEARED; diff --git a/bin/ai/compat_1.1.nut b/bin/ai/compat_1.1.nut index 3e3175d3e..9bc3762ed 100644 --- a/bin/ai/compat_1.1.nut +++ b/bin/ai/compat_1.1.nut @@ -15,3 +15,27 @@ AICompany.GetCompanyValue <- function(company) } AITown.GetLastMonthTransported <- AITown.GetLastMonthSupplied; + +AIEvent.AI_ET_INVALID <- AIEvent.ET_INVALID; +AIEvent.AI_ET_TEST <- AIEvent.ET_TEST; +AIEvent.AI_ET_SUBSIDY_OFFER <- AIEvent.ET_SUBSIDY_OFFER; +AIEvent.AI_ET_SUBSIDY_OFFER_EXPIRED <- AIEvent.ET_SUBSIDY_OFFER_EXPIRED; +AIEvent.AI_ET_SUBSIDY_AWARDED <- AIEvent.ET_SUBSIDY_AWARDED; +AIEvent.AI_ET_SUBSIDY_EXPIRED <- AIEvent.ET_SUBSIDY_EXPIRED; +AIEvent.AI_ET_ENGINE_PREVIEW <- AIEvent.ET_ENGINE_PREVIEW; +AIEvent.AI_ET_COMPANY_NEW <- AIEvent.ET_COMPANY_NEW; +AIEvent.AI_ET_COMPANY_IN_TROUBLE <- AIEvent.ET_COMPANY_IN_TROUBLE; +AIEvent.AI_ET_COMPANY_ASK_MERGER <- AIEvent.ET_COMPANY_ASK_MERGER; +AIEvent.AI_ET_COMPANY_MERGER <- AIEvent.ET_COMPANY_MERGER; +AIEvent.AI_ET_COMPANY_BANKRUPT <- AIEvent.ET_COMPANY_BANKRUPT; +AIEvent.AI_ET_VEHICLE_CRASHED <- AIEvent.ET_VEHICLE_CRASHED; +AIEvent.AI_ET_VEHICLE_LOST <- AIEvent.ET_VEHICLE_LOST; +AIEvent.AI_ET_VEHICLE_WAITING_IN_DEPOT <- AIEvent.ET_VEHICLE_WAITING_IN_DEPOT; +AIEvent.AI_ET_VEHICLE_UNPROFITABLE <- AIEvent.ET_VEHICLE_UNPROFITABLE; +AIEvent.AI_ET_INDUSTRY_OPEN <- AIEvent.ET_INDUSTRY_OPEN; +AIEvent.AI_ET_INDUSTRY_CLOSE <- AIEvent.ET_INDUSTRY_CLOSE; +AIEvent.AI_ET_ENGINE_AVAILABLE <- AIEvent.ET_ENGINE_AVAILABLE; +AIEvent.AI_ET_STATION_FIRST_VEHICLE <- AIEvent.ET_STATION_FIRST_VEHICLE; +AIEvent.AI_ET_DISASTER_ZEPPELINER_CRASHED <- AIEvent.ET_DISASTER_ZEPPELINER_CRASHED; +AIEvent.AI_ET_DISASTER_ZEPPELINER_CLEARED <- AIEvent.ET_DISASTER_ZEPPELINER_CLEARED; +AIEvent.AI_ET_TOWN_FOUNDED <- AIEvent.ET_TOWN_FOUNDED; diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut index 341c5d4ce..b1a0da6a9 100644 --- a/bin/ai/regression/regression.nut +++ b/bin/ai/regression/regression.nut @@ -1859,13 +1859,13 @@ function Regression::Start() print(" GetNextEvent: " + (e == null ? "null" : "instance")); print(" GetEventType: " + e.GetEventType()); switch (e.GetEventType()) { - case AIEvent.AI_ET_SUBSIDY_OFFER: { + case AIEvent.ET_SUBSIDY_OFFER: { local c = AIEventSubsidyOffer.Convert(e); print(" EventName: SubsidyOffer"); PrintSubsidy(c.GetSubsidyID()); } break; - case AIEvent.AI_ET_VEHICLE_WAITING_IN_DEPOT: { + case AIEvent.ET_VEHICLE_WAITING_IN_DEPOT: { local c = AIEventVehicleWaitingInDepot.Convert(e); print(" EventName: VehicleWaitingInDepot"); print(" VehicleID: " + c.GetVehicleID()); diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq index b30e38e19..9ae675c01 100644 --- a/src/script/api/ai/ai_event.hpp.sq +++ b/src/script/api/ai/ai_event.hpp.sq @@ -21,29 +21,29 @@ void SQAIEvent_Register(Squirrel *engine) SQAIEvent.PreRegister(engine); SQAIEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_INVALID, "AI_ET_INVALID"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_TEST, "AI_ET_TEST"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_OFFER, "AI_ET_SUBSIDY_OFFER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_OFFER_EXPIRED, "AI_ET_SUBSIDY_OFFER_EXPIRED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_AWARDED, "AI_ET_SUBSIDY_AWARDED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_EXPIRED, "AI_ET_SUBSIDY_EXPIRED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_ENGINE_PREVIEW, "AI_ET_ENGINE_PREVIEW"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_NEW, "AI_ET_COMPANY_NEW"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_IN_TROUBLE, "AI_ET_COMPANY_IN_TROUBLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_ASK_MERGER, "AI_ET_COMPANY_ASK_MERGER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_MERGER, "AI_ET_COMPANY_MERGER"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_BANKRUPT, "AI_ET_COMPANY_BANKRUPT"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_CRASHED, "AI_ET_VEHICLE_CRASHED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_LOST, "AI_ET_VEHICLE_LOST"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_WAITING_IN_DEPOT, "AI_ET_VEHICLE_WAITING_IN_DEPOT"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_UNPROFITABLE, "AI_ET_VEHICLE_UNPROFITABLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_INDUSTRY_OPEN, "AI_ET_INDUSTRY_OPEN"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_INDUSTRY_CLOSE, "AI_ET_INDUSTRY_CLOSE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_ENGINE_AVAILABLE, "AI_ET_ENGINE_AVAILABLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_STATION_FIRST_VEHICLE, "AI_ET_STATION_FIRST_VEHICLE"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_DISASTER_ZEPPELINER_CRASHED, "AI_ET_DISASTER_ZEPPELINER_CRASHED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_DISASTER_ZEPPELINER_CLEARED, "AI_ET_DISASTER_ZEPPELINER_CLEARED"); - SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_TOWN_FOUNDED, "AI_ET_TOWN_FOUNDED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INVALID, "ET_INVALID"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_TEST, "ET_TEST"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER, "ET_SUBSIDY_OFFER"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_OFFER_EXPIRED, "ET_SUBSIDY_OFFER_EXPIRED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_AWARDED, "ET_SUBSIDY_AWARDED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_SUBSIDY_EXPIRED, "ET_SUBSIDY_EXPIRED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_PREVIEW, "ET_ENGINE_PREVIEW"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_NEW, "ET_COMPANY_NEW"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_IN_TROUBLE, "ET_COMPANY_IN_TROUBLE"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_ASK_MERGER, "ET_COMPANY_ASK_MERGER"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_MERGER, "ET_COMPANY_MERGER"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_COMPANY_BANKRUPT, "ET_COMPANY_BANKRUPT"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_CRASHED, "ET_VEHICLE_CRASHED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_LOST, "ET_VEHICLE_LOST"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_WAITING_IN_DEPOT, "ET_VEHICLE_WAITING_IN_DEPOT"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_VEHICLE_UNPROFITABLE, "ET_VEHICLE_UNPROFITABLE"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_OPEN, "ET_INDUSTRY_OPEN"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_INDUSTRY_CLOSE, "ET_INDUSTRY_CLOSE"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ENGINE_AVAILABLE, "ET_ENGINE_AVAILABLE"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_STATION_FIRST_VEHICLE, "ET_STATION_FIRST_VEHICLE"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CRASHED, "ET_DISASTER_ZEPPELINER_CRASHED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_DISASTER_ZEPPELINER_CLEARED, "ET_DISASTER_ZEPPELINER_CLEARED"); + SQAIEvent.DefSQConst(engine, ScriptEvent::ET_TOWN_FOUNDED, "ET_TOWN_FOUNDED"); SQAIEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x"); diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 99d892497..d69af4324 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -47,6 +47,8 @@ * reflect what it does. * \li AIInfo has all its configure settings renamed from AICONFIG to just CONFIG * like CONFIG_RANDOM. + * \li AIEvent has all its types renamed from AI_ET_ prefix to just ET_ prefix, + * like ET_SUBSIDY_OFFER. * * API removals: * \li AICompany::GetCompanyValue, use AICompany::GetQuarterlyCompanyValue instead. diff --git a/src/script/api/script_event.hpp b/src/script/api/script_event.hpp index ed7684943..101318af4 100644 --- a/src/script/api/script_event.hpp +++ b/src/script/api/script_event.hpp @@ -26,29 +26,29 @@ public: * The type of event. Needed to lookup the detailed class. */ enum ScriptEventType { - AI_ET_INVALID = 0, - AI_ET_TEST, - AI_ET_SUBSIDY_OFFER, - AI_ET_SUBSIDY_OFFER_EXPIRED, - AI_ET_SUBSIDY_AWARDED, - AI_ET_SUBSIDY_EXPIRED, - AI_ET_ENGINE_PREVIEW, - AI_ET_COMPANY_NEW, - AI_ET_COMPANY_IN_TROUBLE, - AI_ET_COMPANY_ASK_MERGER, - AI_ET_COMPANY_MERGER, - AI_ET_COMPANY_BANKRUPT, - AI_ET_VEHICLE_CRASHED, - AI_ET_VEHICLE_LOST, - AI_ET_VEHICLE_WAITING_IN_DEPOT, - AI_ET_VEHICLE_UNPROFITABLE, - AI_ET_INDUSTRY_OPEN, - AI_ET_INDUSTRY_CLOSE, - AI_ET_ENGINE_AVAILABLE, - AI_ET_STATION_FIRST_VEHICLE, - AI_ET_DISASTER_ZEPPELINER_CRASHED, - AI_ET_DISASTER_ZEPPELINER_CLEARED, - AI_ET_TOWN_FOUNDED, + ET_INVALID = 0, + ET_TEST, + ET_SUBSIDY_OFFER, + ET_SUBSIDY_OFFER_EXPIRED, + ET_SUBSIDY_AWARDED, + ET_SUBSIDY_EXPIRED, + ET_ENGINE_PREVIEW, + ET_COMPANY_NEW, + ET_COMPANY_IN_TROUBLE, + ET_COMPANY_ASK_MERGER, + ET_COMPANY_MERGER, + ET_COMPANY_BANKRUPT, + ET_VEHICLE_CRASHED, + ET_VEHICLE_LOST, + ET_VEHICLE_WAITING_IN_DEPOT, + ET_VEHICLE_UNPROFITABLE, + ET_INDUSTRY_OPEN, + ET_INDUSTRY_CLOSE, + ET_ENGINE_AVAILABLE, + ET_STATION_FIRST_VEHICLE, + ET_DISASTER_ZEPPELINER_CRASHED, + ET_DISASTER_ZEPPELINER_CLEARED, + ET_TOWN_FOUNDED, }; /** diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp index f849c2d19..ea25e6f12 100644 --- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -40,7 +40,7 @@ public: * @param crash_reason The reason why the vehicle crashed. */ ScriptEventVehicleCrashed(VehicleID vehicle, TileIndex crash_site, CrashReason crash_reason) : - ScriptEvent(AI_ET_VEHICLE_CRASHED), + ScriptEvent(ET_VEHICLE_CRASHED), crash_site(crash_site), vehicle(vehicle), crash_reason(crash_reason) @@ -87,7 +87,7 @@ public: * @param subsidy_id The index of this subsidy in the _subsidies array. */ ScriptEventSubsidyOffer(SubsidyID subsidy_id) : - ScriptEvent(AI_ET_SUBSIDY_OFFER), + ScriptEvent(ET_SUBSIDY_OFFER), subsidy_id(subsidy_id) {} @@ -118,7 +118,7 @@ public: * @param subsidy_id The index of this subsidy in the _subsidies array. */ ScriptEventSubsidyOfferExpired(SubsidyID subsidy_id) : - ScriptEvent(AI_ET_SUBSIDY_OFFER_EXPIRED), + ScriptEvent(ET_SUBSIDY_OFFER_EXPIRED), subsidy_id(subsidy_id) {} @@ -149,7 +149,7 @@ public: * @param subsidy_id The index of this subsidy in the _subsidies array. */ ScriptEventSubsidyAwarded(SubsidyID subsidy_id) : - ScriptEvent(AI_ET_SUBSIDY_AWARDED), + ScriptEvent(ET_SUBSIDY_AWARDED), subsidy_id(subsidy_id) {} @@ -180,7 +180,7 @@ public: * @param subsidy_id The index of this subsidy in the _subsidies array. */ ScriptEventSubsidyExpired(SubsidyID subsidy_id) : - ScriptEvent(AI_ET_SUBSIDY_EXPIRED), + ScriptEvent(ET_SUBSIDY_EXPIRED), subsidy_id(subsidy_id) {} @@ -213,7 +213,7 @@ public: * @param engine The engine offered to test. */ ScriptEventEnginePreview(EngineID engine) : - ScriptEvent(AI_ET_ENGINE_PREVIEW), + ScriptEvent(ET_ENGINE_PREVIEW), engine(engine) {} @@ -302,7 +302,7 @@ public: * @param owner The new company. */ ScriptEventCompanyNew(Owner owner) : - ScriptEvent(AI_ET_COMPANY_NEW), + ScriptEvent(ET_COMPANY_NEW), owner((ScriptCompany::CompanyID)owner) {} @@ -334,7 +334,7 @@ public: * @param owner The company that is in trouble. */ ScriptEventCompanyInTrouble(Owner owner) : - ScriptEvent(AI_ET_COMPANY_IN_TROUBLE), + ScriptEvent(ET_COMPANY_IN_TROUBLE), owner((ScriptCompany::CompanyID)owner) {} @@ -366,7 +366,7 @@ public: * @param value The value/costs of buying the company. */ ScriptEventCompanyAskMerger(Owner owner, int32 value) : - ScriptEvent(AI_ET_COMPANY_ASK_MERGER), + ScriptEvent(ET_COMPANY_ASK_MERGER), owner((ScriptCompany::CompanyID)owner), value(value) {} @@ -414,7 +414,7 @@ public: * @param new_owner The company that bougth owner. */ ScriptEventCompanyMerger(Owner old_owner, Owner new_owner) : - ScriptEvent(AI_ET_COMPANY_MERGER), + ScriptEvent(ET_COMPANY_MERGER), old_owner((ScriptCompany::CompanyID)old_owner), new_owner((ScriptCompany::CompanyID)new_owner) {} @@ -456,7 +456,7 @@ public: * @param owner The company that has gone bankrupt. */ ScriptEventCompanyBankrupt(Owner owner) : - ScriptEvent(AI_ET_COMPANY_BANKRUPT), + ScriptEvent(ET_COMPANY_BANKRUPT), owner((ScriptCompany::CompanyID)owner) {} @@ -487,7 +487,7 @@ public: * @param vehicle_id The vehicle that is lost. */ ScriptEventVehicleLost(VehicleID vehicle_id) : - ScriptEvent(AI_ET_VEHICLE_LOST), + ScriptEvent(ET_VEHICLE_LOST), vehicle_id(vehicle_id) {} @@ -518,7 +518,7 @@ public: * @param vehicle_id The vehicle that is waiting in a depot. */ ScriptEventVehicleWaitingInDepot(VehicleID vehicle_id) : - ScriptEvent(AI_ET_VEHICLE_WAITING_IN_DEPOT), + ScriptEvent(ET_VEHICLE_WAITING_IN_DEPOT), vehicle_id(vehicle_id) {} @@ -549,7 +549,7 @@ public: * @param vehicle_id The vehicle that was unprofitable. */ ScriptEventVehicleUnprofitable(VehicleID vehicle_id) : - ScriptEvent(AI_ET_VEHICLE_UNPROFITABLE), + ScriptEvent(ET_VEHICLE_UNPROFITABLE), vehicle_id(vehicle_id) {} @@ -580,7 +580,7 @@ public: * @param industry_id The new industry. */ ScriptEventIndustryOpen(IndustryID industry_id) : - ScriptEvent(AI_ET_INDUSTRY_OPEN), + ScriptEvent(ET_INDUSTRY_OPEN), industry_id(industry_id) {} @@ -611,7 +611,7 @@ public: * @param industry_id The new industry. */ ScriptEventIndustryClose(IndustryID industry_id) : - ScriptEvent(AI_ET_INDUSTRY_CLOSE), + ScriptEvent(ET_INDUSTRY_CLOSE), industry_id(industry_id) {} @@ -642,7 +642,7 @@ public: * @param engine The engine that is available. */ ScriptEventEngineAvailable(EngineID engine) : - ScriptEvent(AI_ET_ENGINE_AVAILABLE), + ScriptEvent(ET_ENGINE_AVAILABLE), engine(engine) {} @@ -674,7 +674,7 @@ public: * @param vehicle The vehicle visiting the station. */ ScriptEventStationFirstVehicle(StationID station, VehicleID vehicle) : - ScriptEvent(AI_ET_STATION_FIRST_VEHICLE), + ScriptEvent(ET_STATION_FIRST_VEHICLE), station(station), vehicle(vehicle) {} @@ -713,7 +713,7 @@ public: * @param station The station containing the affected airport */ ScriptEventDisasterZeppelinerCrashed(StationID station) : - ScriptEvent(AI_ET_DISASTER_ZEPPELINER_CRASHED), + ScriptEvent(ET_DISASTER_ZEPPELINER_CRASHED), station(station) {} @@ -744,7 +744,7 @@ public: * @param station The station containing the affected airport */ ScriptEventDisasterZeppelinerCleared(StationID station) : - ScriptEvent(AI_ET_DISASTER_ZEPPELINER_CLEARED), + ScriptEvent(ET_DISASTER_ZEPPELINER_CLEARED), station(station) {} @@ -775,7 +775,7 @@ public: * @param town The town that was created. */ ScriptEventTownFounded(TownID town) : - ScriptEvent(AI_ET_TOWN_FOUNDED), + ScriptEvent(ET_TOWN_FOUNDED), town(town) {} |