mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-04 08:43:45 +01:00
Fix damaging anvil too aggressively
parent
9277bf4552
commit
0b80b60cf1
@ -242,6 +242,7 @@ local anvildef = {
|
||||
end
|
||||
update_anvil_slots(meta)
|
||||
|
||||
if from_list == "output" then
|
||||
local destroyed = damage_anvil(pos, player)
|
||||
-- Close formspec if anvil was destroyed
|
||||
if destroyed then
|
||||
@ -252,7 +253,7 @@ local anvildef = {
|
||||
TODO: Update this line when node formspecs get proper identifiers in Minetest. ]]
|
||||
minetest.close_formspec(player:get_player_name(), "")
|
||||
end
|
||||
|
||||
end
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -272,13 +273,14 @@ local anvildef = {
|
||||
end
|
||||
end
|
||||
update_anvil_slots(meta)
|
||||
if listname == "output" then
|
||||
local destroyed = damage_anvil(pos, player)
|
||||
|
||||
-- Close formspec if anvil was destroyed
|
||||
if destroyed then
|
||||
-- See above for justification.
|
||||
minetest.close_formspec(player:get_player_name(), "")
|
||||
end
|
||||
end
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
Loading…
Reference in New Issue
Block a user