1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Allow plugins to target a specific API version

This commit is contained in:
ZehMatt
2021-08-04 20:58:02 +03:00
parent af102e391e
commit a7bef5442b
6 changed files with 40 additions and 2 deletions

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