summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/SGame.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index 91612fb0..585b3270 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -386,8 +386,19 @@ namespace StardewModdingAPI.Framework
*********/
if (!this.RaisedAfterLoadEvent && Context.IsWorldReady)
{
+ // print context
+ string context = $"Context: loaded saved game '{Constants.SaveFolderName}', starting {Game1.currentSeason} {Game1.dayOfMonth} Y{Game1.year}.";
+ if (Context.IsMultiplayer)
+ {
+ int onlineCount = Game1.getOnlineFarmers().Count();
+ context += $" {(Context.IsMainPlayer ? "Main player" : "Farmhand")} with {onlineCount} {(onlineCount == 1 ? "player" : "players")} online.";
+ }
+ else
+ context += " Single-player.";
+ this.Monitor.Log(context, LogLevel.Trace);
+
+ // raise events
this.RaisedAfterLoadEvent = true;
- this.Monitor.Log($"Context: loaded saved game '{Constants.SaveFolderName}', starting {Game1.currentSeason} {Game1.dayOfMonth} Y{Game1.year}.", LogLevel.Trace);
this.Events.Save_AfterLoad.Raise();
this.Events.Time_AfterDayStarted.Raise();
}