summaryrefslogtreecommitdiff
path: root/worldedit_gui
diff options
context:
space:
mode:
authorUberi <azhang9@gmail.com>2014-01-02 18:03:52 -0500
committerUberi <azhang9@gmail.com>2014-01-02 18:03:52 -0500
commitd73b93d8dd11c5c98fe67c8eab97b05fcda25c51 (patch)
treea308585109a49c1c6a087c7f69542fa3010903bf /worldedit_gui
parent8c0b61194cb00e362bf59a40bb5e3868c0bed922 (diff)
Fix the creative inventory being borked if neither Unified Inventory or Inventory++ is installed (thanks cheapie!).
Diffstat (limited to 'worldedit_gui')
-rw-r--r--worldedit_gui/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/worldedit_gui/init.lua b/worldedit_gui/init.lua
index 80e5a29..fe51720 100644
--- a/worldedit_gui/init.lua
+++ b/worldedit_gui/init.lua
@@ -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