Fix the creative inventory being borked if neither Unified Inventory or Inventory++ is installed (thanks cheapie!).

This commit is contained in:
Uberi 2014-01-02 18:03:52 -05:00
parent 8c0b61194c
commit d73b93d8dd
1 changed files with 2 additions and 2 deletions

View 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