mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 14:25:10 +00:00
Add TNT support to dispenser
This commit is contained in:
parent
b92a220e49
commit
eaeebd900b
1 changed files with 10 additions and 0 deletions
|
@ -94,10 +94,20 @@ local dispenserdef = {
|
|||
end
|
||||
|
||||
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
|
||||
-- Place head, shulker box, or pumpkin
|
||||
if dropnodedef.buildable_to then
|
||||
minetest.set_node(droppos, {name = iname, param2 = node.param2})
|
||||
|
||||
stack:take_item()
|
||||
inv:set_stack("main", stack_id, stack)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue