diff options
author | Patric Stout <truebrain@openttd.org> | 2021-05-29 23:27:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 23:27:01 +0200 |
commit | d70fb74ac669bdb64b5f594894629ec91801fd76 (patch) | |
tree | 344150f3a69cd97cf774eec16eed291ed4e2467c /src/script/api/script_group.cpp | |
parent | 5799402f7a4872d03809838dd7fa01db42bbd282 (diff) | |
download | openttd-d70fb74ac669bdb64b5f594894629ec91801fd76.tar.xz |
Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
Diffstat (limited to 'src/script/api/script_group.cpp')
-rw-r--r-- | src/script/api/script_group.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_group.cpp b/src/script/api/script_group.cpp index 9cf6c7c95..0295c67aa 100644 --- a/src/script/api/script_group.cpp +++ b/src/script/api/script_group.cpp @@ -118,7 +118,7 @@ { if (HasWagonRemoval() == enable_removal) return true; - return ScriptObject::DoCommand(0, ::GetCompanySettingIndex("company.renew_keep_length"), enable_removal ? 1 : 0, CMD_CHANGE_COMPANY_SETTING); + return ScriptObject::DoCommand(0, 0, enable_removal ? 1 : 0, CMD_CHANGE_COMPANY_SETTING, "company.renew_keep_length"); } /* static */ bool ScriptGroup::HasWagonRemoval() |