mirror of https://github.com/OpenRCT2/OpenRCT2.git
change to return Ride
This commit is contained in:
parent
29dafcd025
commit
4e6cd49304
|
@ -475,8 +475,9 @@ namespace OpenRCT2::Scripting
|
|||
}
|
||||
}
|
||||
|
||||
int16_t ScGuest::rideHeadedTo_get() const
|
||||
std::shared_ptr<ScRide> ScGuest::rideHeadedTo_get() const
|
||||
{
|
||||
ThrowIfGameStateNotMutable();
|
||||
auto peep = GetGuest();
|
||||
if (peep != nullptr)
|
||||
{
|
||||
|
@ -484,10 +485,10 @@ namespace OpenRCT2::Scripting
|
|||
auto ride = GetRideManager()[rideId];
|
||||
if (ride != nullptr)
|
||||
{
|
||||
return (ride->id.ToUnderlying());
|
||||
return std::make_shared<ScRide>(ride->id);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return {};
|
||||
}
|
||||
|
||||
void ScGuest::rideHeadedTo_set(uint16_t rideId)
|
||||
|
|
|
@ -166,7 +166,7 @@ namespace OpenRCT2::Scripting
|
|||
uint8_t lostCountdown_get() const;
|
||||
void lostCountdown_set(uint8_t value);
|
||||
|
||||
int16_t rideHeadedTo_get() const;
|
||||
std::shared_ptr<ScRide> rideHeadedTo_get() const;
|
||||
void rideHeadedTo_set(uint16_t rideId);
|
||||
|
||||
DukValue thoughts_get() const;
|
||||
|
|
Loading…
Reference in New Issue