diff options
author | Gaƫl C <gael-de-sailly@netc.eu> | 2022-02-08 19:30:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 19:30:49 +0100 |
commit | 0dd8e8c2427f12a8a7d080132e9c588c66baa41b (patch) | |
tree | f9558273ac88d84ad9d1393524f2463b4b27d0d7 /builtin | |
parent | b9ee29a9456a66c3670b2a1389878e0896395f58 (diff) | |
download | minetest-0dd8e8c2427f12a8a7d080132e9c588c66baa41b.tar.gz minetest-0dd8e8c2427f12a8a7d080132e9c588c66baa41b.tar.bz2 minetest-0dd8e8c2427f12a8a7d080132e9c588c66baa41b.zip |
Noise params serialization fixup
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/dlg_settings_advanced.lua | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua index 83f905446..46c3f445c 100644 --- a/builtin/mainmenu/dlg_settings_advanced.lua +++ b/builtin/mainmenu/dlg_settings_advanced.lua @@ -497,22 +497,22 @@ end local function get_current_np_group(setting) local value = core.settings:get_np_group(setting.name) - local t = {} if value == nil then - t = setting.values - else - table.insert(t, value.offset) - table.insert(t, value.scale) - table.insert(t, value.spread.x) - table.insert(t, value.spread.y) - table.insert(t, value.spread.z) - table.insert(t, value.seed) - table.insert(t, value.octaves) - table.insert(t, value.persistence) - table.insert(t, value.lacunarity) - table.insert(t, value.flags) + return setting.values end - return t + local p = "%g" + return { + p:format(value.offset), + p:format(value.scale), + p:format(value.spread.x), + p:format(value.spread.y), + p:format(value.spread.z), + p:format(value.seed), + p:format(value.octaves), + p:format(value.persistence), + p:format(value.lacunarity), + value.flags + } end local function get_current_np_group_as_string(setting) |