Address review comments

This commit is contained in:
teknomunk 2024-06-19 08:31:56 -05:00
parent 5c5fd843d3
commit 7c7b1efbe7
2 changed files with 5 additions and 5 deletions

@ -73,6 +73,8 @@ local skycolor = {
-- number of colors while constructing gradient of user given colors
max_val = 1000,
NIGHT_VISION_RATIO = NIGHT_VISION_RATIO,
-- Table for tracking layer order
layer_names = {},

@ -3,8 +3,9 @@ local DIM_ALLOW_NIGHT_VISION = {
void = true,
}
local NIGHT_VISION_RATIO = mcl_weather.skycolor.NIGHT_VISION_RATIO
local effects_handlers = {}
local has_mcl_potions = false
local has_mcl_potions = not not minetest.get_modpath("mcl_potions") -- Coerce to boolean with "not not"
function effects_handlers.darkness(player, meta, effect, sky_data)
-- No darkness effect if visited by shepherd
@ -34,10 +35,7 @@ function effects_handlers.night_vision(player, meta, effect, sky_data)
end
local function effects(player, sky_data)
if not has_mcl_potions then
if not minetest.get_modpath("mcl_potions") then return end
has_mcl_potions = true
end
if not has_mcl_potions then return end
local meta = player:get_meta()
for name,effect in pairs(mcl_potions.registered_effects) do