OpenTTD Source 20241224-master-gf74b0cf984
|
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. | |
void | CcCloneVehicle (Commands cmd, const CommandCost &result, VehicleID veh_id) |
This is the Callback method after the cloning attempt of a vehicle. | |
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.
References CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::Get(), and ShowVehicleViewWindow().
Referenced by VehicleViewWindow::OnClick(), and 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(), GetTileOwner(), GetWindowClassForVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, IsUniqueDepotName(), MakeDefaultName(), MAX_LENGTH_DEPOT_NAME_CHARS, VehicleListIdentifier::Pack(), SetWindowClassesDirty(), SetWindowDirty(), Utf8StringLength(), WC_VEHICLE_DEPOT, and WC_VEHICLE_ORDERS.