Make everything dark for player when in weather (WIP)

This commit is contained in:
Wuzzy 2017-11-12 04:36:26 +01:00
parent 562bd6cd5a
commit b7880529a8
5 changed files with 40 additions and 0 deletions

View file

@ -38,6 +38,14 @@ weather.get_rand_end_time = function(min_duration, max_duration)
end
end
weather.get_current_day_night_ratio = function()
if weather.state == "none" then
return nil
else
return weather.reg_weathers[weather.state].day_night_ratio
end
end
-- Returns true if pos is outdoor.
-- Outdoor is defined as any node in the Overworld under open sky.
-- FIXME: Nodes below glass also count as “outdoor”, this should not be the case.