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.
This commit is contained in:
@@ -302,6 +302,5 @@ typedef std::initializer_list<std::unique_ptr<const SettingDesc>> SettingTable;
|
||||
const SettingDesc *GetSettingFromName(const char *name);
|
||||
bool SetSettingValue(const IntSettingDesc *sd, int32 value, bool force_newgame = false);
|
||||
bool SetSettingValue(const StringSettingDesc *sd, const std::string value, bool force_newgame = false);
|
||||
uint GetSettingIndex(const SettingDesc *sd);
|
||||
|
||||
#endif /* SETTINGS_INTERNAL_H */
|
||||
|
||||
Reference in New Issue
Block a user