Changeset - r26800:bc2df8c09f6b
[Not reviewed]
master
0 1 0
Rubidium - 17 months ago 2023-01-25 20:40:38
rubidium@openttd.org
Fix: scripts cannot call constructors of ScriptEvents, so remove from the documentation
1 file changed with 67 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_event_types.hpp
Show inline comments
 
@@ -30,23 +30,25 @@ public:
 
		CRASH_RV_UFO,               ///< Road vehicle got under a landing ufo
 
		CRASH_PLANE_LANDING,        ///< Plane crashed on landing
 
		CRASH_AIRCRAFT_NO_AIRPORT,  ///< Aircraft crashed after it found not a single airport for landing
 
		CRASH_FLOODED,              ///< Vehicle was flooded
 
	};
 

	
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param vehicle The vehicle that crashed.
 
	 * @param crash_site Where the vehicle crashed.
 
	 * @param crash_reason The reason why the vehicle crashed.
 
	 */
 
	ScriptEventVehicleCrashed(VehicleID vehicle, TileIndex crash_site, CrashReason crash_reason) :
 
		ScriptEvent(ET_VEHICLE_CRASHED),
 
		crash_site(crash_site),
 
		vehicle(vehicle),
 
		crash_reason(crash_reason)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -79,19 +81,21 @@ private:
 
/**
 
 * Event Subsidy Offered, indicating someone offered a subsidy.
 
 * @api ai game
 
 */
 
class ScriptEventSubsidyOffer : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param subsidy_id The index of this subsidy in the _subsidies array.
 
	 */
 
	ScriptEventSubsidyOffer(SubsidyID subsidy_id) :
 
		ScriptEvent(ET_SUBSIDY_OFFER),
 
		subsidy_id(subsidy_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -110,19 +114,21 @@ private:
 
/**
 
 * Event Subsidy Offer Expired, indicating a subsidy will no longer be awarded.
 
 * @api ai game
 
 */
 
class ScriptEventSubsidyOfferExpired : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param subsidy_id The index of this subsidy in the _subsidies array.
 
	 */
 
	ScriptEventSubsidyOfferExpired(SubsidyID subsidy_id) :
 
		ScriptEvent(ET_SUBSIDY_OFFER_EXPIRED),
 
		subsidy_id(subsidy_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -141,19 +147,21 @@ private:
 
/**
 
 * Event Subsidy Awarded, indicating a subsidy is awarded to some company.
 
 * @api ai game
 
 */
 
class ScriptEventSubsidyAwarded : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param subsidy_id The index of this subsidy in the _subsidies array.
 
	 */
 
	ScriptEventSubsidyAwarded(SubsidyID subsidy_id) :
 
		ScriptEvent(ET_SUBSIDY_AWARDED),
 
		subsidy_id(subsidy_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -172,19 +180,21 @@ private:
 
/**
 
 * Event Subsidy Expired, indicating a route that was once subsidized no longer is.
 
 * @api ai game
 
 */
 
class ScriptEventSubsidyExpired : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param subsidy_id The index of this subsidy in the _subsidies array.
 
	 */
 
	ScriptEventSubsidyExpired(SubsidyID subsidy_id) :
 
		ScriptEvent(ET_SUBSIDY_EXPIRED),
 
		subsidy_id(subsidy_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -205,19 +215,21 @@ private:
 
 *  You can get the same information about the offered engine as a real user
 
 *  would see in the offer window. And you can also accept the offer.
 
 * @api ai
 
 */
 
class ScriptEventEnginePreview : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param engine The engine offered to test.
 
	 */
 
	ScriptEventEnginePreview(EngineID engine) :
 
		ScriptEvent(ET_ENGINE_PREVIEW),
 
		engine(engine)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -294,19 +306,21 @@ private:
 
/**
 
 * Event Company New, indicating a new company has been created.
 
 * @api ai game
 
 */
 
class ScriptEventCompanyNew : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param owner The new company.
 
	 */
 
	ScriptEventCompanyNew(Owner owner) :
 
		ScriptEvent(ET_COMPANY_NEW),
 
		owner((ScriptCompany::CompanyID)owner)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -326,19 +340,21 @@ private:
 
 * Event Company In Trouble, indicating a company is in trouble and might go
 
 *  bankrupt soon.
 
 * @api ai game
 
 */
 
class ScriptEventCompanyInTrouble : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param owner The company that is in trouble.
 
	 */
 
	ScriptEventCompanyInTrouble(Owner owner) :
 
		ScriptEvent(ET_COMPANY_IN_TROUBLE),
 
		owner((ScriptCompany::CompanyID)owner)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -357,21 +373,23 @@ private:
 
/**
 
 * Event Company Ask Merger, indicating a company can be bought (cheaply) by you.
 
 * @api ai
 
 */
 
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.
 
	 */
 
	ScriptEventCompanyAskMerger(Owner owner, int32 value) :
 
		ScriptEvent(ET_COMPANY_ASK_MERGER),
 
		owner((ScriptCompany::CompanyID)owner),
 
		value(value)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -405,21 +423,23 @@ private:
 
 * Event Company Merger, indicating a company has been bought by another
 
 *  company.
 
 * @api ai game
 
 */
 
class ScriptEventCompanyMerger : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param old_owner The company bought off.
 
	 * @param new_owner The company that bought owner.
 
	 */
 
	ScriptEventCompanyMerger(Owner old_owner, Owner new_owner) :
 
		ScriptEvent(ET_COMPANY_MERGER),
 
		old_owner((ScriptCompany::CompanyID)old_owner),
 
		new_owner((ScriptCompany::CompanyID)new_owner)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -448,19 +468,21 @@ private:
 
/**
 
 * Event Company Bankrupt, indicating a company has gone bankrupt.
 
 * @api ai game
 
 */
 
class ScriptEventCompanyBankrupt : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param owner The company that has gone bankrupt.
 
	 */
 
	ScriptEventCompanyBankrupt(Owner owner) :
 
		ScriptEvent(ET_COMPANY_BANKRUPT),
 
		owner((ScriptCompany::CompanyID)owner)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -479,19 +501,21 @@ private:
 
/**
 
 * Event Vehicle Lost, indicating a vehicle can't find its way to its destination.
 
 * @api ai
 
 */
 
class ScriptEventVehicleLost : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param vehicle_id The vehicle that is lost.
 
	 */
 
	ScriptEventVehicleLost(VehicleID vehicle_id) :
 
		ScriptEvent(ET_VEHICLE_LOST),
 
		vehicle_id(vehicle_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -510,19 +534,21 @@ private:
 
/**
 
 * Event VehicleWaitingInDepot, indicating a vehicle has arrived a depot and is now waiting there.
 
 * @api ai
 
 */
 
class ScriptEventVehicleWaitingInDepot : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param vehicle_id The vehicle that is waiting in a depot.
 
	 */
 
	ScriptEventVehicleWaitingInDepot(VehicleID vehicle_id) :
 
		ScriptEvent(ET_VEHICLE_WAITING_IN_DEPOT),
 
		vehicle_id(vehicle_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -541,19 +567,21 @@ private:
 
/**
 
 * Event Vehicle Unprofitable, indicating a vehicle lost money last year.
 
 * @api ai
 
 */
 
class ScriptEventVehicleUnprofitable : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param vehicle_id The vehicle that was unprofitable.
 
	 */
 
	ScriptEventVehicleUnprofitable(VehicleID vehicle_id) :
 
		ScriptEvent(ET_VEHICLE_UNPROFITABLE),
 
		vehicle_id(vehicle_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -572,19 +600,21 @@ private:
 
/**
 
 * Event Industry Open, indicating a new industry has been created.
 
 * @api ai game
 
 */
 
class ScriptEventIndustryOpen : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param industry_id The new industry.
 
	 */
 
	ScriptEventIndustryOpen(IndustryID industry_id) :
 
		ScriptEvent(ET_INDUSTRY_OPEN),
 
		industry_id(industry_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -603,19 +633,21 @@ private:
 
/**
 
 * Event Industry Close, indicating an industry is going to be closed.
 
 * @api ai game
 
 */
 
class ScriptEventIndustryClose : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param industry_id The new industry.
 
	 */
 
	ScriptEventIndustryClose(IndustryID industry_id) :
 
		ScriptEvent(ET_INDUSTRY_CLOSE),
 
		industry_id(industry_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -634,19 +666,21 @@ private:
 
/**
 
 * Event Engine Available, indicating a new engine is available.
 
 * @api ai
 
 */
 
class ScriptEventEngineAvailable : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param engine The engine that is available.
 
	 */
 
	ScriptEventEngineAvailable(EngineID engine) :
 
		ScriptEvent(ET_ENGINE_AVAILABLE),
 
		engine(engine)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -665,21 +699,23 @@ private:
 
/**
 
 * Event Station First Vehicle, indicating a station has been visited by a vehicle for the first time.
 
 * @api ai game
 
 */
 
class ScriptEventStationFirstVehicle : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param station The station visited for the first time.
 
	 * @param vehicle The vehicle visiting the station.
 
	 */
 
	ScriptEventStationFirstVehicle(StationID station, VehicleID vehicle) :
 
		ScriptEvent(ET_STATION_FIRST_VEHICLE),
 
		station(station),
 
		vehicle(vehicle)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -705,19 +741,21 @@ private:
 
/**
 
 * Event Disaster Zeppeliner Crashed, indicating a zeppeliner has crashed on an airport and is blocking the runway.
 
 * @api ai
 
 */
 
class ScriptEventDisasterZeppelinerCrashed : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param station The station containing the affected airport
 
	 */
 
	ScriptEventDisasterZeppelinerCrashed(StationID station) :
 
		ScriptEvent(ET_DISASTER_ZEPPELINER_CRASHED),
 
		station(station)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -736,19 +774,21 @@ private:
 
/**
 
 * Event Disaster Zeppeliner Cleared, indicating a previously crashed zeppeliner has been removed, and the airport is operating again.
 
 * @api ai
 
 */
 
class ScriptEventDisasterZeppelinerCleared : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param station The station containing the affected airport
 
	 */
 
	ScriptEventDisasterZeppelinerCleared(StationID station) :
 
		ScriptEvent(ET_DISASTER_ZEPPELINER_CLEARED),
 
		station(station)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -767,19 +807,21 @@ private:
 
/**
 
 * Event Town Founded, indicating a new town has been created.
 
 * @api ai game
 
 */
 
class ScriptEventTownFounded : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param town The town that was created.
 
	 */
 
	ScriptEventTownFounded(TownID town) :
 
		ScriptEvent(ET_TOWN_FOUNDED),
 
		town(town)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -800,19 +842,21 @@ private:
 
 * This event can be triggered when the current order of an aircraft changes, usually either when
 
 * loading is done or when switched manually.
 
 * @api ai
 
 */
 
class ScriptEventAircraftDestTooFar : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param vehicle_id The aircraft whose destination is too far away.
 
	 */
 
	ScriptEventAircraftDestTooFar(VehicleID vehicle_id) :
 
		ScriptEvent(ET_AIRCRAFT_DEST_TOO_FAR),
 
		vehicle_id(vehicle_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -831,16 +875,18 @@ private:
 
/**
 
 * Event Admin Port, indicating the admin port is sending you information.
 
 * @api game
 
 */
 
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.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -879,23 +925,25 @@ private:
 
/**
 
 * Event Window Widget Click, when a user clicks on a highlighted widget.
 
 * @api game
 
 */
 
class ScriptEventWindowWidgetClick : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param window The windowclass that was clicked.
 
	 * @param number The windownumber that was clicked.
 
	 * @param widget The widget in the window that was clicked.
 
	 */
 
	ScriptEventWindowWidgetClick(ScriptWindow::WindowClass window, uint32 number, uint8 widget) :
 
		ScriptEvent(ET_WINDOW_WIDGET_CLICK),
 
		window(window),
 
		number(number),
 
		widget(widget)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -927,23 +975,25 @@ private:
 
 * @note It is possible that you get more than 1 answer from the same company
 
 *  (due to lag). Please keep this in mind while handling this event.
 
 * @api game
 
 */
 
class ScriptEventGoalQuestionAnswer : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param uniqueid The uniqueID you have given this question.
 
	 * @param company The company that is replying.
 
	 * @param button The button the company pressed.
 
	 */
 
	ScriptEventGoalQuestionAnswer(uint16 uniqueid, ScriptCompany::CompanyID company, ScriptGoal::QuestionButton button) :
 
		ScriptEvent(ET_GOAL_QUESTION_ANSWER),
 
		uniqueid(uniqueid),
 
		company(company),
 
		button(button)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -973,22 +1023,24 @@ private:
 
/**
 
 * Base class for events involving a town and a company.
 
 * @api ai game
 
 */
 
class ScriptEventCompanyTown : public ScriptEvent {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param event The eventtype.
 
	 * @param company The company.
 
	 * @param town The town.
 
	 */
 
	ScriptEventCompanyTown(ScriptEventType event, ScriptCompany::CompanyID company, TownID town) :
 
		ScriptEvent(event),
 
		company(company),
 
		town(town)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -1015,19 +1067,21 @@ private:
 
 * Event Exclusive Transport Rights, indicating that company bought
 
 * exclusive transport rights in a town.
 
 * @api ai game
 
 */
 
class ScriptEventExclusiveTransportRights : public ScriptEventCompanyTown {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param company The company.
 
	 * @param town The town.
 
	 */
 
	ScriptEventExclusiveTransportRights(ScriptCompany::CompanyID company, TownID town) :
 
		ScriptEventCompanyTown(ET_EXCLUSIVE_TRANSPORT_RIGHTS, company, town)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -1038,19 +1092,21 @@ public:
 
 * Event Road Reconstruction, indicating that company triggered
 
 * road reconstructions in a town.
 
 * @api ai game
 
 */
 
class ScriptEventRoadReconstruction : public ScriptEventCompanyTown {
 
public:
 
#ifndef DOXYGEN_API
 
	/**
 
	 * @param company The company.
 
	 * @param town The town.
 
	 */
 
	ScriptEventRoadReconstruction(ScriptCompany::CompanyID company, TownID town) :
 
		ScriptEventCompanyTown(ET_ROAD_RECONSTRUCTION, company, town)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -1060,21 +1116,23 @@ public:
 
/**
 
 * Event VehicleAutoReplaced, indicating a vehicle has been auto replaced.
 
 * @api ai
 
 */
 
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.
 
	 */
 
	ScriptEventVehicleAutoReplaced(VehicleID old_id, VehicleID new_id) :
 
		ScriptEvent(ET_VEHICLE_AUTOREPLACED),
 
		old_id(old_id),
 
		new_id(new_id)
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -1100,23 +1158,25 @@ private:
 
/**
 
 * Event StoryPageButtonClick, indicating a player clicked a push button on a storybook page.
 
 * @api game
 
 */
 
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.
 
	 * @param element_id  Which button element was clicked.
 
	 */
 
	ScriptEventStoryPageButtonClick(CompanyID company_id, StoryPageID page_id, StoryPageElementID element_id) :
 
		ScriptEvent(ET_STORYPAGE_BUTTON_CLICK),
 
		company_id((ScriptCompany::CompanyID)company_id),
 
		page_id(page_id),
 
		element_id(element_id)
 
	{ }
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -1140,25 +1200,27 @@ private:
 
/**
 
 * Event StoryPageTileSelect, indicating a player clicked a tile selection button on a storybook page, and selected a tile.
 
 * @api game
 
 */
 
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.
 
	 * @param element_id  Which button element was used to select the tile.
 
	 * @param tile_index  Which tile was selected by the player.
 
	 */
 
	ScriptEventStoryPageTileSelect(CompanyID company_id, StoryPageID page_id, StoryPageElementID element_id, TileIndex tile_index) :
 
		ScriptEvent(ET_STORYPAGE_TILE_SELECT),
 
		company_id((ScriptCompany::CompanyID)company_id),
 
		page_id(page_id),
 
		element_id(element_id),
 
		tile_index(tile_index)
 
	{ }
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
 
@@ -1186,25 +1248,27 @@ private:
 
/**
 
 * Event StoryPageTileSelect, indicating a player clicked a tile selection button on a storybook page, and selected a tile.
 
 * @api game
 
 */
 
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.
 
	 * @param element_id  Which button element was used to select the tile.
 
	 * @param vehicle_id  Which vehicle was selected by the player.
 
	 */
 
	ScriptEventStoryPageVehicleSelect(CompanyID company_id, StoryPageID page_id, StoryPageElementID element_id, VehicleID vehicle_id) :
 
		ScriptEvent(ET_STORYPAGE_VEHICLE_SELECT),
 
		company_id((ScriptCompany::CompanyID)company_id),
 
		page_id(page_id),
 
		element_id(element_id),
 
		vehicle_id(vehicle_id)
 
	{ }
 
	{}
 
#endif /* DOXYGEN_API */
 

	
 
	/**
 
	 * Convert an ScriptEvent to the real instance.
 
	 * @param instance The instance to convert.
 
	 * @return The converted instance.
 
	 */
0 comments (0 inline, 0 general)