22 #include "table/strings.h" 36 if (d->name != NULL && strcmp(d->name, name) == 0)
return false;
57 if (ret.
Failed())
return ret;
static Titem * GetIfValid(size_t index)
Returns Titem with given index.
static const uint MAX_LENGTH_DEPOT_NAME_CHARS
The maximum length of a depot name in characters including '\0'.
The information about a vehicle list.
void SetWindowDirty(WindowClass cls, WindowNumber number)
Mark window as dirty (in need of repainting)
Functions and type for generating vehicle lists.
static bool IsUniqueDepotName(const char *name)
Check whether the given name is globally unique amongst depots.
static const CommandCost CMD_ERROR
Define a default return value for a failed command.
Depot view; Window numbers:
Base for all depots (except hangars)
CommandCost CheckTileOwnership(TileIndex tile)
Check whether the current owner owns the stuff on the given tile.
Tindex index
Index of this pool item.
Common return value for all commands.
Functions related to the vehicle's GUIs.
CommandCost CmdRenameDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
Rename a depot.
Vehicle orders; Window numbers:
Functions related to low-level strings.
void MakeDefaultName(T *obj)
Set the default name for a depot/waypoint.
VehicleType
Available vehicle types.
static Owner GetTileOwner(TileIndex tile)
Returns the owner of a tile.
DoCommandFlag
List of flags for a command.
Definition of base types and functions in a cross-platform compatible way.
A number of safeguards to prevent using unsafe methods.
char * stredup(const char *s, const char *last)
Create a duplicate of the given string.
static VehicleType GetDepotVehicleType(TileIndex t)
Get the type of vehicles that can use a depot.
bool Failed() const
Did this command fail?
#define return_cmd_error(errcode)
Returns from a function with a specific StringID as error.
execute the given command
Functions related to companies.
static bool StrEmpty(const char *s)
Check if a string buffer is empty.
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...
uint32 TileIndex
The index/ID of a Tile.
uint32 Pack() const
Pack a VehicleListIdentifier in a single uint32.
Functions related to commands.
static WindowClass GetWindowClassForVehicleType(VehicleType vt)
Get WindowClass for vehicle list of given vehicle type.
static void free(const void *ptr)
Version of the standard free that accepts const pointers.
Window functions not directly related to making/drawing windows.
void SetWindowClassesDirty(WindowClass cls)
Mark all windows of a particular class as dirty (in need of repainting)