mirror of https://github.com/OpenTTD/OpenTTD
Codechange: use INVALID_VEHICLE where that's more appropriate than e.g. vehicle 0
parent
ff8c748bf5
commit
b71a5158cf
|
@ -1017,7 +1017,7 @@ public:
|
|||
break;
|
||||
case ADI_SERVICE: // Send for servicing
|
||||
case ADI_DEPOT: { // Send to Depots
|
||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Post(GetCmdSendToDepotMsg(this->vli.vtype), 0, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli);
|
||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Post(GetCmdSendToDepotMsg(this->vli.vtype), INVALID_VEHICLE, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -680,7 +680,7 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance)
|
|||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, ScriptVehicle::IsPrimaryVehicle(vehicle_id));
|
||||
|
||||
return ScriptObject::Command<CMD_CLONE_ORDER>::Do(0, CO_UNSHARE, vehicle_id, 0);
|
||||
return ScriptObject::Command<CMD_CLONE_ORDER>::Do(0, CO_UNSHARE, vehicle_id, ::INVALID_VEHICLE);
|
||||
}
|
||||
|
||||
/* static */ SQInteger ScriptOrder::GetOrderDistance(ScriptVehicle::VehicleType vehicle_type, TileIndex origin_tile, TileIndex dest_tile)
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
VS_INVALID = 0xFF, ///< An invalid vehicle state.
|
||||
};
|
||||
|
||||
static const VehicleID VEHICLE_INVALID = 0xFFFFF; ///< Invalid VehicleID.
|
||||
static const VehicleID VEHICLE_INVALID = ::INVALID_VEHICLE; ///< Invalid VehicleID.
|
||||
|
||||
/**
|
||||
* Checks whether the given vehicle is valid and owned by you.
|
||||
|
|
|
@ -557,7 +557,7 @@ protected:
|
|||
this->SetTimeout();
|
||||
this->SetWidgetDirty(WID_SB_PAGE_PANEL);
|
||||
|
||||
Command<CMD_STORY_PAGE_BUTTON>::Post(TileIndex{}, pe.index, 0);
|
||||
Command<CMD_STORY_PAGE_BUTTON>::Post(TileIndex{}, pe.index, INVALID_VEHICLE);
|
||||
break;
|
||||
|
||||
case SPET_BUTTON_TILE:
|
||||
|
@ -906,7 +906,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
Command<CMD_STORY_PAGE_BUTTON>::Post(tile, pe->index, 0);
|
||||
Command<CMD_STORY_PAGE_BUTTON>::Post(tile, pe->index, INVALID_VEHICLE);
|
||||
ResetObjectToPlace();
|
||||
}
|
||||
|
||||
|
|
|
@ -2245,7 +2245,7 @@ public:
|
|||
break;
|
||||
case ADI_SERVICE: // Send for servicing
|
||||
case ADI_DEPOT: // Send to Depots
|
||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Post(GetCmdSendToDepotMsg(this->vli.vtype), 0, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli);
|
||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Post(GetCmdSendToDepotMsg(this->vli.vtype), INVALID_VEHICLE, DepotCommand::MassSend | (index == ADI_SERVICE ? DepotCommand::Service : DepotCommand::None), this->vli);
|
||||
break;
|
||||
|
||||
case ADI_CREATE_GROUP: // Create group
|
||||
|
|
Loading…
Reference in New Issue