|
OpenTTD Source
13.2.1
|
Go to the source code of this file.
Functions | |
| enum StationClassID byte CommandCost | CmdBuildRailWaypoint (DoCommandFlag flags, TileIndex start_tile, Axis axis, byte width, byte height, StationClassID spec_class, byte spec_index, StationID station_to_join, bool adjacent) |
| Convert existing rail to waypoint. More... | |
| CommandCost | CmdRemoveFromRailWaypoint (DoCommandFlag flags, TileIndex start, TileIndex end, bool keep_rail) |
| Remove a single tile from a waypoint. More... | |
| CommandCost | CmdBuildBuoy (DoCommandFlag flags, TileIndex tile) |
| Build a buoy. More... | |
| CommandCost | CmdRenameWaypoint (DoCommandFlag flags, StationID waypoint_id, const std::string &text) |
| Rename a waypoint. More... | |
Command definitions related to waypoints.
Definition in file waypoint_cmd.h.
| CommandCost CmdBuildBuoy | ( | DoCommandFlag | flags, |
| TileIndex | tile | ||
| ) |
Build a buoy.
| flags | operation to perform |
| tile | tile where to place the buoy |
Definition at line 291 of file waypoint_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_station_pool >::CanAllocateItem(), EXPENSES_CONSTRUCTION, FindDeletedWaypointCloseTo(), HasTileWaterGround(), IsBridgeAbove(), IsTileFlat(), OWNER_NONE, and return_cmd_error.
| enum StationClassID byte CommandCost CmdBuildRailWaypoint | ( | DoCommandFlag | flags, |
| TileIndex | start_tile, | ||
| Axis | axis, | ||
| byte | width, | ||
| byte | height, | ||
| StationClassID | spec_class, | ||
| byte | spec_index, | ||
| StationID | station_to_join, | ||
| bool | adjacent | ||
| ) |
Convert existing rail to waypoint.
Eg build a waypoint station over piece of rail
| flags | type of operation |
| start_tile | northern most tile where waypoint will be built |
| axis | orientation (Axis) |
| width | width of waypoint |
| height | height of waypoint |
| spec_class | custom station class |
| spec_index | custom station id |
| station_to_join | station ID to join (NEW_STATION if build new one) |
| adjacent | allow waypoints directly adjacent to other waypoints. |
Definition at line 175 of file waypoint_cmd.cpp.
References _settings_game, AXIS_X, CMD_ERROR, NewGRFClass< Tspec, Tid, Tmax >::Get(), IsValidAxis(), STAT_CLASS_WAYP, GameSettings::station, and StationSettings::station_spread.
| CommandCost CmdRemoveFromRailWaypoint | ( | DoCommandFlag | flags, |
| TileIndex | start, | ||
| TileIndex | end, | ||
| bool | keep_rail | ||
| ) |
Remove a single tile from a waypoint.
This allows for custom-built waypoint with holes and weird layouts
| flags | operation to perform |
| start | tile of waypoint piece to remove |
| end | other edge of the rect to remove |
| keep_rail | if set keep the rail |
Definition at line 1690 of file station_cmd.cpp.
References CMD_ERROR, MapSize(), and RemoveFromRailBaseStation().
| CommandCost CmdRenameWaypoint | ( | DoCommandFlag | flags, |
| StationID | waypoint_id, | ||
| const std::string & | text | ||
| ) |
Rename a waypoint.
| flags | type of operation |
| waypoint_id | id of waypoint |
| text | the new name or an empty string when resetting to the default |
Definition at line 400 of file waypoint_cmd.cpp.
References CheckOwnership(), CMD_ERROR, DC_EXEC, CommandCost::Failed(), SpecializedStation< Waypoint, true >::GetIfValid(), IsUniqueWaypointName(), MAX_LENGTH_STATION_NAME_CHARS, BaseStation::name, BaseStation::owner, OWNER_NONE, return_cmd_error, Waypoint::UpdateVirtCoord(), and Utf8StringLength().