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

Public Member Functions

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

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: