summaryrefslogtreecommitdiff
path: root/src/vehicle_type.h
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-05 23:55:23 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit21675ec7e22bfe53f20300cc27b4d50c84aeb4dc (patch)
treebfc6a1ef650ac6def3b80f86ec8d1a424900f459 /src/vehicle_type.h
parent2637c06f88ed6f9dea55449883f42a62c30f19d8 (diff)
downloadopenttd-21675ec7e22bfe53f20300cc27b4d50c84aeb4dc.tar.xz
Codechange: Un-bitstuff vehicle/engine commands.
Diffstat (limited to 'src/vehicle_type.h')
-rw-r--r--src/vehicle_type.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/vehicle_type.h b/src/vehicle_type.h
index ae4de3666..c302f5b9f 100644
--- a/src/vehicle_type.h
+++ b/src/vehicle_type.h
@@ -61,14 +61,15 @@ enum VehiclePathFinders {
VPF_YAPF = 2, ///< Yet Another PathFinder
};
-/** Flags to add to p1 for goto depot commands. */
-enum DepotCommand {
- DEPOT_SERVICE = (1U << 28), ///< The vehicle will leave the depot right after arrival (service only)
- DEPOT_MASS_SEND = (1U << 29), ///< Tells that it's a mass send to depot command (type in VLW flag)
- DEPOT_DONT_CANCEL = (1U << 30), ///< Don't cancel current goto depot command if any
- DEPOT_LOCATE_HANGAR = (1U << 31), ///< Find another airport if the target one lacks a hangar
- DEPOT_COMMAND_MASK = 0xFU << 28,
+/** Flags for goto depot commands. */
+enum class DepotCommand : byte {
+ None = 0, ///< No special flags.
+ Service = (1U << 0), ///< The vehicle will leave the depot right after arrival (service only)
+ MassSend = (1U << 1), ///< Tells that it's a mass send to depot command (type in VLW flag)
+ DontCancel = (1U << 2), ///< Don't cancel current goto depot command if any
+ LocateHangar = (1U << 3), ///< Find another airport if the target one lacks a hangar
};
+DECLARE_ENUM_AS_BIT_SET(DepotCommand)
static const uint MAX_LENGTH_VEHICLE_NAME_CHARS = 32; ///< The maximum length of a vehicle name in characters including '\0'