Module: Lich::Common::CharSettings
- Defined in:
- documented/common/settings/charsettings.rb
Overview
Provides character settings management for the Lich5 project. This module allows for dynamic access and modification of character settings.
Class Method Summary collapse
-
.[](name) ⇒ Object
Retrieves a character setting by name.
-
.[]=(name, value) ⇒ Object
Sets a character setting by name.
-
.active_scope ⇒ String
Returns the active scope for character settings.
-
.auto ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.auto=(_val) ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.autoload ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.clear ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.load ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.save ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.save_all ⇒ nil
deprecated
Deprecated.
This method is not in use.
-
.to_hash ⇒ Object
Converts the character settings to a hash-like structure.
Class Method Details
.[](name) ⇒ Object
Retrieves a character setting by name.
26 27 28 |
# File 'documented/common/settings/charsettings.rb', line 26 def self.[](name) Settings.get_scoped_setting(active_scope, name) end |
.[]=(name, value) ⇒ Object
Sets a character setting by name.
36 37 38 |
# File 'documented/common/settings/charsettings.rb', line 36 def self.[]=(name, value) Settings.set_script_settings(active_scope, name, value) end |
.active_scope ⇒ String
Returns the active scope for character settings. This scope is a combination of the game and character name.
16 17 18 19 |
# File 'documented/common/settings/charsettings.rb', line 16 def self.active_scope # Ensure XMLData.game and XMLData.name are available and up-to-date when scope is needed "#{XMLData.game}:#{XMLData.name}" end |
.auto ⇒ nil
This method is not in use.
Retrieves the auto setting (deprecated). This method is no longer applicable and will log a deprecation warning.
101 102 103 104 |
# File 'documented/common/settings/charsettings.rb', line 101 def CharSettings.auto Lich.deprecated("CharSettings.auto", "not using, not applicable,", caller[0], fe_log: true) nil end |
.auto=(_val) ⇒ nil
This method is not in use.
Sets the auto setting (deprecated). This method is no longer applicable and will log a deprecation warning.
93 94 95 |
# File 'documented/common/settings/charsettings.rb', line 93 def CharSettings.auto=(_val) Lich.deprecated("CharSettings.auto=(val)", "not using, not applicable,", caller[0], fe_log: true) end |
.autoload ⇒ nil
This method is not in use.
Retrieves the autoload setting (deprecated). This method is no longer applicable and will log a deprecation warning.
110 111 112 113 |
# File 'documented/common/settings/charsettings.rb', line 110 def CharSettings.autoload Lich.deprecated("CharSettings.autoload", "not using, not applicable,", caller[0], fe_log: true) nil end |
.clear ⇒ nil
This method is not in use.
Clears character settings (deprecated). This method is no longer applicable and will log a deprecation warning.
83 84 85 86 |
# File 'documented/common/settings/charsettings.rb', line 83 def CharSettings.clear Lich.deprecated("CharSettings.clear", "not using, not applicable,", caller[0], fe_log: true) nil end |
.load ⇒ nil
This method is not in use.
deprecated Loads character settings (deprecated). This method is no longer applicable and will log a deprecation warning.
56 57 58 59 |
# File 'documented/common/settings/charsettings.rb', line 56 def CharSettings.load Lich.deprecated("CharSettings.load", "not using, not applicable,", caller[0], fe_log: true) nil end |
.save ⇒ nil
This method is not in use.
Saves character settings (deprecated). This method is no longer applicable and will log a deprecation warning.
65 66 67 68 |
# File 'documented/common/settings/charsettings.rb', line 65 def CharSettings.save Lich.deprecated("CharSettings.save", "not using, not applicable,", caller[0], fe_log: true) nil end |
.save_all ⇒ nil
This method is not in use.
Saves all character settings (deprecated). This method is no longer applicable and will log a deprecation warning.
74 75 76 77 |
# File 'documented/common/settings/charsettings.rb', line 74 def CharSettings.save_all Lich.deprecated("CharSettings.save_all", "not using, not applicable,", caller[0], fe_log: true) nil end |
.to_hash ⇒ Object
This method does not behave like a standard Ruby hash request.
Converts the character settings to a hash-like structure. This method returns a proxy for the character settings scope, allowing for persistent modifications.
44 45 46 47 48 49 |
# File 'documented/common/settings/charsettings.rb', line 44 def self.to_hash # NB: This method does not behave like a standard Ruby hash request. # It returns a root proxy for the character settings scope, allowing persistent # modifications on the returned object for legacy support. Settings.wrap_value_if_container(Settings.current_script_settings(active_scope), active_scope, []) end |