mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 08:21:44 -04:00
Avoid false for default transfer value
In set_setting, to eventually transfer to another mod. Suggested by S-S-X in #127
This commit is contained in:
parent
abd75e8a31
commit
fd42f00852
1 changed files with 3 additions and 3 deletions
|
@ -399,9 +399,9 @@ end
|
|||
|
||||
function mail.get_setting(playername, key)
|
||||
local entry = mail.get_storage_entry(playername)
|
||||
local value = entry.settings[key] == nil
|
||||
and mail.get_setting_default_value(key)
|
||||
or entry.settings[key]
|
||||
local value = (entry.settings[key] == nil
|
||||
and {mail.get_setting_default_value(key)}
|
||||
or {entry.settings[key]})[1]
|
||||
|
||||
if mail.settings[key].sync then -- in case this setting is shared with another mod
|
||||
value = mail.settings[key].sync(playername, key) -- get new value
|
||||
|
|
Loading…
Add table
Reference in a new issue