From 16c886f0ece0a227e2ad920ffcd861453265e6ae Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:10:38 -0400 Subject: [PATCH] Update Night Vision to allow full day brightness - only active at night. --- mods/ITEMS/mcl_potions/functions.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 7b737dc199..555a87c262 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -174,7 +174,10 @@ minetest.register_globalstep(function(dtime) is_cat[player].timer = is_cat[player].timer + dtime if player:get_pos() then mcl_potions._add_spawner(player, "#1010AA") end - player:override_day_night_ratio(0.45) + if minetest.get_timeofday() > 0.8 or minetest.get_timeofday() < 0.2 then + player:override_day_night_ratio(0.45) + else player:override_day_night_ratio(nil) + end if is_cat[player].timer >= is_cat[player].dur then is_cat[player] = nil