From 527ef50d7cf4f06769b688c00bc38e3724caa8db Mon Sep 17 00:00:00 2001 From: SokyranTheDragon Date: Sun, 14 Jul 2024 20:48:47 +0200 Subject: [PATCH] Include map count in desync info It may be a bit of a niche use case, but some desyncs happen only (or a lot more frequently) when players are looking at different maps. Making a list of "which map was each player looking at" would be much more difficult to implement, but just having the map count can suggest if an issue could have possibly happened due to having multiple active maps or not. I've added a bit of extra safety (instead of `Find.Maps?.Count`) as I've encountered a couple of weird situations in the past where `Find.Maps.Count` ended up throwing `NullReferenceException`. This may have been a weird mod conflict/interaction, but I've decided to be on the safer side here. --- Source/Client/Desyncs/SaveableDesyncInfo.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Client/Desyncs/SaveableDesyncInfo.cs b/Source/Client/Desyncs/SaveableDesyncInfo.cs index 2e6dcb5a..f3bfa83a 100644 --- a/Source/Client/Desyncs/SaveableDesyncInfo.cs +++ b/Source/Client/Desyncs/SaveableDesyncInfo.cs @@ -93,6 +93,7 @@ private string GetDesyncDetails() .AppendLine($"Player Count|||{Multiplayer.session.players.Count}") .AppendLine($"Async time active|||{Multiplayer.GameComp.asyncTime}") .AppendLine($"Multifaction active|||{Multiplayer.GameComp.multifaction}") + .AppendLine($"Map Count|||{Find.Maps?.Count.ToStringSafe()}") .AppendLine("\n###CPU Info###") .AppendLine($"Processor Name|||{SystemInfo.processorType}") .AppendLine($"Processor Speed (MHz)|||{SystemInfo.processorFrequency}")