Remove: [Script] random_deviation from setting description table (#12221)

This commit is contained in:
Loïc Guilloux
2024-03-05 12:41:04 +01:00
committed by GitHub
parent 0fd576bfbc
commit 845b894fd8
14 changed files with 28 additions and 137 deletions

View File

@@ -123,15 +123,6 @@ void ScriptConfig::ResetEditableSettings(bool yet_to_start)
}
}
void ScriptConfig::AddRandomDeviation(CompanyID owner)
{
for (const auto &item : *this->GetConfigList()) {
if (item.random_deviation != 0) {
this->SetSetting(item.name, ScriptObject::GetRandomizer(owner).Next(item.random_deviation * 2 + 1) - item.random_deviation + this->GetSetting(item.name));
}
}
}
bool ScriptConfig::HasScript() const
{
return this->info != nullptr;