Remove unused command: CMD_SET_VEHICLE_UNIT_NUMBER

This commit is contained in:
Jonathan G Rennison
2024-03-26 17:26:49 +00:00
parent c295b1d99e
commit 459e13fc5a
3 changed files with 0 additions and 30 deletions

View File

@@ -1785,30 +1785,6 @@ CommandCost CmdSendVehicleToDepot(TileIndex tile, DoCommandFlag flags, uint32_t
return v->SendToDepot(flags, (DepotCommand)(p1 & DEPOT_COMMAND_MASK), p2);
}
/**
* Sets the vehicle unit number
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID to set number on
* @param p2 vehicle unit number
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdSetVehicleUnitNumber(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
Vehicle *v = Vehicle::GetIfValid(p1);
if (v == nullptr || !v->IsPrimaryVehicle()) return CMD_ERROR;
CommandCost ret = CheckOwnership(v->owner);
if (ret.Failed()) return ret;
if (flags & DC_EXEC) {
v->unitnumber = (UnitID)p2;
}
return CommandCost();
}
/**
* Give a custom name to your vehicle
* @param tile unused