Merge pull request #708 from kdau/develop

Set daysPlayed in date console commands
This commit is contained in:
Jesse Plamondon-Willard 2020-04-11 21:02:14 -04:00 committed by GitHub
commit 6437b7fa50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
using System.Linq; using System.Linq;
using StardewModdingAPI.Utilities;
using StardewValley; using StardewValley;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
@ -32,6 +33,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle // handle
Game1.dayOfMonth = day; Game1.dayOfMonth = day;
Game1.stats.DaysPlayed = (uint)SDate.Now().DaysSinceStart;
monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info); monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info);
} }
} }

View File

@ -1,4 +1,5 @@
using System.Linq; using System.Linq;
using StardewModdingAPI.Utilities;
using StardewValley; using StardewValley;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
@ -40,6 +41,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle // handle
Game1.currentSeason = season.ToLower(); Game1.currentSeason = season.ToLower();
Game1.setGraphicsForSeason(); Game1.setGraphicsForSeason();
Game1.stats.DaysPlayed = (uint)SDate.Now().DaysSinceStart;
monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info); monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info);
} }
} }

View File

@ -1,4 +1,5 @@
using System.Linq; using System.Linq;
using StardewModdingAPI.Utilities;
using StardewValley; using StardewValley;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
@ -32,6 +33,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle // handle
Game1.year = year; Game1.year = year;
Game1.stats.DaysPlayed = (uint)SDate.Now().DaysSinceStart;
monitor.Log($"OK, the year is now {Game1.year}.", LogLevel.Info); monitor.Log($"OK, the year is now {Game1.year}.", LogLevel.Info);
} }
} }