mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Create a hookable location checking function for actions (#11860)
* Create a hookable location checking function for actions * Add location valid to a number of game actions Actually pass the coordinates to the script Use LocationValid on further game actions Add further actions to the LocationValid. Update api Update remaining actions to use LocationValid * Fix bug with peep pickup Adjust api
This commit is contained in:
@@ -37,6 +37,11 @@ GameActionResult::Ptr TrackDesignAction::Query() const
|
||||
res->Expenditure = ExpenditureType::RideConstruction;
|
||||
_currentTrackPieceDirection = _loc.direction;
|
||||
|
||||
if (!LocationValid(_loc))
|
||||
{
|
||||
return MakeResult(GA_ERROR::INVALID_PARAMETERS);
|
||||
}
|
||||
|
||||
const rct_object_entry* rideEntryObject = &_td.vehicle_object;
|
||||
|
||||
uint8_t entryType;
|
||||
|
||||
Reference in New Issue
Block a user