summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2015-04-08 23:20:35 -0700
committerAuke Kok <auke-jan.h.kok@intel.com>2015-04-08 23:20:35 -0700
commit8e3631e934558550aba8f3492a9acf0b220524a9 (patch)
tree24bf1ac8ad44dd508e2237a5932197ed9dc58053
parent0322a09011d3581516126832850105a205195802 (diff)
Make melon seeds infinite in creative mode.
-rw-r--r--melon.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/melon.lua b/melon.lua
index 7b687aa..e0877db 100644
--- a/melon.lua
+++ b/melon.lua
@@ -35,7 +35,9 @@ minetest.register_node("crops:melon_seed", {
return
end
minetest.set_node(pointed_thing.above, {name="crops:melon_plant_1"})
- itemstack:take_item()
+ if not minetest.setting_getbool("creative_mode") then
+ itemstack:take_item()
+ end
return itemstack
end
})