summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-06-23 19:30:16 -0400
committerAnthony Zhang <azhang9@gmail.com>2013-06-23 19:30:16 -0400
commitdf0161f65e44987cc389397799d947728b1e71fd (patch)
tree7e8089eba541ee157b95b6940cfd72a625d31c3e
parente728df46df9ad47dec19dc0a68caafe2b88669a8 (diff)
downloadpipeworks-df0161f65e44987cc389397799d947728b1e71fd.tar
pipeworks-df0161f65e44987cc389397799d947728b1e71fd.tar.gz
pipeworks-df0161f65e44987cc389397799d947728b1e71fd.tar.bz2
pipeworks-df0161f65e44987cc389397799d947728b1e71fd.tar.xz
pipeworks-df0161f65e44987cc389397799d947728b1e71fd.zip
No infinite stacks allowed! Fix the bug where deployers have infinite stacks just like players.
-rw-r--r--deployer.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/deployer.lua b/deployer.lua
index 5b500b7..7622b52 100644
--- a/deployer.lua
+++ b/deployer.lua
@@ -58,6 +58,9 @@ deployer_on = function(pos, node)
get_player_control = function() return {jump=false,right=false,left=false,LMB=false,RMB=false,sneak=false,aux1=false,down=false,up=false} end,
}
local stack2 = minetest.item_place(stack, placer, {type="node", under=pos1, above=pos2})
+ if minetest.setting_getbool("creative_mode") and not minetest.get_modpath("unified_inventory") then --infinite stacks ahoy!
+ stack2:take_item()
+ end
invlist[i] = stack2
inv:set_list("main", invlist)
return