Simutrans-Squirrel-API
|
Static Public Member Functions | |
static void | allow_tool (integer player_nr, integer tool_id) |
static void | allow_way_tool (integer player_nr, integer tool_id, way_types wt) |
static void | allow_way_tool_cube (integer player_nr, integer tool_id, way_types wt, coord3d pos_nw, coord3d pos_se) |
static void | allow_way_tool_rect (integer player_nr, integer tool_id, way_types wt, coord pos_nw, coord pos_se) |
static void | clear () |
static void | forbid_tool (integer player_nr, integer tool_id) |
static void | forbid_way_tool (integer player_nr, integer tool_id, way_types wt) |
static void | forbid_way_tool_cube (integer player_nr, integer tool_id, way_types wt, coord3d pos_nw, coord3d pos_se, string err) |
static void | forbid_way_tool_rect (integer player_nr, integer tool_id, way_types wt, coord pos_nw, coord pos_se, string err) |
static void | gui_needs_update () |
Table with methods to forbid and allow tools.
Tools that are set to forbidden using the forbid_* methods can be allowed again by calls to the respective allow_* method with exact the same parameters.
Definition at line 74 of file api_scenario.cc.
|
static |
Allow tool.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
|
static |
Allow tool with certain waytype.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
wt | waytype |
|
static |
Allow tool with certain waytype within cubic region on the map.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
wt | waytype |
pos_nw | 3d-coordinate of north-western corner of cube |
pos_se | 3d-coordinate of south-eastern corner of cube |
|
static |
Allow tool with certain waytype within rectangular region on the map.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
wt | waytype |
pos_nw | coordinate of north-western corner of rectangle |
pos_se | coordinate of south-eastern corner of rectangle |
|
static |
Clear all forbidding rules, effectively allowing all tools again that were forbidden using functions of the table rules.
Only effects tools forbidden by rules::forbid_tool, rules::forbid_way_tool, rules::forbid_way_tool_cube, rules::forbid_way_tool_rect. The result of is_tool_allowed and is_work_allowed_here is not influenced.
|
static |
Forbid tool.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
|
static |
Forbid tool with certain waytype.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
wt | waytype |
|
static |
Forbid tool with certain waytype within cubic region on the map.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
wt | waytype |
pos_nw | 3d-coordinate of north-western corner of cube |
pos_se | 3d-coordinate of south-eastern corner of cube |
err | error message presented to user when trying to apply this tool, see also is_work_allowed_here |
|
static |
Forbid tool with certain waytype within rectangular region on the map.
player_nr | number of player this rule applies to, if this is set to player_all then this acts for all players except public player |
tool_id | id of tool |
wt | waytype |
pos_nw | coordinate of north-western corner of rectangle |
pos_se | coordinate of south-eastern corner of rectangle |
err | error message presented to user when trying to apply this tool, see also is_work_allowed_here |
|
static |
Signals that toolbars and active tools need to be checked against scenario rules again.