OpenTTD
Public Member Functions | Data Fields
SettingDesc Struct Reference

Public Member Functions

bool IsEditable (bool do_command=false) const
 Check whether the setting is editable in the current gamemode. More...
 
SettingType GetType () const
 Return the type of the setting. More...
 

Data Fields

SettingDescBase desc
 Settings structure (going to configuration file)
 
SaveLoad save
 Internal structure (going to savegame, parts to config)
 

Detailed Description

Definition at line 111 of file settings_internal.h.

Member Function Documentation

◆ GetType()

SettingType SettingDesc::GetType ( ) const

Return the type of the setting.

Returns
type of setting

Definition at line 780 of file settings.cpp.

References SaveLoad::conv, desc, SettingDescBase::flags, save, SGF_PER_COMPANY, SLF_NOT_IN_SAVE, ST_CLIENT, ST_COMPANY, and ST_GAME.

Referenced by SettingEntry::UpdateFilterState().

◆ IsEditable()

bool SettingDesc::IsEditable ( bool  do_command = false) const

Check whether the setting is editable in the current gamemode.

Parameters
do_commandtrue if this is about checking a command from the server.
Returns
true if editable.

Definition at line 765 of file settings.cpp.

References _network_server, _networking, SaveLoad::conv, desc, SettingDescBase::flags, save, SGF_NETWORK_ONLY, SGF_PER_COMPANY, and SLF_NO_NETWORK_SYNC.


The documentation for this struct was generated from the following files: