Simutrans-Squirrel-API OTRP v63_4
Loading...
Searching...
No Matches
sign_x Class Reference
Inheritance diagram for sign_x:
Collaboration diagram for sign_x:

Public Member Functions

sign_desc_x get_desc ()
bool can_pass (player_x player)
integer get_state ()
bool is_stop_before_check ()
bool is_start_signal ()
bool is_advance_to_end ()
void is_guide_signal ()
void is_choose_signal ()
void is_skip_default_route ()
void is_length_based ()
void get_margin_length ()
bool get_two_ways ()
Public Member Functions inherited from map_object_x
 map_object_x (integer x, integer y, integer z, map_objects type)
bool is_valid ()
player_x get_owner ()
string get_name ()
way_types get_waytype ()
coord3d get_pos ()
string is_removable (player_x)
map_objects get_type ()
void mark ()
void unmark ()
bool is_marked ()

Detailed Description

Roadsigns and railway signals.

Definition at line 261 of file api_map_objects.cc.

Member Function Documentation

◆ can_pass()

bool sign_x::can_pass ( player_x player)

Test whether player 's vehicles can pass private-way sign. Returns true if this is not a private-way sign.

Parameters
player

◆ get_desc()

sign_desc_x sign_x::get_desc ( )
Returns
object descriptor.

◆ get_margin_length()

void sign_x::get_margin_length ( )

Get margin length of a choose signal.

Returns
margin length in tiles

◆ get_state()

integer sign_x::get_state ( )

Get signal state.

Returns
signal state: 0 = red, 1 = green, 2 = yellow

◆ get_two_ways()

bool sign_x::get_two_ways ( )

Get "allow reverse passage" (two ways) flag of a signal. When true, trains coming from the reverse direction are allowed to pass the signal.

Returns
true if the flag is set

◆ is_advance_to_end()

bool sign_x::is_advance_to_end ( )

Get "advance to end" flag of a choose signal. When true, trains routed to this choose signal will try to advance to the end of the platform.

Returns
true if the flag is set

◆ is_choose_signal()

void sign_x::is_choose_signal ( )

Get "choose signal" flag of a signal.

Returns
true if the flag is set

◆ is_guide_signal()

void sign_x::is_guide_signal ( )

Get "require parent convoy to enter" (guide signal) flag of a signal.

Returns
true if the flag is set

◆ is_length_based()

void sign_x::is_length_based ( )

Get "length based" flag of a choose signal.

Returns
true if the flag is set

◆ is_skip_default_route()

void sign_x::is_skip_default_route ( )

Get "skip default route" flag of a choose signal.

Returns
true if the flag is set

◆ is_start_signal()

bool sign_x::is_start_signal ( )

Get "start signal" flag of a signal. When true, a convoy in CAN_START or CAN_START_ONE_MONTH state will check whether the next signal ahead is clear before departing. If that signal is RED the convoy stays at its current position (does not advance to the signal tile).

Returns
true if the flag is set

◆ is_stop_before_check()

bool sign_x::is_stop_before_check ( )

Get "stop before check" flag of a signal. Applicable to simple signals, longblock signals and choose signals. When true, the signal forces the convoy to stop completely before the block-clearance check is performed (signal_clear is held false and restart_speed is set to -1 until the convoy is waiting).

Returns
true if the flag is set

The documentation for this class was generated from the following file: