1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Separate map.change and map.changed events

Also fix network plugin logic.
This commit is contained in:
Ted John
2022-03-21 22:56:21 +00:00
parent e4a10b8eb4
commit 9f96b0df33
13 changed files with 70 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ static const EnumMap<HOOK_TYPE> HooksLookupTable({
{ "guest.generation", HOOK_TYPE::GUEST_GENERATION },
{ "vehicle.crash", HOOK_TYPE::VEHICLE_CRASH },
{ "map.change", HOOK_TYPE::MAP_CHANGE },
{ "map.changed", HOOK_TYPE::MAP_CHANGED },
{ "map.save", HOOK_TYPE::MAP_SAVE },
});
@@ -100,7 +101,7 @@ bool HookEngine::HasSubscriptions(HOOK_TYPE type) const
bool HookEngine::IsValidHookForPlugin(HOOK_TYPE type, Plugin& plugin) const
{
if (type == HOOK_TYPE::MAP_CHANGE && plugin.GetMetadata().Type != PluginType::Intransient)
if (type == HOOK_TYPE::MAP_CHANGED && plugin.GetMetadata().Type != PluginType::Intransient)
{
return false;
}