From 2651408d140770e9c5f835dfb2cf87a9ec849bfd Mon Sep 17 00:00:00 2001 From: EIA485 <17285570+EIA485@users.noreply.github.com> Date: Tue, 27 Sep 2022 17:28:01 -0700 Subject: [PATCH 1/2] diff ^:^ --- ShowDelegates/ShowDelegates.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ShowDelegates/ShowDelegates.cs b/ShowDelegates/ShowDelegates.cs index f7dd41a..11a0053 100644 --- a/ShowDelegates/ShowDelegates.cs +++ b/ShowDelegates/ShowDelegates.cs @@ -12,12 +12,12 @@ namespace ShowDelegates { - public class ShowDelegates : NeosMod - { - public override string Name => "ShowDelegates"; - public override string Author => "art0007i"; - public override string Version => "1.1.0"; - public override string Link => "https://github.com/art0007i/ShowDelegates/"; + public class ShowDelegates : NeosMod + { + public override string Name => "ShowDelegates"; + public override string Author => "art0007i"; + public override string Version => "1.1.0"; + public override string Link => "https://github.com/art0007i/ShowDelegates/"; [AutoRegisterConfigKey] private static readonly ModConfigurationKey KEY_SHOW_DELEGATES = new ModConfigurationKey("show_deleages", "If false delegates will not be shown", () => true); @@ -26,12 +26,12 @@ public class ShowDelegates : NeosMod private static ModConfiguration config; public override void OnEngineInit() - { - Harmony harmony = new Harmony("me.art0007i.ShowDelegates"); - harmony.PatchAll(); + { + Harmony harmony = new Harmony("me.art0007i.ShowDelegates"); + harmony.PatchAll(); config = GetConfiguration(); - } + } private static void GenerateDelegateProxy(UIBuilder ui, string name, T target) where T : class { LocaleString localeString = name + ":"; @@ -73,7 +73,7 @@ private static string funName(string prefix, MethodInfo info) [HarmonyPatch(typeof(WorkerInspector))] [HarmonyPatch("BuildInspectorUI")] class WorkerInspector_BuildInspectorUI_Patch - { + { private static void Postfix(WorkerInspector __instance, Worker worker, UIBuilder ui, Predicate memberFilter = null) { if(config.GetValue(KEY_SHOW_HIDDEN)) @@ -98,7 +98,7 @@ where m.GetParameters().Length <= 3 && m.GetCustomAttributes(typeof(SyncMethod), var delegates = ui.VerticalLayout(); delegates.Slot.ActiveSelf = false; delegates.Slot.RemoveComponent(delegates.Slot.GetComponent()); - myTxt.Slot.AttachComponent().SectionRoot.Target = delegates.Slot; + myTxt.Slot.AttachComponent().SectionRoot.Target = delegates.Slot; var colorDriver = myTxt.Slot.AttachComponent