The player parameter in these functions represents the player that executes the command and pays for it. If the call is from an AI player then the parameter is set to player_x::self, and it will be checked whether the player is permitted to execute the command. Calls from scenario always pass this check.
In network games, the script is suspended until the command is executed, which is transparent to the script. Hence such commands cannot be called from within functions that should return immediately, see Functions that should return quickly..
◆ append_vehicle()
Append a car to the convoy in this depot. If the convoy does not exist, a new one is created first.
- Parameters
-
pl | player owns the convoy |
cnv | the convoy |
desc | decriptor of the vehicle |
◆ change_schedule() [1/2]
Change schedule of line. Schedule should not contain doubled entries and more than two entries.
◆ change_schedule() [2/2]
Change schedule of convoy. Schedule should not contain doubled entries and more than two entries. This might make the convoy lose its line.
◆ change_size()
string city_x::change_size |
( |
integer |
delta | ) |
|
Change city size. City will immediately grow.
- Parameters
-
delta | City size will change by this number. |
◆ create()
static string label_x::create |
( |
coord |
pos, |
|
|
player_x |
pl, |
|
|
string |
text |
|
) |
| |
|
static |
Creates a new marker.
- Parameters
-
pos | position |
pl | owner |
text | text |
◆ create_line()
Creates a new line for the player of the given way type.
- Parameters
-
◆ destroy() [1/2]
◆ destroy() [2/2]
Destroy the convoy. The convoy will be marked for destroying, it will be destroyed when the simulation continues. Call sleep to be sure that the convoy is destroyed before script continues.
◆ remove_object()
Remove object of given type from the tile. Type type
must be one of the following: mo_label, mo_pedestrian, mo_city_car, mo_powerline, mo_transformer_s, mo_transformer_c, mo_signal, mo_roadsign, mo_wayobj, mo_tunnel, mo_bridge, mo_field, mo_building, mo_depot_rail. Setting type
to mo_depot_rail deletes depots of every type.
- Parameters
-
pl | player that pays for removal |
type | object type |
- Returns
- null upon success, an error message otherwise
- Warning
- Does not work with all object types.
◆ set_citygrowth_enabled()
void city_x::set_citygrowth_enabled |
( |
bool |
| ) |
|
Enable or disable city growth.
◆ set_line()
Assigns the convoy to the given line.
- Parameters
-
◆ start_all_convoys()
void depot_x::start_all_convoys |
( |
player_x |
| ) |
|
Start all convoys in this depot.
◆ start_convoy()
Start the convoy in this depot.
◆ toggle_withdraw()
void convoy_x::toggle_withdraw |
( |
player_x |
| ) |
|
Toggle the flag 'withdraw convoy'