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
+1 -1
View File
@@ -50,7 +50,7 @@ void GameInstance::RegisterAPI()
RegisterGameTranslation(this->engine);
if (!this->LoadCompatibilityScripts(this->versionAPI, GAME_DIR)) this->Died();
if (!this->LoadCompatibilityScripts(GAME_DIR, GameInfo::ApiVersions)) this->Died();
}
int GameInstance::GetSetting(const std::string &name)