Class with helper methods for way planning.
Definition at line 41 of file api_pathfinding.cc.
◆ way_planner_x()
way_planner_x::way_planner_x |
( |
player_x |
pl | ) |
|
Constructor
- Parameters
-
pl | player that wants to plan, for ai scripts is set to ai player_x::self |
◆ 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
-
from | from here |
to | to 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
-
way | descriptor of way to be planned. |
The documentation for this class was generated from the following file: