Command Handling for depots. More...
#include "stdafx.h"#include "command_func.h"#include "depot_base.h"#include "company_func.h"#include "string_func.h"#include "town.h"#include "vehicle_gui.h"#include "vehiclelist.h"#include "window_func.h"#include "table/strings.h"Go to the source code of this file.
Functions | |
| static bool | IsUniqueDepotName (const char *name) |
| Check whether the given name is globally unique amongst depots. | |
| CommandCost | CmdRenameDepot (TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
| Rename a depot. | |
Command Handling for depots.
Definition in file depot_cmd.cpp.
| CommandCost CmdRenameDepot | ( | TileIndex | tile, | |
| DoCommandFlag | flags, | |||
| uint32 | p1, | |||
| uint32 | p2, | |||
| const char * | text | |||
| ) |
Rename a depot.
| tile | unused | |
| flags | type of operation | |
| p1 | id of depot | |
| p2 | unused | |
| text | the new name or an empty string when resetting to the default |
Definition at line 49 of file depot_cmd.cpp.
References CheckTileOwnership(), CMD_ERROR, DC_EXEC, CommandCost::Failed(), free(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_depot_pool >::GetIfValid(), GetTileOwner(), GetTileType(), GetWindowClassForVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, IsUniqueDepotName(), MakeDefaultName(), MAX_LENGTH_DEPOT_NAME_CHARS, MP_RAILWAY, MP_ROAD, MP_WATER, return_cmd_error, SetWindowClassesDirty(), SetWindowDirty(), StrEmpty(), Utf8StringLength(), WC_VEHICLE_DEPOT, and WC_VEHICLE_ORDERS.
| static bool IsUniqueDepotName | ( | const char * | name | ) | [static] |
Check whether the given name is globally unique amongst depots.
| name | The name to check. |
Definition at line 29 of file depot_cmd.cpp.
Referenced by CmdRenameDepot().
1.7.1