Simutrans-Squirrel-API
|
Public Types | |
enum | building_type { attraction_city, attraction_land, monument, factory, townhall, headquarter, harbour, flat_harbour, depot, station, station_extension, city_res, city_com, city_ind } |
building types More... | |
Public Member Functions | |
bool | can_be_built_aboveground () |
bool | can_be_built_underground () |
bool | enables_freight () |
bool | enables_mail () |
bool | enables_pax () |
integer | get_capacity () |
integer | get_cost () |
integer | get_headquarter_level () |
integer | get_maintenance () |
coord | get_size (integer rotation) |
building_desc_x::building_type | get_type () |
way_types | get_waytype () |
bool | is_attraction () |
bool | is_terminus () |
Public Member Functions inherited from obj_desc_time_x | |
time_x | get_intro_date () |
time_x | get_retire_date () |
bool | is_available (time_x time) |
bool | is_future (time_x time) |
bool | is_retired (time_x time) |
Public Member Functions inherited from obj_desc_x | |
string | get_name () |
bool | is_equal (obj_desc_x other) |
bool | is_valid () |
Static Public Member Functions | |
static array< building_desc_x > | get_available_stations (building_desc_x::building_type type, way_types wt, good_desc_x freight) |
static array< building_desc_x > | get_building_list (building_desc_x::building_type) |
Object descriptors for buildings: houses, attractions, stations and extensions, depots, harbours.
Definition at line 163 of file api_obj_desc.cc.
building types
Definition at line 208 of file api_obj_desc.cc.
bool building_desc_x::can_be_built_aboveground | ( | ) |
bool building_desc_x::can_be_built_underground | ( | ) |
bool building_desc_x::enables_freight | ( | ) |
bool building_desc_x::enables_mail | ( | ) |
bool building_desc_x::enables_pax | ( | ) |
|
static |
Returns an array of available station/extension/depot buildings. Entries are of type building_desc_x.
type | building type from building_desc_x::building_type |
wt | waytype (can be wt_all to ignore waytype of desc) |
freight | station should accept this freight (if equal to {}, i.e., empty table, then return all buildings) |
|
static |
Returns an array with all buildings of the given type.
type
is one of building_desc_x::harbour, building_desc_x::depot, building_desc_x::station, building_desc_x::station_extension then always the same list is generated. You have to filter out e.g. station buildings yourself. integer building_desc_x::get_capacity | ( | ) |
integer building_desc_x::get_cost | ( | ) |
Price to build this building, takes size, level, and type into account.
integer building_desc_x::get_headquarter_level | ( | ) |
integer building_desc_x::get_maintenance | ( | ) |
coord building_desc_x::get_size | ( | integer | rotation | ) |
rotation |
rotation
building_desc_x::building_type building_desc_x::get_type | ( | ) |
way_types building_desc_x::get_waytype | ( | ) |
bool building_desc_x::is_attraction | ( | ) |
bool building_desc_x::is_terminus | ( | ) |