Simutrans-Squirrel-API
api_obj_desc.cc
Go to the documentation of this file.
1 
6 public:
8  integer capacity;
9  integer factor;
10 };
14 class obj_desc_x : public extend_get {
15 public:
19  string get_name();
25  bool is_equal(obj_desc_x other);
29  bool is_valid();
30 };
34 class obj_desc_time_x : public obj_desc_x {
35 public:
48  bool is_future(time_x time);
53  bool is_retired(time_x time);
58  bool is_available(time_x time);
59 };
64 public:
68  integer get_maintenance();
72  integer get_cost();
80  integer get_topspeed();
81 };
86 public:
90  bool can_be_first();
94  bool can_be_last();
98  array<vehicle_desc_x> get_successors();
102  array<vehicle_desc_x> get_predecessors();
106  static array<vehicle_desc_x> get_available_vehicles(way_types);
112  integer get_power();
116  bool needs_electrification();
124  integer get_capacity();
128  integer get_running_cost();
132  integer get_maintenance();
136  integer get_weight();
140  integer get_length();
147  static bool is_coupling_allowed(vehicle_desc_x first, vehicle_desc_x second);
148 };
152 class tree_desc_x : public obj_desc_x {
153 public:
158  static integer get_price();
159 };
164 public:
168  bool is_attraction();
173  coord get_size(integer rotation);
177  integer get_maintenance();
182  integer get_cost();
186  integer get_capacity();
198  bool enables_pax();
202  bool enables_mail();
206  bool enables_freight();
237 };
249 integer get_headquarter_level();
255 static array<building_desc_x> get_building_list(building_desc_x::building_type);
264 static array<building_desc_x> get_available_stations(building_desc_x::building_type type, way_types wt, good_desc_x freight);
268 bool is_terminus();
269 };
273 class factory_desc_x : public obj_desc_x {
274 public:
278  string get_name();
291  integer get_productivity_base();
295  integer get_productivity_range();
299  array<factory_slot_information_x> get_inputs();
303  array<factory_slot_information_x> get_outputs();
308  table<factory_desc_x> get_list();
309 };
314 public:
318  bool has_double_slopes();
329  static array<way_desc_x> get_available_ways(way_types wt, way_system_types st);
330 };
335 public:
339  static array<tunnel_desc_x> get_available_tunnels(way_types);
340 };
345 public:
349  bool has_double_ramp();
353  bool has_double_start();
357  integer get_max_length();
361  integer get_max_height();
365  static array<bridge_desc_x> get_available_bridges(way_types);
366 };
379 public:
383 private:
384  void _nexti();
385 public:
389 private:
390  void _get();
391 public:
392 };
396 class good_desc_x : public obj_desc_x {
397 public:
402  good_desc_x(string name);
404  static good_desc_x mail;
405 
408  integer get_catg_index();
417  integer get_weight_per_unit();
427  integer calc_revenue(way_types wt, integer speedkmh);
428 };
433 public:
437  bool is_one_way();
441  bool is_private_way();
445  bool is_traffic_light();
449  bool is_choose_sign();
453  bool is_signal();
457  bool is_pre_signal();
461  bool is_priority_signal();
465  bool is_longblock_signal();
469  bool is_end_choose_signal();
474  static array<sign_desc_x> get_available_signs(way_types wt);
475 };
480 public:
484  bool is_overhead_line();
489  static array<wayobj_desc_x> get_available_wayobjs(way_types wt);
490 };
static integer get_price()
integer get_length()
building_type
building types
way_types
Definition: api_const.cc:118
integer capacity
capacity to store the good
Definition: api_obj_desc.cc:8
static array< tunnel_desc_x > get_available_tunnels(way_types)
tourist attraction to be built in cities
company headquarters
integer calc_revenue(way_types wt, integer speedkmh)
array< vehicle_desc_x > get_predecessors()
bool is_future(time_x time)
bool is_electricity_producer()
bool is_interchangeable(good_desc_x)
static array< wayobj_desc_x > get_available_wayobjs(way_types wt)
array< factory_slot_information_x > get_outputs()
integer get_capacity()
integer get_running_cost()
way_system_types get_system_type()
integer get_maintenance()
static array< building_desc_x > get_building_list(building_desc_x::building_type)
static good_desc_x passenger
descriptor for passenger
tourist attraction to be built outside cities
integer get_maintenance()
bool is_end_choose_signal()
bool has_double_start()
bool is_choose_sign()
bool is_available(time_x time)
bool is_one_way()
static good_desc_x mail
descriptor for mail
static array< bridge_desc_x > get_available_bridges(way_types)
building_desc_x get_building_desc()
integer get_maintenance()
array< vehicle_desc_x > get_successors()
bool is_private_way()
integer get_productivity_range()
bool is_equal(obj_desc_x other)
bool is_pre_signal()
good_desc_x get_freight()
bool has_double_ramp()
string get_name()
string get_name()
bool is_attraction()
city building: residential
time_x get_intro_date()
static array< building_desc_x > get_available_stations(building_desc_x::building_type type, way_types wt, good_desc_x freight)
integer get_weight_per_unit()
integer get_capacity()
bool enables_freight()
bool is_valid()
integer get_weight()
array< factory_slot_information_x > get_inputs()
city building: industrial
bool can_be_first()
integer get_productivity_base()
city building: commercial
way_types get_waytype()
bool is_signal()
bool is_priority_signal()
bool is_traffic_light()
integer get_catg_index()
way_types get_waytype()
good_desc_x good
type of produced/consumed good
Definition: api_obj_desc.cc:7
building_desc_x::building_type get_type()
integer get_headquarter_level()
static bool is_coupling_allowed(vehicle_desc_x first, vehicle_desc_x second)
static array< way_desc_x > get_available_ways(way_types wt, way_system_types st)
harbour without a slope (buildable on flat ground beaches)
time_x get_retire_date()
integer get_max_length()
static array< sign_desc_x > get_available_signs(way_types wt)
static array< vehicle_desc_x > get_available_vehicles(way_types)
coord get_size(integer rotation)
way_system_types
Definition: api_const.cc:146
good_desc_x(string name)
bool can_be_last()
bool needs_electrification()
integer get_max_height()
integer get_cost()
bool is_overhead_line()
bool can_be_built_underground()
bool is_retired(time_x time)
monument, built only once per map
table< factory_desc_x > get_list()
bool can_be_built_aboveground()
integer get_power()
bool has_double_slopes()
bool is_longblock_signal()
integer factor
production/consumption factor
Definition: api_obj_desc.cc:9