OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
20 #include "table/strings.h"
32 if (!d->name.empty() && d->name == name)
return false;
53 if (ret.
Failed())
return ret;
55 bool reset = text.empty();
uint32 TileIndex
The index/ID of a Tile.
void SetWindowDirty(WindowClass cls, WindowNumber number)
Mark window as dirty (in need of repainting)
static Titem * GetIfValid(size_t index)
Returns Titem with given index.
static const CommandCost CMD_ERROR
Define a default return value for a failed command.
The information about a vehicle list.
Tindex index
Index of this pool item.
@ DC_EXEC
execute the given command
DoCommandFlag
List of flags for a command.
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...
#define return_cmd_error(errcode)
Returns from a function with a specific StringID as error.
Common return value for all commands.
bool Failed() const
Did this command fail?
uint32 Pack() const
Pack a VehicleListIdentifier in a single uint32.
VehicleType
Available vehicle types.
static Owner GetTileOwner(TileIndex tile)
Returns the owner of a tile.
static WindowClass GetWindowClassForVehicleType(VehicleType vt)
Get WindowClass for vehicle list of given vehicle type.
CommandCost CmdRenameDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
Rename a depot.
void MakeDefaultName(T *obj)
Set the default name for a depot/waypoint.
static Pool::IterateWrapper< Titem > Iterate(size_t from=0)
Returns an iterable ensemble of all valid Titem.
static const uint MAX_LENGTH_DEPOT_NAME_CHARS
The maximum length of a depot name in characters including '\0'.
static bool IsUniqueDepotName(const std::string &name)
Check whether the given name is globally unique amongst depots.
@ WC_VEHICLE_DEPOT
Depot view; Window numbers:
CommandCost CheckTileOwnership(TileIndex tile)
Check whether the current owner owns the stuff on the given tile.
void SetWindowClassesDirty(WindowClass cls)
Mark all windows of a particular class as dirty (in need of repainting)
@ WC_VEHICLE_ORDERS
Vehicle orders; Window numbers:
static VehicleType GetDepotVehicleType(TileIndex t)
Get the type of vehicles that can use a depot.