Simutrans-Squirrel-API
Enumerations
api_const.cc File Reference

Go to the source code of this file.

Enumerations

enum  { player_all }
 
enum  climates {
  cl_water, cl_desert, cl_tropic, cl_mediterran,
  cl_temperate, cl_tundra, cl_rocky, cl_arctic
}
 
enum  map_objects {
  mo_tree, mo_pointer, mo_cloud, mo_building,
  mo_signal, mo_bridge, mo_tunnel, mo_depot_rail,
  mo_depot_road, mo_depot_water, mo_powerline, mo_transformer_s,
  mo_transformer_c, mo_roadsign, mo_pillar, mo_depot_air,
  mo_depot_monorail, mo_depot_tram, mo_depot_maglev, mo_wayobj,
  mo_way, mo_label, mo_field, mo_crossing,
  mo_groundobj, mo_depot_narrowgauge, mo_pedestrian, mo_city_car,
  mo_car, mo_train, mo_monorail, mo_maglev,
  mo_narrowgauge, mo_ship, mo_airplane, mo_moving_object
}
 
enum  tool_flags { shift_pressed, ctrl_pressed }
 
enum  tool_ids {
  tool_remover, tool_raise_land, tool_lower_land, tool_setslope,
  tool_restoreslope, tool_set_marker, tool_clear_reservation, tool_build_transformer,
  tool_add_city, tool_change_city_size, tool_plant_tree, tool_build_groundobj,
  tool_build_way, tool_build_bridge, tool_build_tunnel, tool_remove_way,
  tool_build_wayobj, tool_build_station, tool_build_roadsign, tool_build_depot,
  tool_build_house, tool_land_chain, tool_city_chain, tool_build_factory,
  tool_link_factory, tool_headquarter, tool_lock_game, tool_add_citycar,
  tool_forest, tool_stop_mover, tool_make_stop_public, tool_remove_wayobj,
  tool_buy_house, tool_build_cityroad, tool_change_water_height, tool_set_climate,
  tool_rotate_building, tool_merge_stop, tool_exec_script, tool_exec_two_click_script,
  tool_increase_industry, tool_switch_player, tool_step_year, tool_fill_trees,
  tool_set_traffic_level, dialog_edit_factory, dialog_edit_attraction, dialog_edit_house,
  dialog_edit_tree, dialog_enlarge_map
}
 
enum  units { CARUNITS_PER_TILE }
 
enum  way_system_types { st_flat, st_elevated, st_runway, st_tram }
 
enum  way_types {
  wt_all, wt_road, wt_rail, wt_water,
  wt_monorail, wt_maglev, wt_tram, wt_narrowgauge,
  wt_air, wt_power, wt_invalid
}
 

Detailed Description

exports constants

Definition in file api_const.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
player_all 

constant to forbid/allow tools for all players (except public player)

Definition at line 156 of file api_const.cc.

◆ climates

enum climates

Climate zones. Their naming may differ from the graphical representation and translation in some paksets.

Definition at line 248 of file api_const.cc.

◆ map_objects

Types of map objects.

Enumerator
mo_tree 

tree

mo_pointer 

pointer (bulldozers etc)

mo_cloud 

cloud and smoke

mo_building 

building (houses, halts, factories ...)

mo_signal 

signal

mo_bridge 

bridge

mo_tunnel 

tunnel

mo_depot_rail 

depot: rail

mo_depot_road 

depot: road

mo_depot_water 

depot: ship

mo_powerline 

powerline

mo_transformer_s 

transformer at powerplant

mo_transformer_c 

transformer at factory

mo_roadsign 

road-sign

mo_pillar 

bridge pillar

mo_depot_air 

depot: airplanes

mo_depot_monorail 

depot: monorail

mo_depot_tram 

depot: tram

mo_depot_maglev 

depot: maglev

mo_wayobj 

way object (overhead wires)

mo_way 

way

mo_label 

text label

mo_field 

field

mo_crossing 

crossing

mo_groundobj 

decorative objects (rocks, lakes ...)

mo_depot_narrowgauge 

depot: narrowgauge

mo_pedestrian 

pedestrian

mo_city_car 

city car - not player owned

mo_car 

road vehicle

mo_train 

rail vehicle

mo_monorail 

monorail vehicle

mo_maglev 

maglev vehicle

mo_narrowgauge 

narrowgauge vehicle

mo_ship 

ship

mo_airplane 

airplane

mo_moving_object 

moving object (sheep ...)

Definition at line 163 of file api_const.cc.

◆ tool_flags

enum tool_flags

Flags for scripted tools.

Definition at line 111 of file api_const.cc.

◆ tool_ids

enum tool_ids

Constants to identify tools, ie actions a player can perform to alter the state of the game.

Enumerator
tool_remover 

remover tool

tool_raise_land 

raise land tool

tool_lower_land 

lower land tool

tool_setslope 

artificial slope

tool_restoreslope 

restore natural slope

tool_set_marker 

set marker

tool_clear_reservation 

clear block reservation

tool_build_transformer 

build transformer

tool_add_city 

add city

tool_change_city_size 

change city size

tool_plant_tree 

plant a tree

tool_build_groundobj 

build groundobj/movingobj

tool_build_way 

build ways

tool_build_bridge 

build bridges

tool_build_tunnel 

build tunnel

tool_remove_way 

remove way

tool_build_wayobj 

build overhead wires

tool_build_station 

build stations

tool_build_roadsign 

build signals and road signs

tool_build_depot 

build depot

tool_build_house 

build city houses

tool_land_chain 

create industry chain with end consumer not in cities

tool_city_chain 

create industry chain with end consumer in cities

tool_build_factory 

build a factory

tool_link_factory 

link factories

tool_headquarter 

build headquarters

tool_lock_game 

lock map: switching players not allowed anymore

tool_add_citycar 

add city car

tool_forest 

create forest

tool_stop_mover 

move stop tool

tool_make_stop_public 

make stop public

tool_remove_wayobj 

remove way objects like overheadwires

tool_buy_house 

buy a house

tool_build_cityroad 

build city road with pavement

tool_change_water_height 

alter water height

tool_set_climate 

change climate of tiles

tool_rotate_building 

rotate a building

tool_merge_stop 

merge two stops

tool_exec_script 

scripted tool (one-click)

tool_exec_two_click_script 

scripted tool (two-click)

tool_increase_industry 

increase industry density

tool_switch_player 

switch player

tool_step_year 

step year forward

tool_fill_trees 

fill area with trees

tool_set_traffic_level 

set traffic level

dialog_edit_factory 

open factory editor window

dialog_edit_attraction 

open tourist attraction editor window

dialog_edit_house 

open house editor window

dialog_edit_tree 

open tree editor window

dialog_enlarge_map 

open map enlargement window

Definition at line 6 of file api_const.cc.

◆ units

enum units

Internal units.

Enumerator
CARUNITS_PER_TILE 

The length of one side of a tile in car units.

See also
vehicle_desc_x::get_length

Definition at line 240 of file api_const.cc.

◆ way_system_types

Constants for different system types of ways. System type could take also other values than the ones defined here.

Enumerator
st_flat 

flat ways

st_elevated 

elevated ways

st_runway 

runway (for wt_air), equal to st_elevated

st_tram 

tram tracks (here way type has to be wt_tram)

Definition at line 146 of file api_const.cc.

◆ way_types

enum way_types

Constants for different way types.

Enumerator
wt_all 

catch all value: used to forbid tools for all waytypes

wt_road 

road

wt_rail 

rail

wt_water 

water

wt_monorail 

monorail

wt_maglev 

maglev

wt_tram 

trams

wt_narrowgauge 

narrow gauge

wt_air 

aircrafts and airports

wt_power 

powerlines

wt_invalid 

invalid

Definition at line 118 of file api_const.cc.