Simutrans-Squirrel-API
|
Public Member Functions | |
factory_x (integer x, integer y) | |
array< integer > | get_boost_electric () |
array< integer > | get_boost_mail () |
array< integer > | get_boost_pax () |
array< coord > | get_consumers () |
factory_desc_x | get_desc () |
integer | get_field_count () |
array< tile_x > | get_fields_list () |
array< halt_x > | get_halt_list () |
array< integer > | get_mail_arrived () |
array< integer > | get_mail_departed () |
array< integer > | get_mail_generated () |
integer | get_min_field_count () |
string | get_name () |
array< integer > | get_pax_arrived () |
array< integer > | get_pax_departed () |
array< integer > | get_pax_generated () |
array< integer > | get_power () |
array< integer > | get_production () |
string | get_raw_name () |
array< coord > | get_suppliers () |
array< tile_x > | get_tile_list () |
powerline_x | get_transformer () |
bool | is_transformer_connected () |
bool | is_valid () |
void | set_name (string) |
Public Member Functions inherited from coord | |
string | _tostring () |
coord (int x, int y) | |
string | href (string text) |
coord | operator* (integer fac) |
coord | operator+ (coord other) |
coord | operator- (coord other) |
coord | operator- () |
coord | operator/ (integer fac) |
dir | to_dir () |
Public Attributes | |
table< factory_production_x > | input |
table< factory_production_x > | output |
Public Attributes inherited from coord | |
integer | x |
x-coordinate | |
integer | y |
y-coordinate | |
Class to access information about factories. Identified by coordinate.
Definition at line 36 of file api_factory.cc.
factory_x::factory_x | ( | integer | x, |
integer | y | ||
) |
Constructor.
x | x-coordinate |
y | y-coordinate |
array<integer> factory_x::get_boost_electric | ( | ) |
Get monthly statistics of production boost due to electric power supply.
array<integer> factory_x::get_boost_mail | ( | ) |
Get monthly statistics of production boost due to arrived mail.
array<integer> factory_x::get_boost_pax | ( | ) |
Get monthly statistics of production boost due to arrived passengers.
array<coord> factory_x::get_consumers | ( | ) |
Get list of consumers of this factory.
factory_desc_x factory_x::get_desc | ( | ) |
integer factory_x::get_field_count | ( | ) |
array<tile_x> factory_x::get_fields_list | ( | ) |
Get list of all tiles occupied by fields belonging to this factory.
array<halt_x> factory_x::get_halt_list | ( | ) |
Get list of all halts that serve this this factory.
array<integer> factory_x::get_mail_arrived | ( | ) |
Get monthly statistics of arrived mail.
array<integer> factory_x::get_mail_departed | ( | ) |
Get monthly statistics of departed mail.
array<integer> factory_x::get_mail_generated | ( | ) |
Get monthly statistics of generated mail.
integer factory_x::get_min_field_count | ( | ) |
string factory_x::get_name | ( | ) |
Get (translated or custom) name of factory.
array<integer> factory_x::get_pax_arrived | ( | ) |
Get monthly statistics of arrived passengers.
array<integer> factory_x::get_pax_departed | ( | ) |
Get monthly statistics of departed passengers.
array<integer> factory_x::get_pax_generated | ( | ) |
Get monthly statistics of generated passengers.
array<integer> factory_x::get_power | ( | ) |
Get monthly statistics of power consumption/production.
array<integer> factory_x::get_production | ( | ) |
Get monthly statistics of production.
string factory_x::get_raw_name | ( | ) |
Get untranslated name of factory.
array<coord> factory_x::get_suppliers | ( | ) |
Get list of consumers of this factory.
array<tile_x> factory_x::get_tile_list | ( | ) |
Get list of all tiles occupied by buildings belonging to this factory.
powerline_x factory_x::get_transformer | ( | ) |
Get connected transformer (if any).
bool factory_x::is_transformer_connected | ( | ) |
Checks whether a transformer is connected.
bool factory_x::is_valid | ( | ) |
table<factory_production_x> factory_x::input |
Table containing input/consumption slots. Entries can be retrieved by raw name of the good (as defined in the associated pak-file).
Entries are of type factory_production_x.
To print a list of all available goods names use this example:
To catch the output of this example see Logging and error handling.
Definition at line 61 of file api_factory.cc.
table<factory_production_x> factory_x::output |
Table containing output/production slots. Entries can be retrieved by raw name of the good (as defined in the associated pak-file).
Entries are of type factory_production_x.
For an example to retrieve the list of goods, see factory_x::input.
Definition at line 70 of file api_factory.cc.