mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Removed drop and add_item for teleport and dig arrows
This commit is contained in:
parent
6b7b073cd9
commit
678715707e
@ -69,11 +69,11 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
if node.name ~= "air" and not string.find(node.name, "water") then
|
||||
if node.name ~= "ignore" and minetest.get_item_group(node.name, "unbreakable") == 0
|
||||
and not minetest.is_protected(self.lastpos, self.player)
|
||||
and node.diggable ~= false then
|
||||
and node.diggable ~= false
|
||||
and areas:canInteract(pos, "") then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
minetest.add_item(self.lastpos, node.name)
|
||||
end
|
||||
minetest.add_item(self.lastpos, "throwing:arrow_dig")
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
@ -54,7 +54,6 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
local player = minetest.get_player_by_name(self.player)
|
||||
if player then
|
||||
player:setpos(pos)
|
||||
player:get_inventory():add_item("main", ItemStack("default:stick 2"))
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
@ -70,7 +69,6 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
local player = minetest.get_player_by_name(self.player)
|
||||
if player then
|
||||
player:setpos(self.lastpos)
|
||||
player:get_inventory():add_item("main", ItemStack("default:stick 2"))
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
|
Loading…
Reference in New Issue
Block a user