From 5a9ea84082c7494561489c5f96d82abfb0f7afc5 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 27 Apr 2024 07:54:05 +0100 Subject: [PATCH] fix drops global in death scythe --- nssm_api.lua | 6 +++--- nssm_materials.lua | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nssm_api.lua b/nssm_api.lua index a6d124a..b4b6018 100644 --- a/nssm_api.lua +++ b/nssm_api.lua @@ -23,8 +23,8 @@ function nssm:affectbones(mobe) -- as function for adaptable heuristic return not nssm.safebones end ---[[ -function drops(drop) + +function nssm:drops(drop) if drop then @@ -35,7 +35,7 @@ function drops(drop) }) end end -]] + local function perpendicular_vector(vec) --returns a vector rotated of 90° in 2D diff --git a/nssm_materials.lua b/nssm_materials.lua index 5e04680..f3124e7 100644 --- a/nssm_materials.lua +++ b/nssm_materials.lua @@ -1350,7 +1350,7 @@ minetest.register_tool("nssm:sword_of_gluttony", { for i = 1, math.random(4) do drop = minetest.add_item(pos, "nssm:roasted_duck_legs 1") - drops(drop) + nssm:drops(drop) end local s = obj:get_pos() @@ -1460,7 +1460,7 @@ minetest.register_tool("nssm:death_scythe", { if math.random(3) == 1 then v.y = v.y + 2 drop = minetest.add_item(v, "nssm:life_energy 1") - drops(drop) + nssm:drops(drop) end end @@ -1474,7 +1474,7 @@ minetest.register_tool("nssm:death_scythe", { if math.random(3) == 1 then v.y = v.y + 2 drop = minetest.add_item(v, "nssm:life_energy 1") - drops(drop) + nssm:drops(drop) end end @@ -1488,7 +1488,7 @@ minetest.register_tool("nssm:death_scythe", { if math.random(3) == 1 then v.y = v.y + 2 drop = minetest.add_item(v, "nssm:life_energy 1") - drops(drop) + nssm:drops(drop) end end end