Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #28 from cheapie/master
Added compatibility with my version of creative_inventory.
  • Loading branch information
Uberi committed Jan 3, 2014
2 parents 2ac049c + d263554 commit 277b57a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worldedit_gui/init.lua
Expand Up @@ -129,7 +129,7 @@ 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, add button to modified formspec
if (minetest.check_player_privs(name, {creative=true}) or 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;]"
Expand Down Expand Up @@ -228,4 +228,4 @@ worldedit.register_gui_handler("worldedit_gui", function(name, fields)
return false
end)

dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/functionality.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/functionality.lua")

0 comments on commit 277b57a

Please sign in to comment.