diff options
author | Kevin Daughtridge <kevin@kdau.com> | 2020-04-11 13:25:12 -0700 |
---|---|---|
committer | Kevin Daughtridge <kevin@kdau.com> | 2020-04-11 13:25:12 -0700 |
commit | e370b084834246b2a0a7e6443f9b8d6e11e94912 (patch) | |
tree | 11c035e5a8099bb194af62ab62537ceea6445426 /src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs | |
parent | b363e0b6b745b869a684c72b69c713d4817257cf (diff) | |
download | SMAPI-e370b084834246b2a0a7e6443f9b8d6e11e94912.tar.gz SMAPI-e370b084834246b2a0a7e6443f9b8d6e11e94912.tar.bz2 SMAPI-e370b084834246b2a0a7e6443f9b8d6e11e94912.zip |
use SDate to set DaysPlayed
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs')
-rw-r--r-- | src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs index a28fa2c3..676369fe 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs @@ -1,4 +1,5 @@ using System.Linq; +using StardewModdingAPI.Utilities; using StardewValley; namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World @@ -40,7 +41,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World // handle Game1.currentSeason = season.ToLower(); Game1.setGraphicsForSeason(); - Game1.stats.DaysPlayed = (uint)(Game1.dayOfMonth + 28 * (Utility.getSeasonNumber(Game1.currentSeason) + 4 * (Game1.year - 1))); + Game1.stats.DaysPlayed = (uint)SDate.Now().DaysSinceStart; monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info); } } |