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; }
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()}"); } }
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; } } }
public static void Postfix(Exosuit __instance) { __instance.gameObject.AddIfNeedComponent <SlotExtender>(); SNLogger.Log($"[{SEConfig.PROGRAM_NAME}] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}"); }
public static void Postfix(Exosuit __instance) { __instance.gameObject.EnsureComponent <SlotExtender>(); SNLogger.Debug($"Component added in Exosuit.Awake -> Postfix Patch. ID: {__instance.GetInstanceID()}"); }