forked from rosebudai/OpenRCT2-Web
Allow plugins to target a specific API version
This commit is contained in:
6 files changed
+40
-2
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user