Simutrans-Squirrel-API OTRP v63_4
Loading...
Searching...
No Matches
debug Class Reference

Static Public Member Functions

static bool pause ()
static bool is_paused ()
static void set_pause_on_error (bool p)
static void set_game_speed (any_x speed)
static void get_forbidden_text ()

Detailed Description

Table with methods help debugging.

Note
Only available in scenario mode.

Definition at line 16 of file api_control.cc.

Member Function Documentation

◆ get_forbidden_text()

void debug::get_forbidden_text ( )
static
Returns
text containing all active rules, can be used in get_debug_text
Note
Only available in scenario mode.

◆ is_paused()

bool debug::is_paused ( )
static

Checks whether game is paused. Note that scripts only run for unpaused games. This can only be used in functions that are called by user actions (e.g., is_*_allowed).

Returns
true when successful.

◆ pause()

bool debug::pause ( )
static

Pauses game. Does not work in network games. Use with care.

Returns
true when successful.

◆ set_game_speed()

void debug::set_game_speed ( any_x speed)
static

Sets game speed multiplier. 1 = normal speed, 5 = 5x speed. Does not work in network games. Use with care.

Parameters
speedinteger speed multiplier (1 = normal, 5 = five times normal speed)

◆ set_pause_on_error()

void debug::set_pause_on_error ( bool p)
static

Scripts can pause the game in case of error. Toggle this behavior by parameter p. Does not work in network games. Use with care.

Parameters
ptrue if script should make the game pause in case of error

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