|
|
|
@ -33,6 +33,7 @@ public:
|
|
|
|
|
CRASH_FLOODED, ///< Vehicle was flooded
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param vehicle The vehicle that crashed.
|
|
|
|
|
* @param crash_site Where the vehicle crashed.
|
|
|
|
@ -44,6 +45,7 @@ public:
|
|
|
|
|
vehicle(vehicle),
|
|
|
|
|
crash_reason(crash_reason)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -82,6 +84,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventSubsidyOffer : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param subsidy_id The index of this subsidy in the _subsidies array.
|
|
|
|
|
*/
|
|
|
|
@ -89,6 +92,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_SUBSIDY_OFFER),
|
|
|
|
|
subsidy_id(subsidy_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -113,6 +117,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventSubsidyOfferExpired : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param subsidy_id The index of this subsidy in the _subsidies array.
|
|
|
|
|
*/
|
|
|
|
@ -120,6 +125,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_SUBSIDY_OFFER_EXPIRED),
|
|
|
|
|
subsidy_id(subsidy_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -144,6 +150,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventSubsidyAwarded : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param subsidy_id The index of this subsidy in the _subsidies array.
|
|
|
|
|
*/
|
|
|
|
@ -151,6 +158,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_SUBSIDY_AWARDED),
|
|
|
|
|
subsidy_id(subsidy_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -175,6 +183,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventSubsidyExpired : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param subsidy_id The index of this subsidy in the _subsidies array.
|
|
|
|
|
*/
|
|
|
|
@ -182,6 +191,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_SUBSIDY_EXPIRED),
|
|
|
|
|
subsidy_id(subsidy_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -208,6 +218,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventEnginePreview : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param engine The engine offered to test.
|
|
|
|
|
*/
|
|
|
|
@ -215,6 +226,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_ENGINE_PREVIEW),
|
|
|
|
|
engine(engine)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -297,6 +309,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventCompanyNew : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param owner The new company.
|
|
|
|
|
*/
|
|
|
|
@ -304,6 +317,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_COMPANY_NEW),
|
|
|
|
|
owner((ScriptCompany::CompanyID)owner)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -329,6 +343,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventCompanyInTrouble : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param owner The company that is in trouble.
|
|
|
|
|
*/
|
|
|
|
@ -336,6 +351,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_COMPANY_IN_TROUBLE),
|
|
|
|
|
owner((ScriptCompany::CompanyID)owner)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -360,6 +376,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventCompanyAskMerger : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param owner The company that can be bought.
|
|
|
|
|
* @param value The value/costs of buying the company.
|
|
|
|
@ -369,6 +386,7 @@ public:
|
|
|
|
|
owner((ScriptCompany::CompanyID)owner),
|
|
|
|
|
value(value)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -408,6 +426,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventCompanyMerger : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param old_owner The company bought off.
|
|
|
|
|
* @param new_owner The company that bought owner.
|
|
|
|
@ -417,6 +436,7 @@ public:
|
|
|
|
|
old_owner((ScriptCompany::CompanyID)old_owner),
|
|
|
|
|
new_owner((ScriptCompany::CompanyID)new_owner)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -451,6 +471,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventCompanyBankrupt : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param owner The company that has gone bankrupt.
|
|
|
|
|
*/
|
|
|
|
@ -458,6 +479,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_COMPANY_BANKRUPT),
|
|
|
|
|
owner((ScriptCompany::CompanyID)owner)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -482,6 +504,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventVehicleLost : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param vehicle_id The vehicle that is lost.
|
|
|
|
|
*/
|
|
|
|
@ -489,6 +512,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_VEHICLE_LOST),
|
|
|
|
|
vehicle_id(vehicle_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -513,6 +537,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventVehicleWaitingInDepot : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param vehicle_id The vehicle that is waiting in a depot.
|
|
|
|
|
*/
|
|
|
|
@ -520,6 +545,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_VEHICLE_WAITING_IN_DEPOT),
|
|
|
|
|
vehicle_id(vehicle_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -544,6 +570,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventVehicleUnprofitable : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param vehicle_id The vehicle that was unprofitable.
|
|
|
|
|
*/
|
|
|
|
@ -551,6 +578,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_VEHICLE_UNPROFITABLE),
|
|
|
|
|
vehicle_id(vehicle_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -575,6 +603,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventIndustryOpen : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param industry_id The new industry.
|
|
|
|
|
*/
|
|
|
|
@ -582,6 +611,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_INDUSTRY_OPEN),
|
|
|
|
|
industry_id(industry_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -606,6 +636,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventIndustryClose : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param industry_id The new industry.
|
|
|
|
|
*/
|
|
|
|
@ -613,6 +644,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_INDUSTRY_CLOSE),
|
|
|
|
|
industry_id(industry_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -637,6 +669,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventEngineAvailable : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param engine The engine that is available.
|
|
|
|
|
*/
|
|
|
|
@ -644,6 +677,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_ENGINE_AVAILABLE),
|
|
|
|
|
engine(engine)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -668,6 +702,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventStationFirstVehicle : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param station The station visited for the first time.
|
|
|
|
|
* @param vehicle The vehicle visiting the station.
|
|
|
|
@ -677,6 +712,7 @@ public:
|
|
|
|
|
station(station),
|
|
|
|
|
vehicle(vehicle)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -708,6 +744,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventDisasterZeppelinerCrashed : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param station The station containing the affected airport
|
|
|
|
|
*/
|
|
|
|
@ -715,6 +752,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_DISASTER_ZEPPELINER_CRASHED),
|
|
|
|
|
station(station)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -739,6 +777,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventDisasterZeppelinerCleared : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param station The station containing the affected airport
|
|
|
|
|
*/
|
|
|
|
@ -746,6 +785,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_DISASTER_ZEPPELINER_CLEARED),
|
|
|
|
|
station(station)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -770,6 +810,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventTownFounded : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param town The town that was created.
|
|
|
|
|
*/
|
|
|
|
@ -777,6 +818,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_TOWN_FOUNDED),
|
|
|
|
|
town(town)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -803,6 +845,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventAircraftDestTooFar : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param vehicle_id The aircraft whose destination is too far away.
|
|
|
|
|
*/
|
|
|
|
@ -810,6 +853,7 @@ public:
|
|
|
|
|
ScriptEvent(ET_AIRCRAFT_DEST_TOO_FAR),
|
|
|
|
|
vehicle_id(vehicle_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -834,10 +878,12 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventAdminPort : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param json The JSON string which got sent.
|
|
|
|
|
*/
|
|
|
|
|
ScriptEventAdminPort(const std::string &json);
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -846,10 +892,19 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
static ScriptEventAdminPort *Convert(ScriptEvent *instance) { return (ScriptEventAdminPort *)instance; }
|
|
|
|
|
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* Get the information that was sent to you back as Squirrel object.
|
|
|
|
|
* The GetObject() wrapper from Squirrel.
|
|
|
|
|
*/
|
|
|
|
|
SQInteger GetObject(HSQUIRRELVM vm);
|
|
|
|
|
#else
|
|
|
|
|
/**
|
|
|
|
|
* Get the information that was sent to you back as Squirrel object.
|
|
|
|
|
* @return The object.
|
|
|
|
|
*/
|
|
|
|
|
SQObject GetObject();
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string json; ///< The JSON string.
|
|
|
|
@ -882,6 +937,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventWindowWidgetClick : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param window The windowclass that was clicked.
|
|
|
|
|
* @param number The windownumber that was clicked.
|
|
|
|
@ -893,6 +949,7 @@ public:
|
|
|
|
|
number(number),
|
|
|
|
|
widget(widget)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -903,16 +960,19 @@ public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the class of the window that was clicked.
|
|
|
|
|
* @return The clicked window class.
|
|
|
|
|
*/
|
|
|
|
|
ScriptWindow::WindowClass GetWindowClass() { return this->window; }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the number of the window that was clicked.
|
|
|
|
|
* @return The clicked identifying number of the widget within the class.
|
|
|
|
|
*/
|
|
|
|
|
uint32 GetWindowNumber() { return this->number; }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the number of the widget that was clicked.
|
|
|
|
|
* @return The number of the clicked widget.
|
|
|
|
|
*/
|
|
|
|
|
uint8 GetWidgetNumber() { return this->widget; }
|
|
|
|
|
|
|
|
|
@ -930,6 +990,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventGoalQuestionAnswer : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param uniqueid The uniqueID you have given this question.
|
|
|
|
|
* @param company The company that is replying.
|
|
|
|
@ -941,6 +1002,7 @@ public:
|
|
|
|
|
company(company),
|
|
|
|
|
button(button)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -951,16 +1013,19 @@ public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the unique id of the question.
|
|
|
|
|
* @return The unique id.
|
|
|
|
|
*/
|
|
|
|
|
uint16 GetUniqueID() { return this->uniqueid; }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the company that pressed a button.
|
|
|
|
|
* @return The company.
|
|
|
|
|
*/
|
|
|
|
|
ScriptCompany::CompanyID GetCompany() { return this->company; }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the button that got pressed.
|
|
|
|
|
* @return The button.
|
|
|
|
|
*/
|
|
|
|
|
ScriptGoal::QuestionButton GetButton() { return this->button; }
|
|
|
|
|
|
|
|
|
@ -976,6 +1041,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventCompanyTown : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param event The eventtype.
|
|
|
|
|
* @param company The company.
|
|
|
|
@ -986,6 +1052,7 @@ public:
|
|
|
|
|
company(company),
|
|
|
|
|
town(town)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1018,6 +1085,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventExclusiveTransportRights : public ScriptEventCompanyTown {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param company The company.
|
|
|
|
|
* @param town The town.
|
|
|
|
@ -1025,6 +1093,7 @@ public:
|
|
|
|
|
ScriptEventExclusiveTransportRights(ScriptCompany::CompanyID company, TownID town) :
|
|
|
|
|
ScriptEventCompanyTown(ET_EXCLUSIVE_TRANSPORT_RIGHTS, company, town)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1041,6 +1110,7 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventRoadReconstruction : public ScriptEventCompanyTown {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param company The company.
|
|
|
|
|
* @param town The town.
|
|
|
|
@ -1048,6 +1118,7 @@ public:
|
|
|
|
|
ScriptEventRoadReconstruction(ScriptCompany::CompanyID company, TownID town) :
|
|
|
|
|
ScriptEventCompanyTown(ET_ROAD_RECONSTRUCTION, company, town)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1063,6 +1134,7 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventVehicleAutoReplaced : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param old_id The vehicle that has been replaced.
|
|
|
|
|
* @param new_id The vehicle that has been created in replacement.
|
|
|
|
@ -1072,6 +1144,7 @@ public:
|
|
|
|
|
old_id(old_id),
|
|
|
|
|
new_id(new_id)
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1103,6 +1176,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventStoryPageButtonClick : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param company_id Which company triggered the event.
|
|
|
|
|
* @param page_id Which page was the clicked button on.
|
|
|
|
@ -1113,7 +1187,8 @@ public:
|
|
|
|
|
company_id((ScriptCompany::CompanyID)company_id),
|
|
|
|
|
page_id(page_id),
|
|
|
|
|
element_id(element_id)
|
|
|
|
|
{ }
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1122,13 +1197,22 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
static ScriptEventStoryPageButtonClick *Convert(ScriptEvent *instance) { return (ScriptEventStoryPageButtonClick *)instance; }
|
|
|
|
|
|
|
|
|
|
/** Get the CompanyID of the player that selected a tile. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the CompanyID of the player that selected a tile.
|
|
|
|
|
* @return The ID of the company.
|
|
|
|
|
*/
|
|
|
|
|
ScriptCompany::CompanyID GetCompanyID() { return this->company_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the StoryPageID of the storybook page the clicked button is located on. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the StoryPageID of the storybook page the clicked button is located on.
|
|
|
|
|
* @return The ID of the page in the story book the click was on.
|
|
|
|
|
*/
|
|
|
|
|
StoryPageID GetStoryPageID() { return this->page_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the StoryPageElementID of the button element that was clicked. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the StoryPageElementID of the button element that was clicked.
|
|
|
|
|
* @return The ID of the element that was clicked.
|
|
|
|
|
*/
|
|
|
|
|
StoryPageElementID GetElementID() { return this->element_id; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
@ -1143,6 +1227,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventStoryPageTileSelect : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param company_id Which company triggered the event.
|
|
|
|
|
* @param page_id Which page is the used selection button on.
|
|
|
|
@ -1155,7 +1240,8 @@ public:
|
|
|
|
|
page_id(page_id),
|
|
|
|
|
element_id(element_id),
|
|
|
|
|
tile_index(tile_index)
|
|
|
|
|
{ }
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1164,16 +1250,28 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
static ScriptEventStoryPageTileSelect *Convert(ScriptEvent *instance) { return (ScriptEventStoryPageTileSelect *)instance; }
|
|
|
|
|
|
|
|
|
|
/** Get the CompanyID of the player that selected a tile. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the CompanyID of the player that selected a tile.
|
|
|
|
|
* @return The company that selected the tile.
|
|
|
|
|
*/
|
|
|
|
|
ScriptCompany::CompanyID GetCompanyID() { return this->company_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the StoryPageID of the storybook page the used selection button is located on. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the StoryPageID of the storybook page the used selection button is located on.
|
|
|
|
|
* @return The ID of the story page selection was done from.
|
|
|
|
|
*/
|
|
|
|
|
StoryPageID GetStoryPageID() { return this->page_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the StoryPageElementID of the selection button used to select the tile. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the StoryPageElementID of the selection button used to select the tile.
|
|
|
|
|
* @return The ID of the element that was used to select the tile.
|
|
|
|
|
*/
|
|
|
|
|
StoryPageElementID GetElementID() { return this->element_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the TileIndex of the tile the player selected */
|
|
|
|
|
/**
|
|
|
|
|
* Get the TileIndex of the tile the player selected.
|
|
|
|
|
* @return The selected tile.
|
|
|
|
|
*/
|
|
|
|
|
TileIndex GetTile() { return this->tile_index; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
@ -1189,6 +1287,7 @@ private:
|
|
|
|
|
*/
|
|
|
|
|
class ScriptEventStoryPageVehicleSelect : public ScriptEvent {
|
|
|
|
|
public:
|
|
|
|
|
#ifndef DOXYGEN_API
|
|
|
|
|
/**
|
|
|
|
|
* @param company_id Which company triggered the event.
|
|
|
|
|
* @param page_id Which page is the used selection button on.
|
|
|
|
@ -1201,7 +1300,8 @@ public:
|
|
|
|
|
page_id(page_id),
|
|
|
|
|
element_id(element_id),
|
|
|
|
|
vehicle_id(vehicle_id)
|
|
|
|
|
{ }
|
|
|
|
|
{}
|
|
|
|
|
#endif /* DOXYGEN_API */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert an ScriptEvent to the real instance.
|
|
|
|
@ -1210,16 +1310,28 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
static ScriptEventStoryPageVehicleSelect *Convert(ScriptEvent *instance) { return (ScriptEventStoryPageVehicleSelect *)instance; }
|
|
|
|
|
|
|
|
|
|
/** Get the CompanyID of the player that selected a tile. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the CompanyID of the player that selected a tile.
|
|
|
|
|
* @return The company's ID.
|
|
|
|
|
*/
|
|
|
|
|
ScriptCompany::CompanyID GetCompanyID() { return this->company_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the StoryPageID of the storybook page the used selection button is located on. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the StoryPageID of the storybook page the used selection button is located on.
|
|
|
|
|
* @return The ID of the storybook page the selected element is on.
|
|
|
|
|
*/
|
|
|
|
|
StoryPageID GetStoryPageID() { return this->page_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the StoryPageElementID of the selection button used to select the vehicle. */
|
|
|
|
|
/**
|
|
|
|
|
* Get the StoryPageElementID of the selection button used to select the vehicle.
|
|
|
|
|
* @return The ID of the selected element of the story page.
|
|
|
|
|
*/
|
|
|
|
|
StoryPageElementID GetElementID() { return this->element_id; }
|
|
|
|
|
|
|
|
|
|
/** Get the VehicleID of the vehicle the player selected */
|
|
|
|
|
/**
|
|
|
|
|
* Get the VehicleID of the vehicle the player selected.
|
|
|
|
|
* @return The ID of the vehicle.
|
|
|
|
|
*/
|
|
|
|
|
VehicleID GetVehicleID() { return this->vehicle_id; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|