From 0a7af55e429c6d7a04e54406e4b9eeaaee3939db Mon Sep 17 00:00:00 2001 From: SokyranTheDragon Date: Sat, 24 Aug 2024 15:12:42 +0200 Subject: [PATCH] Register sync methods directly rather than using API I think I must have used the API out of habit when writing this code, my bad. I've changed the code to use `SyncMethod.RegisterSyncMethod` and `SyncMethod.Register` rather than `MP.RegisterSyncMethod`. --- Source/Client/Syncing/Game/SyncMethods.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Client/Syncing/Game/SyncMethods.cs b/Source/Client/Syncing/Game/SyncMethods.cs index dc63361b..bbb21385 100644 --- a/Source/Client/Syncing/Game/SyncMethods.cs +++ b/Source/Client/Syncing/Game/SyncMethods.cs @@ -420,11 +420,11 @@ public static void Init() .AllNotNull(); foreach (var method in methods) - MP.RegisterSyncMethod(method); + Sync.RegisterSyncMethod(method); // This OnRenamed method will create a storage group, which needs to be synced. // No other vanilla rename dialogs need syncing OnRenamed, but modded ones potentially could need it. - MP.RegisterSyncMethod(typeof(Dialog_RenameBuildingStorage_CreateNew), nameof(Dialog_RenameBuildingStorage_CreateNew.OnRenamed)) + SyncMethod.Register(typeof(Dialog_RenameBuildingStorage_CreateNew), nameof(Dialog_RenameBuildingStorage_CreateNew.OnRenamed)) .TransformTarget(Serializer.New( (Dialog_RenameBuildingStorage_CreateNew dialog) => dialog.building, (IStorageGroupMember member) => new Dialog_RenameBuildingStorage_CreateNew(member)));