|
OpenTTD Source 20251117-master-g7398d2e290
|
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 "depot_cmd.h"#include "table/strings.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| static bool | IsUniqueDepotName (const std::string &name) |
| Check whether the given name is globally unique amongst depots. | |
| CommandCost | CmdRenameDepot (DoCommandFlags flags, DepotID depot_id, const std::string &text) |
| Rename a depot. | |
Command Handling for depots.
Definition in file depot_cmd.cpp.
| CommandCost CmdRenameDepot | ( | DoCommandFlags | flags, |
| DepotID | depot_id, | ||
| const std::string & | text | ||
| ) |
Rename a depot.
| flags | type of operation |
| depot_id | id of depot |
| text | the new name or an empty string when resetting to the default |
Definition at line 46 of file depot_cmd.cpp.
References CheckTileOwnership(), CMD_ERROR, Execute, CommandCost::Failed(), GetDepotVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_depot_pool >::GetIfValid(), GetTileOwner(), GetWindowClassForVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, IsUniqueDepotName(), MakeDefaultName(), MAX_LENGTH_DEPOT_NAME_CHARS, SetWindowClassesDirty(), SetWindowDirty(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), VehicleListIdentifier::ToWindowNumber(), Utf8StringLength(), VL_DEPOT_LIST, WC_VEHICLE_DEPOT, and WC_VEHICLE_ORDERS.
|
static |
Check whether the given name is globally unique amongst depots.
| name | The name to check. |
Definition at line 30 of file depot_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_depot_pool >::Iterate().
Referenced by CmdRenameDepot().