add illuna_costumes:guardian_angel to picklight (should be refactored asap)

master
tchncs 2021-12-09 21:35:24 +01:00
parent a96c7029e9
commit 781ac19d09
1 changed files with 16 additions and 0 deletions

View File

@ -223,6 +223,22 @@ local function wields_torch(player)
if not player then
return false
end
-- FIXME: this does not belong here! We need to either fork torches or override in an Illuna mod!
-- auouymous' take on adding other items to this.
if minetest.get_modpath("3d_armor") ~= nil then
local inv = minetest.get_inventory({type="detached", name=player:get_player_name().."_armor"})
if inv then
for i = 1, inv:get_size("armor") do
local stack = inv:get_stack("armor", i)
if stack then
local stack_name = stack:get_name()
if stack_name == "illuna_costumes:guardian_angel" then
return true
end
end
end
end
end
local item = player:get_wielded_item()
if not item then
return false