OpenTTD Source 20241224-master-gf74b0cf984
waypoint_cmd.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10#ifndef WAYPOINT_CMD_H
11#define WAYPOINT_CMD_H
12
13#include "command_type.h"
14#include "station_type.h"
15
16enum StationClassID : uint16_t;
17enum RoadStopClassID : uint16_t;
18
19CommandCost CmdBuildRailWaypoint(DoCommandFlag flags, TileIndex start_tile, Axis axis, uint8_t width, uint8_t height, StationClassID spec_class, uint16_t spec_index, StationID station_to_join, bool adjacent);
21CommandCost CmdBuildRoadWaypoint(DoCommandFlag flags, TileIndex start_tile, Axis axis, uint8_t width, uint8_t height, RoadStopClassID spec_class, uint16_t spec_index, StationID station_to_join, bool adjacent);
24CommandCost CmdRenameWaypoint(DoCommandFlag flags, StationID waypoint_id, const std::string &text);
25
32
33#endif /* WAYPOINT_CMD_H */
Common return value for all commands.
Types related to commands.
@ CMDT_LANDSCAPE_CONSTRUCTION
Construction and destruction of objects on the map.
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
DoCommandFlag
List of flags for a command.
@ CMD_REMOVE_FROM_RAIL_WAYPOINT
remove a (rectangle of) tiles from a rail waypoint
@ CMD_BUILD_BUOY
build a buoy
@ CMD_BUILD_ROAD_WAYPOINT
build a road waypoint
@ CMD_REMOVE_FROM_ROAD_WAYPOINT
remove a (rectangle of) tiles from a road waypoint
@ CMD_RENAME_WAYPOINT
rename a waypoint
@ CMD_BUILD_RAIL_WAYPOINT
build a waypoint
@ CMD_AUTO
set the DC_AUTO flag on this command
Axis
Allow incrementing of DiagDirDiff variables.
RoadStopClassID
StationClassID
Types related to stations.
CommandCost CmdBuildRoadWaypoint(DoCommandFlag flags, TileIndex start_tile, Axis axis, uint8_t width, uint8_t height, RoadStopClassID spec_class, uint16_t spec_index, StationID station_to_join, bool adjacent)
Build a road waypoint on an existing road.
CommandCost CmdRemoveFromRoadWaypoint(DoCommandFlag flags, TileIndex start, TileIndex end)
Remove road waypoints.
CommandCost CmdBuildRailWaypoint(DoCommandFlag flags, TileIndex start_tile, Axis axis, uint8_t width, uint8_t height, StationClassID spec_class, uint16_t spec_index, StationID station_to_join, bool adjacent)
Convert existing rail to waypoint.
CommandCost CmdRemoveFromRailWaypoint(DoCommandFlag flags, TileIndex start, TileIndex end, bool keep_rail)
Remove a single tile from a waypoint.
CommandCost CmdBuildBuoy(DoCommandFlag flags, TileIndex tile)
Build a buoy.
CommandCost CmdRenameWaypoint(DoCommandFlag flags, StationID waypoint_id, const std::string &text)
Rename a waypoint.