Esempio n. 1
0
        internal static void Prefix(Exosuit __instance)
        {
            if (Main.ExosuitCtorPatched)
            {
                BZLogger.Debug("Exosuit constructor already patched. Exit method.");
                return;
            }

            __instance.SetPrivateField("_slotIDs", SlotHelper.SessionExosuitSlotIDs, BindingFlags.Static);

            BZLogger.Debug($"Exosuit constructor patched. ID: {__instance.GetInstanceID()}");

            Main.ExosuitCtorPatched = true;
        }
Esempio n. 2
0
        internal static void Postfix(Exosuit __instance)
        {
            if (__instance.GetComponent <SlotExtender>() == null)
            {
                __instance.gameObject.AddComponent <SlotExtender>();

                Debug.Log($"[SlotExtender] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
            }
        }
Esempio n. 3
0
 static void Postfix(Exosuit __instance, int slotID, TechType techType, bool added)
 {
     if (techType == ScannerModule.TechTypeID)
     {
         if (added)
         {
             if (__instance.GetComponent <ScannerModuleExosuit>() == null)
             {
                 __instance.gameObject.AddComponent <ScannerModuleExosuit>();
                 Debug.Log($"[ScannerModule] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
             }
             else
             {
                 __instance.GetComponent <ScannerModuleExosuit>().enabled = true;
             }
         }
         else
         {
             __instance.GetComponent <ScannerModuleExosuit>().enabled = false;
         }
     }
 }
Esempio n. 4
0
 public static void Postfix(Exosuit __instance)
 {
     __instance.gameObject.AddIfNeedComponent <SlotExtender>();
     SNLogger.Log($"[{SEConfig.PROGRAM_NAME}] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
 }
Esempio n. 5
0
 public static void Postfix(Exosuit __instance)
 {
     __instance.gameObject.EnsureComponent <SlotExtender>();
     SNLogger.Debug($"Component added in Exosuit.Awake -> Postfix Patch. ID: {__instance.GetInstanceID()}");
 }