add illuna_costumes:guardian_angel to picklight (should be refactored asap)
parent
a96c7029e9
commit
781ac19d09
|
@ -223,6 +223,22 @@ local function wields_torch(player)
|
||||||
if not player then
|
if not player then
|
||||||
return false
|
return false
|
||||||
end
|
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()
|
local item = player:get_wielded_item()
|
||||||
if not item then
|
if not item then
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue