OpenTTD Source: src/autoreplace_cmd.h Source File

OpenTTD Source 15.0-beta1

autoreplace_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 AUTOREPLACE_CMD_H
11#define AUTOREPLACE_CMD_H
12
13#include "command_type.h"
14#include "vehicle_type.h"
15#include "engine_type.h"
16#include "group_type.h"
17
18 CommandCost CmdAutoreplaceVehicle(DoCommandFlag flags, VehicleID veh_id);
19 CommandCost CmdSetAutoReplace(DoCommandFlag flags, GroupID id_g, EngineID old_engine_type, EngineID new_engine_type, bool when_old);
20
21DEF_CMD_TRAIT(CMD_AUTOREPLACE_VEHICLE, CmdAutoreplaceVehicle, 0, CMDT_VEHICLE_MANAGEMENT)
22DEF_CMD_TRAIT(CMD_SET_AUTOREPLACE, CmdSetAutoReplace, 0, CMDT_VEHICLE_MANAGEMENT)
23
24#endif /* AUTOREPLACE_CMD_H */
CmdAutoreplaceVehicle
CommandCost CmdAutoreplaceVehicle(DoCommandFlag flags, VehicleID veh_id)
Autoreplaces a vehicle Trains are replaced as a whole chain, free wagons in depot are replaced on the...
Definition autoreplace_cmd.cpp:732
CmdSetAutoReplace
CommandCost CmdSetAutoReplace(DoCommandFlag flags, GroupID id_g, EngineID old_engine_type, EngineID new_engine_type, bool when_old)
Change engine renewal parameters.
Definition autoreplace_cmd.cpp:820
CommandCost
Common return value for all commands.
Definition command_type.h:23
command_type.h
Types related to commands.
CMDT_VEHICLE_MANAGEMENT
@ CMDT_VEHICLE_MANAGEMENT
Stopping, starting, sending to depot, turning around, replace orders etc.
Definition command_type.h:417
DoCommandFlag
DoCommandFlag
List of flags for a command.
Definition command_type.h:374
CMD_SET_AUTOREPLACE
@ CMD_SET_AUTOREPLACE
set an autoreplace entry
Definition command_type.h:333
CMD_AUTOREPLACE_VEHICLE
@ CMD_AUTOREPLACE_VEHICLE
replace/renew a vehicle while it is in a depot
Definition command_type.h:338
engine_type.h
Types related to engines.
EngineID
uint16_t EngineID
Unique identification number of an engine.
Definition engine_type.h:21
group_type.h
Types of a group.
GroupID
uint16_t GroupID
Type for all group identifiers.
Definition group_type.h:13
vehicle_type.h
Types related to vehicles.
VehicleID
uint32_t VehicleID
The type all our vehicle IDs have.
Definition vehicle_type.h:16