summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-11-27 13:31:12 -0500
committerGitHub <noreply@github.com>2016-11-27 13:31:12 -0500
commite57a5f80b4258c3408ecfff965f0fd527f592f6f (patch)
tree2ca56be01418576da3a81cad738709182fef9655
parent2fb61ca7fb70b07f8386380934acf6c0ec6d549c (diff)
parenta661f54e722d1967eae77d1f7f8e9cd44f40ee26 (diff)
Merge pull request #80 from Wuzzy2/give
Also enable “Give me” for creative mode and priv
-rw-r--r--register.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/register.lua b/register.lua
index ed81dbf..f0c045c 100644
--- a/register.lua
+++ b/register.lua
@@ -282,7 +282,7 @@ unified_inventory.register_page("craftguide", {
formspec = formspec.."image["..no_pos..","..formspecy..";1.1,1.1;ui_no.png]"
formspec = formspec..stack_image_button(item_pos, formspecy, 1.1, 1.1, "item_button_"
..other_dir[dir].."_", ItemStack(item_name))
- if player_privs.give == true then
+ if player_privs.give == true or player_privs.creative == true or minetest.setting_getbool("creative_mode") == true then
formspec = formspec.."label[0,"..(formspecy + 2.10)..";" .. F("Give me:") .. "]"
.."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]"
.."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]"
@@ -359,7 +359,7 @@ unified_inventory.register_page("craftguide", {
.."button[0.6,"..(formspecy + 1.5)..";0.7,0.5;craftguide_craft_10;10]"
.."button[1.3,"..(formspecy + 1.5)..";0.8,0.5;craftguide_craft_max;" .. F("All") .. "]"
end
- if player_privs.give then
+ if player_privs.give == true or player_privs.creative == true or minetest.setting_getbool("creative_mode") == true then
formspec = formspec.."label[0,"..(formspecy + 2.1)..";" .. F("Give me:") .. "]"
.."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]"
.."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]"