From 781ac19d09e4df525074c8ef99dd35053cbb9c05 Mon Sep 17 00:00:00 2001 From: tchncs Date: Thu, 9 Dec 2021 21:35:24 +0100 Subject: [PATCH] add illuna_costumes:guardian_angel to picklight (should be refactored asap) --- lava_flan.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lava_flan.lua b/lava_flan.lua index 964d1ed..097ed98 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -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