forked from rosebudai/OpenRCT2-Web
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:
1 parent
0f12382895
commit
50d22ededd
47 files changed
+169
-21
No files matched your search
@@ -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