Hotfix for errors on DarkerNight component

This commit is contained in:
Joshua Navarro 2018-12-24 15:07:51 -08:00
parent e83e031568
commit 8bcc399723
1 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,8 @@ namespace Revitalize.Framework.Environment
public static void SetDarkerColor()
{
if (Config.Enabled == false) return;
if (Game1.player == null) return;
if (Game1.player.currentLocation == null) return;
if (Game1.player.currentLocation.IsOutdoors && Game1.timeOfDay >= Game1.getStartingToGetDarkTime())
{
Game1.outdoorLight = CalculatedColor;
@ -74,7 +76,7 @@ namespace Revitalize.Framework.Environment
{
if (Config.Enabled == false) return;
if (Game1.player == null) return;
if (Game1.player.currentLocation == null) return;
//Calculate original lighting.
if (Game1.timeOfDay >= Game1.getTrulyDarkTime())
{