OpenTTD Source 20260311-master-g511d3794ce
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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef WAYPOINT_CMD_H
11#define WAYPOINT_CMD_H
12
13#include "command_type.h"
14#include "station_type.h"
15#include "newgrf_roadstop.h"
16#include "newgrf_station.h"
17
18CommandCost CmdBuildRailWaypoint(DoCommandFlags 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);
19CommandCost CmdRemoveFromRailWaypoint(DoCommandFlags flags, TileIndex start, TileIndex end, bool keep_rail);
20CommandCost CmdBuildRoadWaypoint(DoCommandFlags 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);
21CommandCost CmdRemoveFromRoadWaypoint(DoCommandFlags flags, TileIndex start, TileIndex end);
22CommandCost CmdBuildBuoy(DoCommandFlags flags, TileIndex tile);
23CommandCost CmdRenameWaypoint(DoCommandFlags flags, StationID waypoint_id, const std::string &text);
24std::tuple<CommandCost, StationID> CmdMoveWaypointName(DoCommandFlags flags, StationID waypoint_id, TileIndex tile);
25
33
34void CcMoveWaypointName(Commands, const CommandCost &result, StationID waypoint_id);
35
36#endif /* WAYPOINT_CMD_H */
Common return value for all commands.
Types related to commands.
@ OtherManagement
Renaming stuff, changing company colours, placing signs, etc.
@ LandscapeConstruction
Construction and destruction of objects on the map.
@ Auto
set the DoCommandFlag::Auto flag on this command
Commands
List of commands.
@ BuildRailWaypoint
build a waypoint
@ BuildRoadWaypoint
build a road waypoint
@ BuildBuoy
build a buoy
@ RemoveFromRoadWaypoint
remove a (rectangle of) tiles from a road waypoint
@ MoveWaypointNAme
move a waypoint name
@ RemoveFromRailWaypoint
remove a (rectangle of) tiles from a rail waypoint
@ RenameWaypoint
rename a waypoint
Axis
Allow incrementing of DiagDirDiff variables.
NewGRF definitions and structures for road stops.
PoolID< uint16_t, struct RoadStopClassIDTag, UINT16_MAX, UINT16_MAX > RoadStopClassID
Class IDs for stations.
Header file for NewGRF stations.
PoolID< uint16_t, struct StationClassIDTag, UINT16_MAX, UINT16_MAX > StationClassID
Class IDs for stations.
CommandCost CmdRemoveFromRailWaypoint(DoCommandFlags flags, TileIndex start, TileIndex end, bool keep_rail)
Remove a single tile from a waypoint.
CommandCost CmdRemoveFromRoadWaypoint(DoCommandFlags flags, TileIndex start, TileIndex end)
Remove road waypoints.
Types related to stations.
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.
Definition tile_type.h:92
CommandCost CmdBuildRoadWaypoint(DoCommandFlags 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 CmdBuildRailWaypoint(DoCommandFlags 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.
std::tuple< CommandCost, StationID > CmdMoveWaypointName(DoCommandFlags flags, StationID waypoint_id, TileIndex tile)
Move a waypoint name.
CommandCost CmdRenameWaypoint(DoCommandFlags flags, StationID waypoint_id, const std::string &text)
Rename a waypoint.
CommandCost CmdBuildBuoy(DoCommandFlags flags, TileIndex tile)
Build a buoy.
CommandCost CmdBuildRoadWaypoint(DoCommandFlags 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 CmdBuildRailWaypoint(DoCommandFlags 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.
void CcMoveWaypointName(Commands, const CommandCost &result, StationID waypoint_id)
Callback function that is called after a name is moved.
std::tuple< CommandCost, StationID > CmdMoveWaypointName(DoCommandFlags flags, StationID waypoint_id, TileIndex tile)
Move a waypoint name.
CommandCost CmdRemoveFromRailWaypoint(DoCommandFlags flags, TileIndex start, TileIndex end, bool keep_rail)
Remove a single tile from a waypoint.
CommandCost CmdRemoveFromRoadWaypoint(DoCommandFlags flags, TileIndex start, TileIndex end)
Remove road waypoints.
CommandCost CmdRenameWaypoint(DoCommandFlags flags, StationID waypoint_id, const std::string &text)
Rename a waypoint.
CommandCost CmdBuildBuoy(DoCommandFlags flags, TileIndex tile)
Build a buoy.