Simutrans-Squirrel-API
|
Go to the source code of this file.
Variables | |
struct { | |
string file | |
} | map |
table | persistent |
Persistent data should go into this table. More... | |
struct { | |
string api | |
Required version of api. More... | |
string author | |
Author(s) of the scenario and/or scripts. | |
string short_description | |
Short description of scenario, is shown for example in finance window. | |
string version | |
Version of script. | |
} | scenario |
Documents the global variables in a scenario script
Definition in file api_skeleton.h.
string api |
Required version of api.
Script requires this version of api. Corresponds to release numbers (e.g. 112.3). Set it to "*" to support nightly versions. If this string is not set, the default "112.3" will be used.
Definition at line 19 of file api_skeleton.h.
string file |
Name of savegame. The scenario starts with the world saved there. If file == "<attach>" then do not load a saved, attach the scenario to the running world instead.
Definition at line 34 of file api_skeleton.h.
struct { ... } map |
Information about game map/world.
table persistent |
Persistent data should go into this table.
Only this table is saved and reloaded with an savegame. Only plain data is saved: no classes / functions, no cyclic references.
Instances of classes can be saved if (1) the class implements the function _save that (2) returns something which can reconstruct the instance, i.e. an constructor call, embedded in a string.
Definition at line 67 of file api_skeleton.h.
struct { ... } scenario |
Meta information about the scenario.