diff --git a/Source/Mods/VanillaFactionsAncients.cs b/Source/Mods/VanillaFactionsAncients.cs index 69ce671..919fd9f 100644 --- a/Source/Mods/VanillaFactionsAncients.cs +++ b/Source/Mods/VanillaFactionsAncients.cs @@ -32,6 +32,13 @@ public VanillaFactionsAncients(ModContentPack mod) var type = AccessTools.TypeByName("VFEAncients.Operation"); operationPodField = AccessTools.FieldRefAccess(type, "Pod"); + // Dev add/remove power from pawn (edit mode) + type = AccessTools.TypeByName("VFEAncients.ITab_Pawn_Powers"); + MP.RegisterSyncDelegateLambda(type, "DoEmptyRect", 2) + .SetContext(SyncContext.MapSelected).SetDebugOnly(); + MP.RegisterSyncDelegateLambda(type, "DoPowerIcon", 0) + .SetContext(SyncContext.MapSelected).SetDebugOnly(); + LongEventHandler.ExecuteWhenFinished(LatePatch); } @@ -89,6 +96,12 @@ private static void SyncDialogChoosePower(SyncWorker sync, ref Window window) window = Find.WindowStack.windows.FirstOrDefault(x => x.GetType() == choosePowerDialogType); } + // Only needed in cases object needs to be created (shouldConstruct), but we don't care about any data inside of it + [MpCompatSyncWorker("VFEAncients.ITab_Pawn_Powers", shouldConstruct = true)] + private static void NoSync(SyncWorker sync, ref object obj) + { + } + #endregion #region Dialog @@ -135,7 +148,7 @@ private static IEnumerable ReplaceButtons(IEnumerable