diff options
author | frosch <frosch@openttd.org> | 2012-12-26 17:43:35 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-12-26 17:43:35 +0000 |
commit | 0efd29b71bc88303e84f14bdf5c13b6e30dd85e2 (patch) | |
tree | 56a5eea697e42408d41eb828004c9ffdb9a82f4c /src/settings.cpp | |
parent | 9bce12a0ce1e084c5046500cc45c7883102b2c2f (diff) | |
download | openttd-0efd29b71bc88303e84f14bdf5c13b6e30dd85e2.tar.xz |
(svn r24860) -Codechange: Add SettingDesc::GetType().
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index e1649b269..5a80b9bbd 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -748,6 +748,16 @@ bool SettingDesc::IsEditable(bool do_command) const return true; } +/** + * Return the type of the setting. + * @return type of setting + */ +SettingType SettingDesc::GetType() const +{ + if (this->desc.flags & SGF_PER_COMPANY) return ST_COMPANY; + return (this->save.conv & SLF_NOT_IN_SAVE) ? ST_CLIENT : ST_GAME; +} + /* Begin - Callback Functions for the various settings. */ /** Reposition the main toolbar as the setting changed. */ |