forked from VoxeLibre/VoxeLibre
Merge pull request 'Make banners drop when the support node is dug' (#3606) from banner_node_support into master
Reviewed-on: MineClone2/MineClone2#3606 Reviewed-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
This commit is contained in:
commit
952c72c414
|
@ -113,14 +113,6 @@ local function on_dig_banner(pos, node, digger)
|
|||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
-- Drop item
|
||||
local meta = minetest.get_meta(pos)
|
||||
local item = meta:get_inventory():get_stack("banner", 1)
|
||||
if not item:is_empty() then
|
||||
minetest.handle_node_drops(pos, {item:to_string()}, digger)
|
||||
else
|
||||
minetest.handle_node_drops(pos, {"mcl_banners:banner_item_white"}, digger)
|
||||
end
|
||||
-- Remove node
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
|
@ -143,6 +135,14 @@ local function on_destruct_banner(pos, hanging)
|
|||
v:remove()
|
||||
end
|
||||
end
|
||||
-- Drop item
|
||||
local meta = minetest.get_meta(pos)
|
||||
local item = meta:get_inventory():get_stack("banner", 1)
|
||||
if not item:is_empty() then
|
||||
minetest.handle_node_drops(pos, {item:to_string()})
|
||||
else
|
||||
minetest.handle_node_drops(pos, {"mcl_banners:banner_item_white"})
|
||||
end
|
||||
end
|
||||
|
||||
local function on_destruct_standing_banner(pos)
|
||||
|
|
Loading…
Reference in New Issue