mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Address review comments
This commit is contained in:
parent
dc074ff555
commit
3667feddd3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user