diff options
author | Uberi <azhang9@gmail.com> | 2013-12-22 13:46:59 -0500 |
---|---|---|
committer | Uberi <azhang9@gmail.com> | 2013-12-22 13:48:56 -0500 |
commit | df6ab06e746939bad72f0c7ff4dcfd6a46f71925 (patch) | |
tree | 47d5671271bd243cae611e3e2a220f1f26f6979f /worldedit_gui/init.lua | |
parent | 4e78ced6934ece05c9202fecea7418d0d233ed1b (diff) |
Update worldedit_gui to work with latest unified_inventory (thanks LazyJ!).
Diffstat (limited to 'worldedit_gui/init.lua')
-rw-r--r-- | worldedit_gui/init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/worldedit_gui/init.lua b/worldedit_gui/init.lua index d1be200..be6e946 100644 --- a/worldedit_gui/init.lua +++ b/worldedit_gui/init.lua @@ -67,7 +67,6 @@ local get_formspec = function(name, identifier) return worldedit.pages["worldedit_gui"].get_formspec(name) --default to showing main page if an unknown page is given end - if unified_inventory then local old_func = worldedit.register_gui_function worldedit.register_gui_function = function(identifier, options) @@ -82,7 +81,10 @@ if unified_inventory then minetest.register_on_player_receive_fields(function(player, formname, fields) local name = player:get_player_name() - if fields.worldedit_gui_exit then + if fields.worldedit_gui then --main page + worldedit.show_page(name, "worldedit_gui") + return true + elseif fields.worldedit_gui_exit then --return to original page unified_inventory.set_inventory_formspec(minetest.get_player_by_name(name), "craft") return true end |