1
0
Fork 0

Fix: scripts cannot call constructors of ScriptEvents, so remove from the documentation

pull/10413/head
Rubidium 2023-01-25 21:40:38 +01:00 committed by rubidium42
parent 042f90a9dd
commit 41fa94bc56
1 changed files with 67 additions and 3 deletions

View File

@ -33,6 +33,7 @@ public:
CRASH_FLOODED, ///< Vehicle was flooded CRASH_FLOODED, ///< Vehicle was flooded
}; };
#ifndef DOXYGEN_API
/** /**
* @param vehicle The vehicle that crashed. * @param vehicle The vehicle that crashed.
* @param crash_site Where the vehicle crashed. * @param crash_site Where the vehicle crashed.
@ -44,6 +45,7 @@ public:
vehicle(vehicle), vehicle(vehicle),
crash_reason(crash_reason) crash_reason(crash_reason)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -82,6 +84,7 @@ private:
*/ */
class ScriptEventSubsidyOffer : public ScriptEvent { class ScriptEventSubsidyOffer : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -89,6 +92,7 @@ public:
ScriptEvent(ET_SUBSIDY_OFFER), ScriptEvent(ET_SUBSIDY_OFFER),
subsidy_id(subsidy_id) subsidy_id(subsidy_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -113,6 +117,7 @@ private:
*/ */
class ScriptEventSubsidyOfferExpired : public ScriptEvent { class ScriptEventSubsidyOfferExpired : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -120,6 +125,7 @@ public:
ScriptEvent(ET_SUBSIDY_OFFER_EXPIRED), ScriptEvent(ET_SUBSIDY_OFFER_EXPIRED),
subsidy_id(subsidy_id) subsidy_id(subsidy_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -144,6 +150,7 @@ private:
*/ */
class ScriptEventSubsidyAwarded : public ScriptEvent { class ScriptEventSubsidyAwarded : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -151,6 +158,7 @@ public:
ScriptEvent(ET_SUBSIDY_AWARDED), ScriptEvent(ET_SUBSIDY_AWARDED),
subsidy_id(subsidy_id) subsidy_id(subsidy_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -175,6 +183,7 @@ private:
*/ */
class ScriptEventSubsidyExpired : public ScriptEvent { class ScriptEventSubsidyExpired : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param subsidy_id The index of this subsidy in the _subsidies array. * @param subsidy_id The index of this subsidy in the _subsidies array.
*/ */
@ -182,6 +191,7 @@ public:
ScriptEvent(ET_SUBSIDY_EXPIRED), ScriptEvent(ET_SUBSIDY_EXPIRED),
subsidy_id(subsidy_id) subsidy_id(subsidy_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -208,6 +218,7 @@ private:
*/ */
class ScriptEventEnginePreview : public ScriptEvent { class ScriptEventEnginePreview : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param engine The engine offered to test. * @param engine The engine offered to test.
*/ */
@ -215,6 +226,7 @@ public:
ScriptEvent(ET_ENGINE_PREVIEW), ScriptEvent(ET_ENGINE_PREVIEW),
engine(engine) engine(engine)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -297,6 +309,7 @@ private:
*/ */
class ScriptEventCompanyNew : public ScriptEvent { class ScriptEventCompanyNew : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param owner The new company. * @param owner The new company.
*/ */
@ -304,6 +317,7 @@ public:
ScriptEvent(ET_COMPANY_NEW), ScriptEvent(ET_COMPANY_NEW),
owner((ScriptCompany::CompanyID)owner) owner((ScriptCompany::CompanyID)owner)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -329,6 +343,7 @@ private:
*/ */
class ScriptEventCompanyInTrouble : public ScriptEvent { class ScriptEventCompanyInTrouble : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param owner The company that is in trouble. * @param owner The company that is in trouble.
*/ */
@ -336,6 +351,7 @@ public:
ScriptEvent(ET_COMPANY_IN_TROUBLE), ScriptEvent(ET_COMPANY_IN_TROUBLE),
owner((ScriptCompany::CompanyID)owner) owner((ScriptCompany::CompanyID)owner)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -360,6 +376,7 @@ private:
*/ */
class ScriptEventCompanyAskMerger : public ScriptEvent { class ScriptEventCompanyAskMerger : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param owner The company that can be bought. * @param owner The company that can be bought.
* @param value The value/costs of buying the company. * @param value The value/costs of buying the company.
@ -369,6 +386,7 @@ public:
owner((ScriptCompany::CompanyID)owner), owner((ScriptCompany::CompanyID)owner),
value(value) value(value)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -408,6 +426,7 @@ private:
*/ */
class ScriptEventCompanyMerger : public ScriptEvent { class ScriptEventCompanyMerger : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param old_owner The company bought off. * @param old_owner The company bought off.
* @param new_owner The company that bought owner. * @param new_owner The company that bought owner.
@ -417,6 +436,7 @@ public:
old_owner((ScriptCompany::CompanyID)old_owner), old_owner((ScriptCompany::CompanyID)old_owner),
new_owner((ScriptCompany::CompanyID)new_owner) new_owner((ScriptCompany::CompanyID)new_owner)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -451,6 +471,7 @@ private:
*/ */
class ScriptEventCompanyBankrupt : public ScriptEvent { class ScriptEventCompanyBankrupt : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param owner The company that has gone bankrupt. * @param owner The company that has gone bankrupt.
*/ */
@ -458,6 +479,7 @@ public:
ScriptEvent(ET_COMPANY_BANKRUPT), ScriptEvent(ET_COMPANY_BANKRUPT),
owner((ScriptCompany::CompanyID)owner) owner((ScriptCompany::CompanyID)owner)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -482,6 +504,7 @@ private:
*/ */
class ScriptEventVehicleLost : public ScriptEvent { class ScriptEventVehicleLost : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param vehicle_id The vehicle that is lost. * @param vehicle_id The vehicle that is lost.
*/ */
@ -489,6 +512,7 @@ public:
ScriptEvent(ET_VEHICLE_LOST), ScriptEvent(ET_VEHICLE_LOST),
vehicle_id(vehicle_id) vehicle_id(vehicle_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -513,6 +537,7 @@ private:
*/ */
class ScriptEventVehicleWaitingInDepot : public ScriptEvent { class ScriptEventVehicleWaitingInDepot : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param vehicle_id The vehicle that is waiting in a depot. * @param vehicle_id The vehicle that is waiting in a depot.
*/ */
@ -520,6 +545,7 @@ public:
ScriptEvent(ET_VEHICLE_WAITING_IN_DEPOT), ScriptEvent(ET_VEHICLE_WAITING_IN_DEPOT),
vehicle_id(vehicle_id) vehicle_id(vehicle_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -544,6 +570,7 @@ private:
*/ */
class ScriptEventVehicleUnprofitable : public ScriptEvent { class ScriptEventVehicleUnprofitable : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param vehicle_id The vehicle that was unprofitable. * @param vehicle_id The vehicle that was unprofitable.
*/ */
@ -551,6 +578,7 @@ public:
ScriptEvent(ET_VEHICLE_UNPROFITABLE), ScriptEvent(ET_VEHICLE_UNPROFITABLE),
vehicle_id(vehicle_id) vehicle_id(vehicle_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -575,6 +603,7 @@ private:
*/ */
class ScriptEventIndustryOpen : public ScriptEvent { class ScriptEventIndustryOpen : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param industry_id The new industry. * @param industry_id The new industry.
*/ */
@ -582,6 +611,7 @@ public:
ScriptEvent(ET_INDUSTRY_OPEN), ScriptEvent(ET_INDUSTRY_OPEN),
industry_id(industry_id) industry_id(industry_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -606,6 +636,7 @@ private:
*/ */
class ScriptEventIndustryClose : public ScriptEvent { class ScriptEventIndustryClose : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param industry_id The new industry. * @param industry_id The new industry.
*/ */
@ -613,6 +644,7 @@ public:
ScriptEvent(ET_INDUSTRY_CLOSE), ScriptEvent(ET_INDUSTRY_CLOSE),
industry_id(industry_id) industry_id(industry_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -637,6 +669,7 @@ private:
*/ */
class ScriptEventEngineAvailable : public ScriptEvent { class ScriptEventEngineAvailable : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param engine The engine that is available. * @param engine The engine that is available.
*/ */
@ -644,6 +677,7 @@ public:
ScriptEvent(ET_ENGINE_AVAILABLE), ScriptEvent(ET_ENGINE_AVAILABLE),
engine(engine) engine(engine)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -668,6 +702,7 @@ private:
*/ */
class ScriptEventStationFirstVehicle : public ScriptEvent { class ScriptEventStationFirstVehicle : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param station The station visited for the first time. * @param station The station visited for the first time.
* @param vehicle The vehicle visiting the station. * @param vehicle The vehicle visiting the station.
@ -677,6 +712,7 @@ public:
station(station), station(station),
vehicle(vehicle) vehicle(vehicle)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -708,6 +744,7 @@ private:
*/ */
class ScriptEventDisasterZeppelinerCrashed : public ScriptEvent { class ScriptEventDisasterZeppelinerCrashed : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param station The station containing the affected airport * @param station The station containing the affected airport
*/ */
@ -715,6 +752,7 @@ public:
ScriptEvent(ET_DISASTER_ZEPPELINER_CRASHED), ScriptEvent(ET_DISASTER_ZEPPELINER_CRASHED),
station(station) station(station)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -739,6 +777,7 @@ private:
*/ */
class ScriptEventDisasterZeppelinerCleared : public ScriptEvent { class ScriptEventDisasterZeppelinerCleared : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param station The station containing the affected airport * @param station The station containing the affected airport
*/ */
@ -746,6 +785,7 @@ public:
ScriptEvent(ET_DISASTER_ZEPPELINER_CLEARED), ScriptEvent(ET_DISASTER_ZEPPELINER_CLEARED),
station(station) station(station)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -770,6 +810,7 @@ private:
*/ */
class ScriptEventTownFounded : public ScriptEvent { class ScriptEventTownFounded : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param town The town that was created. * @param town The town that was created.
*/ */
@ -777,6 +818,7 @@ public:
ScriptEvent(ET_TOWN_FOUNDED), ScriptEvent(ET_TOWN_FOUNDED),
town(town) town(town)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -803,6 +845,7 @@ private:
*/ */
class ScriptEventAircraftDestTooFar : public ScriptEvent { class ScriptEventAircraftDestTooFar : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param vehicle_id The aircraft whose destination is too far away. * @param vehicle_id The aircraft whose destination is too far away.
*/ */
@ -810,6 +853,7 @@ public:
ScriptEvent(ET_AIRCRAFT_DEST_TOO_FAR), ScriptEvent(ET_AIRCRAFT_DEST_TOO_FAR),
vehicle_id(vehicle_id) vehicle_id(vehicle_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -834,10 +878,12 @@ private:
*/ */
class ScriptEventAdminPort : public ScriptEvent { class ScriptEventAdminPort : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param json The JSON string which got sent. * @param json The JSON string which got sent.
*/ */
ScriptEventAdminPort(const std::string &json); ScriptEventAdminPort(const std::string &json);
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -882,6 +928,7 @@ private:
*/ */
class ScriptEventWindowWidgetClick : public ScriptEvent { class ScriptEventWindowWidgetClick : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param window The windowclass that was clicked. * @param window The windowclass that was clicked.
* @param number The windownumber that was clicked. * @param number The windownumber that was clicked.
@ -893,6 +940,7 @@ public:
number(number), number(number),
widget(widget) widget(widget)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -930,6 +978,7 @@ private:
*/ */
class ScriptEventGoalQuestionAnswer : public ScriptEvent { class ScriptEventGoalQuestionAnswer : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param uniqueid The uniqueID you have given this question. * @param uniqueid The uniqueID you have given this question.
* @param company The company that is replying. * @param company The company that is replying.
@ -941,6 +990,7 @@ public:
company(company), company(company),
button(button) button(button)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -976,6 +1026,7 @@ private:
*/ */
class ScriptEventCompanyTown : public ScriptEvent { class ScriptEventCompanyTown : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param event The eventtype. * @param event The eventtype.
* @param company The company. * @param company The company.
@ -986,6 +1037,7 @@ public:
company(company), company(company),
town(town) town(town)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -1018,6 +1070,7 @@ private:
*/ */
class ScriptEventExclusiveTransportRights : public ScriptEventCompanyTown { class ScriptEventExclusiveTransportRights : public ScriptEventCompanyTown {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param company The company. * @param company The company.
* @param town The town. * @param town The town.
@ -1025,6 +1078,7 @@ public:
ScriptEventExclusiveTransportRights(ScriptCompany::CompanyID company, TownID town) : ScriptEventExclusiveTransportRights(ScriptCompany::CompanyID company, TownID town) :
ScriptEventCompanyTown(ET_EXCLUSIVE_TRANSPORT_RIGHTS, company, town) ScriptEventCompanyTown(ET_EXCLUSIVE_TRANSPORT_RIGHTS, company, town)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -1041,6 +1095,7 @@ public:
*/ */
class ScriptEventRoadReconstruction : public ScriptEventCompanyTown { class ScriptEventRoadReconstruction : public ScriptEventCompanyTown {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param company The company. * @param company The company.
* @param town The town. * @param town The town.
@ -1048,6 +1103,7 @@ public:
ScriptEventRoadReconstruction(ScriptCompany::CompanyID company, TownID town) : ScriptEventRoadReconstruction(ScriptCompany::CompanyID company, TownID town) :
ScriptEventCompanyTown(ET_ROAD_RECONSTRUCTION, company, town) ScriptEventCompanyTown(ET_ROAD_RECONSTRUCTION, company, town)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -1063,6 +1119,7 @@ public:
*/ */
class ScriptEventVehicleAutoReplaced : public ScriptEvent { class ScriptEventVehicleAutoReplaced : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param old_id The vehicle that has been replaced. * @param old_id The vehicle that has been replaced.
* @param new_id The vehicle that has been created in replacement. * @param new_id The vehicle that has been created in replacement.
@ -1072,6 +1129,7 @@ public:
old_id(old_id), old_id(old_id),
new_id(new_id) new_id(new_id)
{} {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -1103,6 +1161,7 @@ private:
*/ */
class ScriptEventStoryPageButtonClick : public ScriptEvent { class ScriptEventStoryPageButtonClick : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param company_id Which company triggered the event. * @param company_id Which company triggered the event.
* @param page_id Which page was the clicked button on. * @param page_id Which page was the clicked button on.
@ -1113,7 +1172,8 @@ public:
company_id((ScriptCompany::CompanyID)company_id), company_id((ScriptCompany::CompanyID)company_id),
page_id(page_id), page_id(page_id),
element_id(element_id) element_id(element_id)
{ } {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -1143,6 +1203,7 @@ private:
*/ */
class ScriptEventStoryPageTileSelect : public ScriptEvent { class ScriptEventStoryPageTileSelect : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param company_id Which company triggered the event. * @param company_id Which company triggered the event.
* @param page_id Which page is the used selection button on. * @param page_id Which page is the used selection button on.
@ -1155,7 +1216,8 @@ public:
page_id(page_id), page_id(page_id),
element_id(element_id), element_id(element_id),
tile_index(tile_index) tile_index(tile_index)
{ } {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.
@ -1189,6 +1251,7 @@ private:
*/ */
class ScriptEventStoryPageVehicleSelect : public ScriptEvent { class ScriptEventStoryPageVehicleSelect : public ScriptEvent {
public: public:
#ifndef DOXYGEN_API
/** /**
* @param company_id Which company triggered the event. * @param company_id Which company triggered the event.
* @param page_id Which page is the used selection button on. * @param page_id Which page is the used selection button on.
@ -1201,7 +1264,8 @@ public:
page_id(page_id), page_id(page_id),
element_id(element_id), element_id(element_id),
vehicle_id(vehicle_id) vehicle_id(vehicle_id)
{ } {}
#endif /* DOXYGEN_API */
/** /**
* Convert an ScriptEvent to the real instance. * Convert an ScriptEvent to the real instance.