Change: Store running AI config inside Company (#12003)

This commit is contained in:
Loïc Guilloux
2024-02-09 22:55:49 +01:00
committed by GitHub
parent 466e6bb524
commit 977aba73be
15 changed files with 98 additions and 62 deletions

View File

@@ -56,7 +56,6 @@ public:
ScriptConfig() :
version(-1),
info(nullptr),
is_random(false),
to_load_data(nullptr)
{}
@@ -77,7 +76,7 @@ public:
* as specified. If false any compatible version is ok.
* @param is_random Is the Script chosen randomly?
*/
void Change(std::optional<const std::string> name, int version = -1, bool force_exact_match = false, bool is_random = false);
void Change(std::optional<const std::string> name, int version = -1, bool force_exact_match = false);
/**
* Get the ScriptInfo linked to this ScriptConfig.
@@ -144,11 +143,6 @@ public:
*/
bool HasScript() const;
/**
* Is the current Script a randomly chosen Script?
*/
bool IsRandom() const;
/**
* Get the name of the Script.
*/
@@ -188,7 +182,6 @@ protected:
class ScriptInfo *info; ///< ScriptInfo object for related to this Script version
SettingValueList settings; ///< List with all setting=>value pairs that are configure for this Script
std::unique_ptr<ScriptConfigItemList> config_list; ///< List with all settings defined by this Script
bool is_random; ///< True if the AI in this slot was randomly chosen.
std::unique_ptr<ScriptInstance::ScriptData> to_load_data; ///< Data to load after the Script start.
/**