OpenTTD Source: src/roadveh_cmd.h Source File

OpenTTD Source 15.3

roadveh_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
10#ifndef ROADVEH_CMD_H
11#define ROADVEH_CMD_H
12
13#include "command_type.h"
14#include "engine_type.h"
15#include "vehicle_type.h"
16
17bool RoadVehLeaveDepot(RoadVehicle *v, bool first);
18bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *prev);
19bool RoadVehiclesAreBuilt();
20
21 CommandCost CmdBuildRoadVehicle(DoCommandFlags flags, TileIndex tile, const Engine *e, Vehicle **v);
22
23 CommandCost CmdTurnRoadVeh(DoCommandFlags flags, VehicleID veh_id);
24
25DEF_CMD_TRAIT(CMD_TURN_ROADVEH, CmdTurnRoadVeh, CommandFlag::Location, CommandType::VehicleManagement)
26
27#endif /* ROADVEH_CMD_H */
CommandCost
Common return value for all commands.
Definition command_type.h:24
Engine
Definition engine_base.h:38
EnumBitSet
Enum-as-bit-set wrapper.
Definition enum_type.hpp:177
command_type.h
Types related to commands.
CommandType::VehicleManagement
@ VehicleManagement
Stopping, starting, sending to depot, turning around, replace orders etc.
CommandFlag::Location
@ Location
the command has implicit location argument.
CMD_TURN_ROADVEH
@ CMD_TURN_ROADVEH
turn a road vehicle around
Definition command_type.h:286
engine_type.h
Types related to engines.
RoadVehiclesAreBuilt
bool RoadVehiclesAreBuilt()
Verify whether a road vehicle is available.
Definition road_cmd.cpp:169
CmdTurnRoadVeh
CommandCost CmdTurnRoadVeh(DoCommandFlags flags, VehicleID veh_id)
Turn a roadvehicle around.
Definition roadveh_cmd.cpp:362
CmdBuildRoadVehicle
CommandCost CmdBuildRoadVehicle(DoCommandFlags flags, TileIndex tile, const Engine *e, Vehicle **v)
Build a road vehicle.
Definition roadveh_cmd.cpp:262
PoolID< uint32_t, struct VehicleIDTag, 0xFF000, 0xFFFFF >
RoadVehicle
Buses, trucks and trams belong to this class.
Definition roadveh.h:98
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > >
Vehicle
Vehicle data structure.
Definition vehicle_base.h:205
vehicle_type.h
Types related to vehicles.