Codechange: [Script] rework how compat-scripts work and are loaded (#13504)

- compat_NNN.nut files now only defines what is needed to downgrade from API NNN + 1 to NNN.
- Automatically load all required compatibility files based on the API version of the script, starting with the latest.
This commit is contained in:
Patric Stout
2025-02-09 16:04:04 +01:00
committed by GitHub
parent 2824e790ec
commit f60b3d7f79
42 changed files with 78 additions and 850 deletions

View File

@@ -54,7 +54,7 @@ void AIInstance::RegisterAPI()
/* Register all classes */
SQAI_RegisterAll(this->engine);
if (!this->LoadCompatibilityScripts(this->versionAPI, AI_DIR)) this->Died();
if (!this->LoadCompatibilityScripts(AI_DIR, AIInfo::ApiVersions)) this->Died();
}
void AIInstance::Died()