Skip to content

Commit 9d14dda

Browse files
committed
Make clean method names option toggleable via tweak values
1 parent a840b34 commit 9d14dda

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Source/Client/Desyncs/SyncCoordinator.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Text.RegularExpressions;
6+
using LudeonTK;
67
using RimWorld;
78
using Verse;
89
using Multiplayer.Client.Desyncs;
@@ -243,9 +244,14 @@ public void TryAddStackTraceForDesyncLogRaw(StackTraceLogItemRaw item, int depth
243244
OpinionInBuilding.desyncStackTraceHashes.Add(hash);
244245
}
245246

246-
private static readonly Regex RemoveUnknownSourceInfoRegex = new(@"in <([a-zA-Z0-9]+)>:0");
247+
[TweakValue("Multiplayer")]
248+
public static bool cleanMethodNames = false;
249+
250+
private static readonly Regex RemoveUnknownSourceInfoRegex = new("in <([a-zA-Z0-9]+)>:0");
247251
public static string CleanedMethodName(string rawName)
248252
{
253+
if (!cleanMethodNames) return rawName;
254+
249255
// at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.RimWorld.UniqueIDsManager.GetNextID_Patch2 ...
250256
// =>
251257
// at (wrapper dynamic-method) RimWorld.UniqueIDsManager.GetNextID_Patch2 ...

0 commit comments

Comments
 (0)