]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Advanced settings noiseparams: No tailing comma for empty flags
authorsrifqi <muhammadrifqipriyosusanto@gmail.com>
Thu, 10 Jan 2019 17:56:48 +0000 (18:56 +0100)
committerparamat <mat.gregory@virginmedia.com>
Sat, 19 Jan 2019 18:37:19 +0000 (18:37 +0000)
Previously, when editing noiseparams and disabling all the noise
flags, the noiseparam is displyed in advanced settings with a
tailing comma.

builtin/mainmenu/dlg_settings_advanced.lua

index 4a6fcfba7cef84d303efb0435c85dc41d1207e51..ea013458045d37365241db1ec56c1fe3bfed4bcb 100644 (file)
@@ -522,8 +522,10 @@ local function get_current_np_group_as_string(setting)
                        value.seed .. ", " ..
                        value.octaves .. ", " ..
                        value.persistence .. ", " ..
                        value.seed .. ", " ..
                        value.octaves .. ", " ..
                        value.persistence .. ", " ..
-                       value.lacunarity .. ", " ..
-                       value.flags
+                       value.lacunarity
+               if value.flags ~= "" then
+                       t = t .. ", " .. value.flags
+               end
        end
        return t
 end
        end
        return t
 end