]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix the creative inventory being borked if neither Unified Inventory or Inventory...
authorUberi <azhang9@gmail.com>
Thu, 2 Jan 2014 23:03:52 +0000 (18:03 -0500)
committerUberi <azhang9@gmail.com>
Thu, 2 Jan 2014 23:03:52 +0000 (18:03 -0500)
worldedit_gui/init.lua

index 80e5a29cbba2d5db1969f0c128775656d41de54e..fe5172084541810ac28713cc934e15297b6cd4e9 100644 (file)
@@ -129,8 +129,8 @@ else --fallback button
                        return
                end
                local player = minetest.get_player_by_name(name)
-               if minetest.setting_getbool("creative_mode") and creative_inventory then --creative_inventory is active
-                       formspec = formspec .. "image_button[6,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]"
+               if minetest.setting_getbool("creative_mode") and creative_inventory then --creative_inventory is active, add button to modified formspec
+                       formspec = player:get_inventory_formspec() .. "image_button[6,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]"
                else
                        formspec = formspec .. "image_button[0,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]"
                end