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:
@@ -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