diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/weather.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index 10ac73e97..8179f9ef3 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -4,8 +4,14 @@ // Description: // Controls world seasons. RESPECT MASK_* VARS ON CONSTANTS DB -// is_night() +// is_night(set=False) function script is_night { + // If we're not configuring, retrieve the variable + // It is more efficient this way + .@set=getarg(0, false); + if (!.@set) + return $@WEATHER_NIGHT; + // Night time depends on season. // Summer: Day > Night // Winter: Night > Day @@ -213,7 +219,7 @@ OnMinute45: donpcevent("@exprate::OnReload"); donpcevent("@droprate::OnReload"); } - $@WEATHER_NIGHT=is_night(); + $@WEATHER_NIGHT=is_night(true); //debugmes "[Weather.sys] Weather reloaded"; end; |