diff options
author | Anthony <azhang9@gmail.com> | 2014-01-02 21:58:30 -0800 |
---|---|---|
committer | Anthony <azhang9@gmail.com> | 2014-01-02 21:58:30 -0800 |
commit | 277b57a82a630b7334df2708054fe7ef0095d831 (patch) | |
tree | 8d2e5072e71877b7e7f1472d53144b05921c22f9 | |
parent | 2ac049c823b75e5a348b180f6a76110d1a1c54bd (diff) | |
parent | d2635544c65c491b7e7df7def9ee39c17daf8fe9 (diff) |
Merge pull request #28 from cheapie/master
Added compatibility with my version of creative_inventory.
-rw-r--r-- | worldedit_gui/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/worldedit_gui/init.lua b/worldedit_gui/init.lua index d309d7e..27190ab 100644 --- a/worldedit_gui/init.lua +++ b/worldedit_gui/init.lua @@ -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;]" @@ -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")
\ No newline at end of file +dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/functionality.lua") |