From bcf037408d2d9e57f28be3549d621f592e1b7c01 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Tue, 16 Jan 2024 20:24:34 +0100 Subject: [PATCH] use json for storage --- items.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/items.lua b/items.lua index 83adc70..6ba120b 100644 --- a/items.lua +++ b/items.lua @@ -1,6 +1,6 @@ local function check_registered_items() - mtui.items = minetest.deserialize(mtui.mod_storage:get_string("registered_items")) or {} + mtui.items = minetest.parse_json(mtui.mod_storage:get_string("registered_items")) or {} -- assemble node-list from registered lbm's local lbm_nodes = {} @@ -32,7 +32,7 @@ local function check_registered_items() end -- save current list back - mtui.mod_storage:set_string("registered_items", minetest.serialize(mtui.items)) + mtui.mod_storage:set_string("registered_items", minetest.write_json(mtui.items)) end -- execute check after mods loaded and other things are set up