Skip to content

Commit

Permalink
use json for storage
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jan 16, 2024
1 parent af9973f commit bcf0374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions items.lua
Original file line number Diff line number Diff line change
@@ -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 = {}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bcf0374

Please sign in to comment.