mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
Add Classification field to RTD (#17131)
This commit is contained in:
@@ -5300,27 +5300,8 @@ void Ride::Renew()
|
||||
|
||||
RideClassification Ride::GetClassification() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case RIDE_TYPE_FOOD_STALL:
|
||||
case RIDE_TYPE_1D:
|
||||
case RIDE_TYPE_DRINK_STALL:
|
||||
case RIDE_TYPE_1F:
|
||||
case RIDE_TYPE_SHOP:
|
||||
case RIDE_TYPE_22:
|
||||
case RIDE_TYPE_50:
|
||||
case RIDE_TYPE_52:
|
||||
case RIDE_TYPE_53:
|
||||
case RIDE_TYPE_54:
|
||||
return RideClassification::ShopOrStall;
|
||||
case RIDE_TYPE_INFORMATION_KIOSK:
|
||||
case RIDE_TYPE_TOILETS:
|
||||
case RIDE_TYPE_CASH_MACHINE:
|
||||
case RIDE_TYPE_FIRST_AID:
|
||||
return RideClassification::KioskOrFacility;
|
||||
default:
|
||||
return RideClassification::Ride;
|
||||
}
|
||||
const auto& rtd = GetRideTypeDescriptor();
|
||||
return rtd.Classification;
|
||||
}
|
||||
|
||||
bool Ride::IsRide() const
|
||||
|
||||
@@ -189,6 +189,7 @@ struct RideTypeDescriptor
|
||||
track_colour_preset_list ColourPresets;
|
||||
RideColourPreview ColourPreview;
|
||||
RideColourKey ColourKey;
|
||||
RideClassification Classification = RideClassification::Ride;
|
||||
|
||||
bool HasFlag(uint64_t flag) const;
|
||||
void GetAvailableTrackPieces(RideTrackGroup& res) const;
|
||||
|
||||
@@ -46,5 +46,6 @@ constexpr const RideTypeDescriptor CashMachineRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::CashMachine),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -47,5 +47,6 @@ constexpr const RideTypeDescriptor DrinkStallRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Drink),
|
||||
SET_FIELD(Classification, RideClassification::ShopOrStall),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -47,5 +47,6 @@ constexpr const RideTypeDescriptor FirstAidRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::FirstAid),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -47,5 +47,6 @@ constexpr const RideTypeDescriptor FoodStallRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Food),
|
||||
SET_FIELD(Classification, RideClassification::ShopOrStall),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -47,5 +47,6 @@ constexpr const RideTypeDescriptor InformationKioskRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::InfoKiosk),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -47,5 +47,6 @@ constexpr const RideTypeDescriptor ShopRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Shop),
|
||||
SET_FIELD(Classification, RideClassification::ShopOrStall),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -47,5 +47,6 @@ constexpr const RideTypeDescriptor ToiletsRTD =
|
||||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Toilets),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
Reference in New Issue
Block a user