OpenTTD Source  20241121-master-g67a0fccfad
train_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 TRAIN_CMD_H
11 #define TRAIN_CMD_H
12 
13 #include "command_type.h"
14 #include "engine_type.h"
15 #include "vehicle_type.h"
16 
18 CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, bool sell_chain, bool backup_order, ClientID user);
19 
20 CommandCost CmdMoveRailVehicle(DoCommandFlag flags, VehicleID src_veh, VehicleID dest_veh, bool move_chain);
22 CommandCost CmdReverseTrainDirection(DoCommandFlag flags, VehicleID veh_id, bool reverse_single_veh);
23 
27 
28 void CcBuildWagon(Commands cmd, const CommandCost &result, VehicleID new_veh_id, uint, uint16_t, CargoArray, TileIndex tile, EngineID, bool, CargoID, ClientID);
29 
30 #endif /* TRAIN_CMD_H */
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
Definition: cargo_type.h:22
Common return value for all commands.
Definition: command_type.h:23
Types related to commands.
@ CMDT_VEHICLE_CONSTRUCTION
Construction, modification (incl. refit) and destruction of vehicles.
Definition: command_type.h:415
@ CMDT_VEHICLE_MANAGEMENT
Stopping, starting, sending to depot, turning around, replace orders etc.
Definition: command_type.h:417
DoCommandFlag
List of flags for a command.
Definition: command_type.h:374
Commands
List of commands.
Definition: command_type.h:187
@ CMD_FORCE_TRAIN_PROCEED
proceed a train to pass a red signal
Definition: command_type.h:237
@ CMD_REVERSE_TRAIN_DIRECTION
turn a train around
Definition: command_type.h:238
@ CMD_MOVE_RAIL_VEHICLE
move a rail vehicle (in the depot)
Definition: command_type.h:236
@ CMD_LOCATION
the command has implicit location argument.
Definition: command_type.h:408
Types related to engines.
uint16_t EngineID
Unique identification number of an engine.
Definition: engine_type.h:21
ClientID
'Unique' identifier to be given to clients
Definition: network_type.h:49
Class for storing amounts of cargo.
Definition: cargo_type.h:114
Vehicle data structure.
Definition: vehicle_base.h:244
CommandCost CmdBuildRailVehicle(DoCommandFlag flags, TileIndex tile, const Engine *e, Vehicle **ret)
Build a railroad vehicle.
Definition: train_cmd.cpp:750
CommandCost CmdMoveRailVehicle(DoCommandFlag flags, VehicleID src_veh, VehicleID dest_veh, bool move_chain)
Move a rail vehicle around inside the depot.
Definition: train_cmd.cpp:1193
void CcBuildWagon(Commands cmd, const CommandCost &result, VehicleID new_veh_id, uint, uint16_t, CargoArray, TileIndex tile, EngineID, bool, CargoID, ClientID)
Callback for building wagons.
Definition: train_gui.cpp:29
CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, bool sell_chain, bool backup_order, ClientID user)
Sell a (single) train wagon/engine.
Definition: train_cmd.cpp:1391
CommandCost CmdForceTrainProceed(DoCommandFlag flags, VehicleID veh_id)
Force a train through a red signal.
Definition: train_cmd.cpp:2132
CommandCost CmdReverseTrainDirection(DoCommandFlag flags, VehicleID veh_id, bool reverse_single_veh)
Reverse train.
Definition: train_cmd.cpp:2059
Types related to vehicles.
uint32_t VehicleID
The type all our vehicle IDs have.
Definition: vehicle_type.h:16