mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 04:53:12 +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:
@@ -28,7 +28,8 @@ HOOK_TYPE OpenRCT2::Scripting::GetHookType(const std::string& name)
|
||||
{ "network.authenticate", HOOK_TYPE::NETWORK_AUTHENTICATE },
|
||||
{ "network.join", HOOK_TYPE::NETWORK_JOIN },
|
||||
{ "network.leave", HOOK_TYPE::NETWORK_LEAVE },
|
||||
{ "ride.ratings.calculate", HOOK_TYPE::RIDE_RATINGS_CALCULATE } });
|
||||
{ "ride.ratings.calculate", HOOK_TYPE::RIDE_RATINGS_CALCULATE },
|
||||
{ "action.location", HOOK_TYPE::ACTION_LOCATION } });
|
||||
auto result = LookupTable.find(name);
|
||||
return (result != LookupTable.end()) ? result->second : HOOK_TYPE::UNDEFINED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user