From 3eafeb4cf8ff30000c0028b6337ca4869a675e3b Mon Sep 17 00:00:00 2001 From: Athozus Date: Mon, 1 Jan 2024 19:19:51 +0100 Subject: [PATCH] Remove selected_idxs for settings after saving --- ui/settings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/settings.lua b/ui/settings.lua index 6a9cfa9..7c8f9e1 100644 --- a/ui/settings.lua +++ b/ui/settings.lua @@ -156,6 +156,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) -- save settings for setting, _ in pairs(mail.settings) do local new_value = mail.selected_idxs[setting][playername] + mail.selected_idxs[setting][playername] = nil if new_value == nil then new_value = mail.get_setting(playername, setting) end mail.set_setting(playername, setting, new_value) end