forked from VoxeLibre/VoxeLibre
Add TNT support to dispenser
This commit is contained in:
parent
b92a220e49
commit
eaeebd900b
|
@ -94,10 +94,20 @@ local dispenserdef = {
|
||||||
end
|
end
|
||||||
|
|
||||||
inv:set_stack("main", stack_id, stack)
|
inv:set_stack("main", stack_id, stack)
|
||||||
|
elseif iname == "mcl_tnt:tnt" then
|
||||||
|
-- Place and ignite TNT
|
||||||
|
if dropnodedef.buildable_to then
|
||||||
|
minetest.set_node(droppos, {name = iname})
|
||||||
|
tnt.ignite(droppos)
|
||||||
|
|
||||||
|
stack:take_item()
|
||||||
|
inv:set_stack("main", stack_id, stack)
|
||||||
|
end
|
||||||
elseif igroups.head or igroups.shulker_box or iname == "mcl_farming:pumpkin_face" then
|
elseif igroups.head or igroups.shulker_box or iname == "mcl_farming:pumpkin_face" then
|
||||||
-- Place head, shulker box, or pumpkin
|
-- Place head, shulker box, or pumpkin
|
||||||
if dropnodedef.buildable_to then
|
if dropnodedef.buildable_to then
|
||||||
minetest.set_node(droppos, {name = iname, param2 = node.param2})
|
minetest.set_node(droppos, {name = iname, param2 = node.param2})
|
||||||
|
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
inv:set_stack("main", stack_id, stack)
|
inv:set_stack("main", stack_id, stack)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue