21#include "table/strings.h"
33 if (!d->name.empty() && d->name == name)
return false;
52 if (ret.
Failed())
return ret;
54 bool reset = text.empty();
Common return value for all commands.
bool Failed() const
Did this command fail?
Functions related to commands.
static const CommandCost CMD_ERROR
Define a default return value for a failed command.
DoCommandFlag
List of flags for a command.
@ DC_EXEC
execute the given command
CommandCost CheckTileOwnership(TileIndex tile)
Check whether the current owner owns the stuff on the given tile.
Functions related to companies.
Base for all depots (except hangars)
static bool IsUniqueDepotName(const std::string &name)
Check whether the given name is globally unique amongst depots.
CommandCost CmdRenameDepot(DoCommandFlag flags, DepotID depot_id, const std::string &text)
Rename a depot.
Command definitions related to depots.
VehicleType GetDepotVehicleType(Tile t)
Get the type of vehicles that can use a depot.
static const uint MAX_LENGTH_DEPOT_NAME_CHARS
The maximum length of a depot name in characters including '\0'.
uint16_t DepotID
Type for the unique identifier of depots.
A number of safeguards to prevent using unsafe methods.
Definition of base types and functions in a cross-platform compatible way.
size_t Utf8StringLength(const char *s)
Get the length of an UTF-8 encoded string in number of characters and thus not the number of bytes th...
Functions related to low-level strings.
Tindex index
Index of this pool item.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
static Titem * GetIfValid(size_t index)
Returns Titem with given index.
The information about a vehicle list.
uint32_t Pack() const
Pack a VehicleListIdentifier in a single uint32.
Owner GetTileOwner(Tile tile)
Returns the owner of a tile.
void MakeDefaultName(T *obj)
Set the default name for a depot/waypoint.
Functions related to the vehicle's GUIs.
WindowClass GetWindowClassForVehicleType(VehicleType vt)
Get WindowClass for vehicle list of given vehicle type.
VehicleType
Available vehicle types.
Functions and type for generating vehicle lists.
void SetWindowClassesDirty(WindowClass cls)
Mark all windows of a particular class as dirty (in need of repainting)
void SetWindowDirty(WindowClass cls, WindowNumber number)
Mark window as dirty (in need of repainting)
Window functions not directly related to making/drawing windows.
@ WC_VEHICLE_ORDERS
Vehicle orders; Window numbers:
@ WC_VEHICLE_DEPOT
Depot view; Window numbers: