summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands/Framework
diff options
context:
space:
mode:
authorKevin Daughtridge <kevin@kdau.com>2020-04-10 12:41:35 -0700
committerKevin Daughtridge <kevin@kdau.com>2020-04-10 12:41:35 -0700
commitb363e0b6b745b869a684c72b69c713d4817257cf (patch)
treeead3536ea7e85b9fb0b1fda6ed669e4b4c936608 /src/SMAPI.Mods.ConsoleCommands/Framework
parentc9b6b04a7502215b94a00560fad905786b144bb2 (diff)
downloadSMAPI-b363e0b6b745b869a684c72b69c713d4817257cf.tar.gz
SMAPI-b363e0b6b745b869a684c72b69c713d4817257cf.tar.bz2
SMAPI-b363e0b6b745b869a684c72b69c713d4817257cf.zip
set daysPlayed in world_set{day,season,year} commands
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetDayCommand.cs1
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs1
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetYearCommand.cs1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetDayCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetDayCommand.cs
index 8d6bd759..5fd1b8d4 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetDayCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetDayCommand.cs
@@ -32,6 +32,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle
Game1.dayOfMonth = day;
+ Game1.stats.DaysPlayed = (uint)(Game1.dayOfMonth + 28 * (Utility.getSeasonNumber(Game1.currentSeason) + 4 * (Game1.year - 1)));
monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info);
}
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs
index 0615afe7..a28fa2c3 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs
@@ -40,6 +40,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)));
monitor.Log($"OK, the date is now {Game1.currentSeason} {Game1.dayOfMonth}.", LogLevel.Info);
}
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetYearCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetYearCommand.cs
index 66abd6dc..dceb95af 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetYearCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetYearCommand.cs
@@ -32,6 +32,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle
Game1.year = year;
+ Game1.stats.DaysPlayed = (uint)(Game1.dayOfMonth + 28 * (Utility.getSeasonNumber(Game1.currentSeason) + 4 * (Game1.year - 1)));
monitor.Log($"OK, the year is now {Game1.year}.", LogLevel.Info);
}
}