OpenTTD Source: src/depot_cmd.h File Reference

OpenTTD Source 14.1

Functions
depot_cmd.h File Reference
`#include "command_type.h"`
`#include "depot_type.h"`

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...

## Detailed Description

Command definitions related to depots.

Definition in file depot_cmd.h.

## Function Documentation

## ◆ CcCloneVehicle()

void CcCloneVehicle | ( | Commands | ,
|  | const CommandCost & | result,
|  | VehicleID | veh_id
| ) |  |

This is the Callback method after the cloning attempt of a vehicle.

Parameters

  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().

## ◆ CmdRenameDepot()

CommandCost CmdRenameDepot | ( | DoCommandFlag | flags,
|  | DepotID | depot_id,
|  | const std::string & | text
| ) |  |

Rename a depot.

Parameters

  flags | type of operation
  depot_id | id of depot
  text | the new name or an empty string when resetting to the default

Returns
  the cost of this operation or an error

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.