Simutrans-Squirrel-API
Public Member Functions | List of all members
way_planner_x Class Reference

Public Member Functions

bool is_allowed_step (tile_x from, tile_x to)
 
void set_build_types (way_desc_x way)
 
 way_planner_x (player_x pl)
 

Detailed Description

Class with helper methods for way planning.

Definition at line 41 of file api_pathfinding.cc.

Constructor & Destructor Documentation

◆ way_planner_x()

way_planner_x::way_planner_x ( player_x  pl)

Constructor

Parameters
plplayer that wants to plan, for ai scripts is set to ai player_x::self

Member Function Documentation

◆ is_allowed_step()

bool way_planner_x::is_allowed_step ( tile_x  from,
tile_x  to 
)

Checks if player can build way from from to to.

Parameters
fromfrom here
toto here, from and to must be adjacent.

◆ set_build_types()

void way_planner_x::set_build_types ( way_desc_x  way)

Sets way descriptor, which is needed for is_allowed_step.

Parameters
waydescriptor of way to be planned.

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