Merge branch 'master' into jgrpp
# Conflicts: # src/clear_cmd.cpp # src/main_gui.cpp # src/saveload/newgrf_sl.cpp # src/water_cmd.cpp
This commit is contained in:
@@ -121,7 +121,6 @@ VERBATIM_HEADERS = NO
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
@@ -151,7 +150,7 @@ LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
PAPER_TYPE = a4
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
|
@@ -121,7 +121,6 @@ VERBATIM_HEADERS = NO
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
@@ -151,7 +150,7 @@ LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
PAPER_TYPE = a4
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
* @param station_id The basestation to set the name of.
|
||||
* @param name The new name of the station (can be either a raw string, or a ScriptText object).
|
||||
* @pre IsValidBaseStation(station_id).
|
||||
* @pre name != nullptr && len(name) != 0.
|
||||
* @pre name != null && len(name) != 0.
|
||||
* @game @pre Valid ScriptCompanyMode active in scope.
|
||||
* @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE
|
||||
* @return True if the name was changed.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file script_clientlist.hpp List all the TODO. */
|
||||
/** @file script_clientlist.hpp List all the clients in a game or in a company. */
|
||||
|
||||
#ifndef SCRIPT_CLIENTLIST_HPP
|
||||
#define SCRIPT_CLIENTLIST_HPP
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
class ScriptClientList_Company : public ScriptList {
|
||||
public:
|
||||
/**
|
||||
* @param company_id The company to list clients for.
|
||||
* @param company The company to list clients for.
|
||||
*/
|
||||
ScriptClientList_Company(ScriptCompany::CompanyID company);
|
||||
};
|
||||
|
@@ -138,7 +138,7 @@ public:
|
||||
/**
|
||||
* Set the name of your company.
|
||||
* @param name The new name of the company (can be either a raw string, or a ScriptText object).
|
||||
* @pre name != nullptr && len(name) != 0.
|
||||
* @pre name != null && len(name) != 0.
|
||||
* @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE
|
||||
* @return True if the name was changed.
|
||||
*/
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
/**
|
||||
* Set the name of your president.
|
||||
* @param name The new name of the president (can be either a raw string, or a ScriptText object).
|
||||
* @pre name != nullptr && len(name) != 0.
|
||||
* @pre name != null && len(name) != 0.
|
||||
* @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE
|
||||
* @return True if the name was changed.
|
||||
*/
|
||||
|
@@ -61,6 +61,7 @@ public:
|
||||
|
||||
/**
|
||||
* Constructor of ScriptEvent, to get the type of event.
|
||||
* @param type The type of event to construct.
|
||||
*/
|
||||
ScriptEvent(ScriptEvent::ScriptEventType type) :
|
||||
type(type)
|
||||
|
@@ -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:
|
||||
|
@@ -53,6 +53,7 @@ public:
|
||||
|
||||
/**
|
||||
* Get the current landscape.
|
||||
* @return The type of landscape.
|
||||
*/
|
||||
static LandscapeType GetLandscape();
|
||||
|
||||
|
@@ -97,7 +97,7 @@ public:
|
||||
* @param destination The destination of the \a type type.
|
||||
* @return The new GoalID, or GOAL_INVALID if it failed.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre goal != nullptr && len(goal) != 0.
|
||||
* @pre goal != null && len(goal) != 0.
|
||||
* @pre company == COMPANY_INVALID || ResolveCompanyID(company) != COMPANY_INVALID.
|
||||
* @pre if type is GT_STORY_PAGE, the company of the goal and the company of the story page need to match:
|
||||
* \li Global goals can only reference global story pages.
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
* @param goal The new goal text (can be either a raw string, or a ScriptText object).
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre goal != nullptr && len(goal) != 0.
|
||||
* @pre goal != null && len(goal) != 0.
|
||||
* @pre IsValidGoal(goal_id).
|
||||
*/
|
||||
static bool SetText(GoalID goal_id, Text *goal);
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
* the progress string short.
|
||||
* @param goal_id The goal to update.
|
||||
* @param progress The new progress text for the goal (can be either a raw string,
|
||||
* or a ScriptText object). To clear the progress string you can pass nullptr or an
|
||||
* or a ScriptText object). To clear the progress string you can pass null or an
|
||||
* empty string.
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
* @param buttons Any combinations (at least 1, up to 3) of buttons defined in QuestionButton. Like BUTTON_YES + BUTTON_NO.
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre question != nullptr && len(question) != 0.
|
||||
* @pre question != null && len(question) != 0.
|
||||
* @pre company == COMPANY_INVALID || ResolveCompanyID(company) != COMPANY_INVALID.
|
||||
* @pre CountBits(buttons) >= 1 && CountBits(buttons) <= 3.
|
||||
* @note Replies to the question are given by you via the event ScriptEvent_GoalQuestionAnswer.
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre ScriptGame::IsMultiplayer()
|
||||
* @pre question != nullptr && len(question) != 0.
|
||||
* @pre question != null && len(question) != 0.
|
||||
* @pre ResolveClientID(client) != CLIENT_INVALID.
|
||||
* @pre CountBits(buttons) >= 1 && CountBits(buttons) <= 3.
|
||||
* @note Replies to the question are given by you via the event ScriptEvent_GoalQuestionAnswer.
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
* @param group_id The group to set the name for.
|
||||
* @param name The name for the group (can be either a raw string, or a ScriptText object).
|
||||
* @pre IsValidGroup(group_id).
|
||||
* @pre name != nullptr && len(name) != 0
|
||||
* @pre name != null && len(name) != 0
|
||||
* @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE
|
||||
* @return True if and only if the name was changed.
|
||||
*/
|
||||
@@ -232,6 +232,7 @@ public:
|
||||
* @param group_id The group id to set the colour of.
|
||||
* @param colour Colour to set.
|
||||
* @pre IsValidGroup(group_id).
|
||||
* @return True iff the colour was set successfully.
|
||||
*/
|
||||
static bool SetPrimaryColour(GroupID group_id, ScriptCompany::Colours colour);
|
||||
|
||||
@@ -240,6 +241,7 @@ public:
|
||||
* @param group_id The group id to set the colour of.
|
||||
* @param colour Colour to set.
|
||||
* @pre IsValidGroup(group_id).
|
||||
* @return True iff the colour was set successfully.
|
||||
*/
|
||||
static bool SetSecondaryColour(GroupID group_id, ScriptCompany::Colours colour);
|
||||
|
||||
@@ -247,6 +249,7 @@ public:
|
||||
* Get primary colour of a group.
|
||||
* @param group_id The group id to get the colour of.
|
||||
* @pre IsValidGroup(group_id).
|
||||
* @return The primary colour of the group.
|
||||
*/
|
||||
static ScriptCompany::Colours GetPrimaryColour(GroupID group_id);
|
||||
|
||||
@@ -254,6 +257,7 @@ public:
|
||||
* Get secondary colour for a group.
|
||||
* @param group_id The group id to get the colour of.
|
||||
* @pre IsValidGroup(group_id).
|
||||
* @return The secondary colour of the group.
|
||||
*/
|
||||
static ScriptCompany::Colours GetSecondaryColour(GroupID group_id);
|
||||
};
|
||||
|
@@ -184,7 +184,7 @@ public:
|
||||
|
||||
/**
|
||||
* Get a specific industry-type from a grf.
|
||||
* @param grf_id The ID of the NewGRF.
|
||||
* @param grfid The ID of the NewGRF.
|
||||
* @param grf_local_id The ID of the industry, local to the NewGRF.
|
||||
* @pre 0x00 <= grf_local_id < NUM_INDUSTRYTYPES_PER_GRF.
|
||||
* @return the industry-type ID, local to the current game (this diverges from the grf_local_id).
|
||||
|
@@ -68,9 +68,11 @@ public:
|
||||
/**
|
||||
* Create a new league table.
|
||||
* @param title League table title (can be either a raw string, or ScriptText object).
|
||||
* @param header The optional header text for the table (null is allowed).
|
||||
* @param footer The optional footer text for the table (null is allowed).
|
||||
* @return The new LeagueTableID, or LEAGUE_TABLE_INVALID if it failed.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre title != nullptr && len(title) != 0.
|
||||
* @pre title != null && len(title) != 0.
|
||||
*/
|
||||
static LeagueTableID New(Text *title, Text *header, Text *footer);
|
||||
|
||||
@@ -86,8 +88,8 @@ public:
|
||||
* @return The new LeagueTableElementID, or LEAGUE_TABLE_ELEMENT_INVALID if it failed.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre IsValidLeagueTable(table).
|
||||
* @pre text != nullptr && len(text) != 0.
|
||||
* @pre score != nullptr && len(score) != 0.
|
||||
* @pre text != null && len(text) != 0.
|
||||
* @pre score != null && len(score) != 0.
|
||||
* @pre IsValidLink(Link(link_type, link_target)).
|
||||
*/
|
||||
static LeagueTableElementID NewElement(LeagueTableID table, int64 rating, ScriptCompany::CompanyID company, Text *text, Text *score, LinkType link_type, LinkTargetID link_target);
|
||||
@@ -102,7 +104,7 @@ public:
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre IsValidLeagueTableElement(element).
|
||||
* @pre text != nullptr && len(text) != 0.
|
||||
* @pre text != null && len(text) != 0.
|
||||
* @pre IsValidLink(Link(link_type, link_target)).
|
||||
*/
|
||||
static bool UpdateElementData(LeagueTableElementID element, ScriptCompany::CompanyID company, Text *text, LinkType link_type, LinkTargetID link_target);
|
||||
@@ -115,7 +117,7 @@ public:
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre IsValidLeagueTableElement(element).
|
||||
* @pre score != nullptr && len(score) != 0.
|
||||
* @pre score != null && len(score) != 0.
|
||||
*/
|
||||
static bool UpdateElementScore(LeagueTableElementID element, int64 rating, Text *score);
|
||||
|
||||
|
@@ -196,7 +196,7 @@ public:
|
||||
/**
|
||||
* Remove everything that is in the given list from this list (same item index that is).
|
||||
* @param list the list of items to remove.
|
||||
* @pre list != nullptr
|
||||
* @pre list != null
|
||||
*/
|
||||
void RemoveList(ScriptList *list);
|
||||
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
/**
|
||||
* Keeps everything that is in the given list from this list (same item index that is).
|
||||
* @param list the list of items to keep.
|
||||
* @pre list != nullptr
|
||||
* @pre list != null
|
||||
*/
|
||||
void KeepList(ScriptList *list);
|
||||
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
* Get the name of a loaded NewGRF.
|
||||
* @param grfid The NewGRF to query.
|
||||
* @pre ScriptNewGRF::IsLoaded(grfid).
|
||||
* @return The name of the NewGRF or nullptr if no name is defined.
|
||||
* @return The name of the NewGRF or null if no name is defined.
|
||||
*/
|
||||
static char *GetName(uint32 grfid);
|
||||
};
|
||||
|
@@ -59,7 +59,7 @@ public:
|
||||
* - For #NR_TOWN this parameter should be a valid townID (ScriptTown::IsValidTown).
|
||||
* @return True if the action succeeded.
|
||||
* @pre type must be #NT_ECONOMY, #NT_SUBSIDIES, or #NT_GENERAL.
|
||||
* @pre text != nullptr.
|
||||
* @pre text != null.
|
||||
* @pre company == COMPANY_INVALID || ResolveCompanyID(company) != COMPANY_INVALID.
|
||||
* @pre The \a reference condition must be fulfilled.
|
||||
*/
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
/**
|
||||
* Get a specific object-type from a grf.
|
||||
* @param grf_id The ID of the NewGRF.
|
||||
* @param grfid The ID of the NewGRF.
|
||||
* @param grf_local_id The ID of the object, local to the NewGRF.
|
||||
* @pre 0x00 <= grf_local_id < NUM_OBJECTS_PER_GRF.
|
||||
* @return the object-type ID, local to the current game (this diverges from the grf_local_id).
|
||||
|
@@ -61,6 +61,7 @@ public:
|
||||
|
||||
/**
|
||||
* Check if an items is already included in the queue.
|
||||
* @param item The item to check whether it's already in this queue.
|
||||
* @return true if the items is already in the queue.
|
||||
* @note Performance is O(n), use only when absolutely required.
|
||||
*/
|
||||
|
@@ -160,7 +160,7 @@ public:
|
||||
/**
|
||||
* Check if a road vehicle built for a road type can run on another road type.
|
||||
* @param engine_road_type The road type the road vehicle is built for.
|
||||
* @param track_road_type The road type you want to check.
|
||||
* @param road_road_type The road type you want to check.
|
||||
* @pre ScriptRoad::IsRoadTypeAvailable(engine_road_type).
|
||||
* @pre ScriptRoad::IsRoadTypeAvailable(road_road_type).
|
||||
* @return Whether a road vehicle built for 'engine_road_type' can run on 'road_road_type'.
|
||||
@@ -405,7 +405,6 @@ public:
|
||||
* one-way in the other direction, it's made a 'no'-way road (it's
|
||||
* forbidden to enter the tile from any direction).
|
||||
* @param start The start tile of the road.
|
||||
* @param start The start tile of the road.
|
||||
* @param end The end tile of the road.
|
||||
* @pre 'start' is not equal to 'end'.
|
||||
* @pre ScriptMap::IsValidTile(start).
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
* @param sign_id The sign to set the name for.
|
||||
* @param name The name for the sign (can be either a raw string, or a ScriptText object).
|
||||
* @pre IsValidSign(sign_id).
|
||||
* @pre name != nullptr && len(name) != 0.
|
||||
* @pre name != null && len(name) != 0.
|
||||
* @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE
|
||||
* @return True if and only if the name was changed.
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
* @param location The place to build the sign.
|
||||
* @param name The text to place on the sign (can be either a raw string, or a ScriptText object).
|
||||
* @pre ScriptMap::IsValidTile(location).
|
||||
* @pre name != nullptr && len(name) != 0.
|
||||
* @pre name != null && len(name) != 0.
|
||||
* @exception ScriptSign::ERR_SIGN_TOO_MANY_SIGNS
|
||||
* @return The SignID of the build sign (use IsValidSign() to check for validity).
|
||||
* In test-mode it returns 0 if successful, or any other value to indicate
|
||||
|
@@ -202,7 +202,7 @@ public:
|
||||
* @return The new StoryPageElementID, or STORY_PAGE_ELEMENT_INVALID if it failed.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre IsValidStoryPage(story_page).
|
||||
* @pre (type != SPET_TEXT && type != SPET_LOCATION) || (text != nullptr && len(text) != 0).
|
||||
* @pre (type != SPET_TEXT && type != SPET_LOCATION) || (text != null && len(text) != 0).
|
||||
* @pre type != SPET_LOCATION || ScriptMap::IsValidTile(reference).
|
||||
* @pre type != SPET_GOAL || ScriptGoal::IsValidGoal(reference).
|
||||
* @pre if type is SPET_GOAL and story_page is a global page, then referenced goal must be global.
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
* @return True if the action succeeded.
|
||||
* @pre No ScriptCompanyMode may be in scope.
|
||||
* @pre IsValidStoryPage(story_page).
|
||||
* @pre (type != SPET_TEXT && type != SPET_LOCATION) || (text != nullptr && len(text) != 0).
|
||||
* @pre (type != SPET_TEXT && type != SPET_LOCATION) || (text != null && len(text) != 0).
|
||||
* @pre type != SPET_LOCATION || ScriptMap::IsValidTile(reference).
|
||||
* @pre type != SPET_GOAL || ScriptGoal::IsValidGoal(reference).
|
||||
* @pre if type is SPET_GOAL and story_page is a global page, then referenced goal must be global.
|
||||
@@ -315,6 +315,7 @@ public:
|
||||
/**
|
||||
* Create a reference value for SPET_BUTTON_PUSH element parameters.
|
||||
* @param colour The colour for the face of the button.
|
||||
* @param flags The formatting and layout flags for the button.
|
||||
* @return A reference value usable with the #NewElement and #UpdateElement functions.
|
||||
*/
|
||||
static StoryPageButtonFormatting MakePushButtonReference(StoryPageButtonColour colour, StoryPageButtonFlags flags);
|
||||
@@ -322,6 +323,7 @@ public:
|
||||
/**
|
||||
* Create a reference value for SPET_BUTTON_TILE element parameters.
|
||||
* @param colour The colour for the face of the button.
|
||||
* @param flags The formatting and layout flags for the button.
|
||||
* @param cursor The mouse cursor to use when the player clicks the button and the game is ready for the player to select a tile.
|
||||
* @return A reference value usable with the #NewElement and #UpdateElement functions.
|
||||
*/
|
||||
@@ -330,6 +332,7 @@ public:
|
||||
/**
|
||||
* Create a reference value for SPET_BUTTON_VEHICLE element parameters.
|
||||
* @param colour The colour for the face of the button.
|
||||
* @param flags The formatting and layout flags for the button.
|
||||
* @param cursor The mouse cursor to use when the player clicks the button and the game is ready for the player to select a vehicle.
|
||||
* @param vehtype The type of vehicle that will be selectable, or \c VT_INVALID to allow all types.
|
||||
* @return A reference value usable with the #NewElement and #UpdateElement functions.
|
||||
|
@@ -400,7 +400,7 @@ public:
|
||||
* @param size The town size of the new town.
|
||||
* @param city True if the new town should be a city.
|
||||
* @param layout The town layout of the new town.
|
||||
* @param name The name of the new town. Pass nullptr to use a random town name.
|
||||
* @param name The name of the new town. Pass null to use a random town name.
|
||||
* @game @pre no company mode in scope || ScriptSettings.GetValue("economy.found_town") != 0.
|
||||
* @ai @pre ScriptSettings.GetValue("economy.found_town") != 0.
|
||||
* @game @pre no company mode in scope || size != TOWN_SIZE_LARGE.
|
||||
|
@@ -113,7 +113,7 @@ public:
|
||||
* @param vehicle_id The vehicle to set the name for.
|
||||
* @param name The name for the vehicle (can be either a raw string, or a ScriptText object).
|
||||
* @pre IsValidVehicle(vehicle_id).
|
||||
* @pre name != nullptr && len(name) != 0.
|
||||
* @pre name != null && len(name) != 0.
|
||||
* @game @pre Valid ScriptCompanyMode active in scope.
|
||||
* @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE
|
||||
* @return True if and only if the name was changed.
|
||||
|
@@ -35,6 +35,7 @@ public:
|
||||
* @param tile The tile to put in the center of the screen.
|
||||
* @pre ScriptObject::GetCompany() == OWNER_DEITY
|
||||
* @pre ScriptMap::IsValidTile(tile)
|
||||
* @return True iff the command was executed successfully.
|
||||
*/
|
||||
static bool ScrollEveryoneTo(TileIndex tile);
|
||||
|
||||
@@ -46,6 +47,7 @@ public:
|
||||
* @pre ScriptObject::GetCompany() == OWNER_DEITY
|
||||
* @pre ScriptMap::IsValidTile(tile)
|
||||
* @pre ResolveCompanyID(company) != COMPANY_INVALID
|
||||
* @return True iff the command was executed successfully.
|
||||
*/
|
||||
static bool ScrollCompanyClientsTo(ScriptCompany::CompanyID company, TileIndex tile);
|
||||
|
||||
@@ -58,6 +60,7 @@ public:
|
||||
* @pre ScriptObject::GetCompany() == OWNER_DEITY
|
||||
* @pre ScriptMap::IsValidTile(tile)
|
||||
* @pre ResolveClientID(client) != CLIENT_INVALID
|
||||
* @return True iff the command was executed successfully.
|
||||
*/
|
||||
static bool ScrollClientTo(ScriptClient::ClientID client, TileIndex tile);
|
||||
};
|
||||
|
Reference in New Issue
Block a user