OpenTTD Source
20241121-master-g67a0fccfad
|
Command definitions related to depots. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdRenameDepot (DoCommandFlag flags, DepotID depot_id, const std::string &text) |
Rename a depot. More... | |
void | CcCloneVehicle (Commands cmd, const CommandCost &result, VehicleID veh_id) |
This is the Callback method after the cloning attempt of a vehicle. More... | |
Command definitions related to depots.
Definition in file depot_cmd.h.
void CcCloneVehicle | ( | Commands | cmd, |
const CommandCost & | result, | ||
VehicleID | veh_id | ||
) |
This is the Callback method after the cloning attempt of a vehicle.
result | the result of the cloning command |
veh_id | cloned vehicle ID |
Definition at line 123 of file depot_gui.cpp.
Referenced by DepotWindow::OnVehicleSelect().
CommandCost CmdRenameDepot | ( | DoCommandFlag | 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, DC_EXEC, CommandCost::Failed(), GetDepotVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_depot_pool >::GetIfValid(), GetWindowClassForVehicleType(), IsUniqueDepotName(), MakeDefaultName(), MAX_LENGTH_DEPOT_NAME_CHARS, return_cmd_error, SetWindowClassesDirty(), SetWindowDirty(), Utf8StringLength(), WC_VEHICLE_DEPOT, and WC_VEHICLE_ORDERS.