fix drops global in death scythe

This commit is contained in:
tenplus1 2024-04-27 07:54:05 +01:00
parent a5b7cf4db3
commit 5a9ea84082
2 changed files with 7 additions and 7 deletions

View File

@ -23,8 +23,8 @@ function nssm:affectbones(mobe) -- as function for adaptable heuristic
return not nssm.safebones return not nssm.safebones
end end
--[[
function drops(drop) function nssm:drops(drop)
if drop then if drop then
@ -35,7 +35,7 @@ function drops(drop)
}) })
end end
end end
]]
local function perpendicular_vector(vec) --returns a vector rotated of 90° in 2D local function perpendicular_vector(vec) --returns a vector rotated of 90° in 2D

View File

@ -1350,7 +1350,7 @@ minetest.register_tool("nssm:sword_of_gluttony", {
for i = 1, math.random(4) do for i = 1, math.random(4) do
drop = minetest.add_item(pos, drop = minetest.add_item(pos,
"nssm:roasted_duck_legs 1") "nssm:roasted_duck_legs 1")
drops(drop) nssm:drops(drop)
end end
local s = obj:get_pos() local s = obj:get_pos()
@ -1460,7 +1460,7 @@ minetest.register_tool("nssm:death_scythe", {
if math.random(3) == 1 then if math.random(3) == 1 then
v.y = v.y + 2 v.y = v.y + 2
drop = minetest.add_item(v, "nssm:life_energy 1") drop = minetest.add_item(v, "nssm:life_energy 1")
drops(drop) nssm:drops(drop)
end end
end end
@ -1474,7 +1474,7 @@ minetest.register_tool("nssm:death_scythe", {
if math.random(3) == 1 then if math.random(3) == 1 then
v.y = v.y + 2 v.y = v.y + 2
drop = minetest.add_item(v, "nssm:life_energy 1") drop = minetest.add_item(v, "nssm:life_energy 1")
drops(drop) nssm:drops(drop)
end end
end end
@ -1488,7 +1488,7 @@ minetest.register_tool("nssm:death_scythe", {
if math.random(3) == 1 then if math.random(3) == 1 then
v.y = v.y + 2 v.y = v.y + 2
drop = minetest.add_item(v, "nssm:life_energy 1") drop = minetest.add_item(v, "nssm:life_energy 1")
drops(drop) nssm:drops(drop)
end end
end end
end end