mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Update dig arrows to avoid digging nodes that shouldn't be dug
- Dig arrows now check for areas, .diggable, and unbreakables
This commit is contained in:
parent
fedc2c9433
commit
2e1803efe0
@ -69,8 +69,10 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
if self.lastpos.x~=nil then
|
||||
if node.name ~= "air" then
|
||||
self.object:remove()
|
||||
if node.diggable ~= false then
|
||||
minetest.dig_node(pos)
|
||||
if minetest.get_item_group(node.name, "unbreakable") == 0
|
||||
and areas:canInteract(self.lastpos, self.player:get_player_name())
|
||||
and node.diggable ~= false then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
end
|
||||
local toughness = 0.65
|
||||
if math.random() < toughness then
|
||||
|
Loading…
Reference in New Issue
Block a user