Remove: [Script] CONFIG_RANDOM from AddSetting flags (#11942)
It had a very weird interaction, and was only ever used by a single AI.
This commit is contained in:
@@ -34,14 +34,6 @@ void ScriptConfig::Change(std::optional<const std::string> name, int version, bo
|
||||
this->ClearConfigList();
|
||||
|
||||
if (_game_mode == GM_NORMAL && this->info != nullptr) {
|
||||
/* If we're in an existing game and the Script is changed, set all settings
|
||||
* for the Script that have the random flag to a random value. */
|
||||
for (const auto &item : *this->info->GetConfigList()) {
|
||||
if (item.flags & SCRIPTCONFIG_RANDOM) {
|
||||
this->SetSetting(item.name, ScriptObject::GetRandomizer(OWNER_NONE).Next(item.max_value + 1 - item.min_value) + item.min_value);
|
||||
}
|
||||
}
|
||||
|
||||
this->AddRandomDeviation();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user