Allow plugins to target a specific API version

This commit is contained in:
ZehMatt committed 2021-08-05 17:16:42 +03:00
1 parent af102e391e
commit a7bef5442b
6 files changed
+40 -2

No files matched your search

+7
View File
@@ -1419,4 +1419,11 @@ void OpenRCT2::Scripting::ThrowIfGameStateNotMutable()
}
}
int32_t OpenRCT2::Scripting::GetTargetAPIVersion()
{
auto& scriptEngine = GetContext()->GetScriptEngine();
auto& execInfo = scriptEngine.GetExecInfo();
return execInfo.GetCurrentPlugin()->GetTargetAPIVersion();
}
#endif