Esempio n. 1
0
        internal static void Postfix(SeaMoth __instance)
        {
            string name = __instance.name;
            int    ID   = __instance.GetInstanceID();

            __instance.gameObject.AddIfNeedComponent <SlotExtender>();

            SNLogger.Log($"[{SEConfig.PROGRAM_NAME}] component added to instance: {name} ID: {ID}");
        }
Esempio n. 2
0
        public static void Postfix(SeaMoth __instance)
        {
            __instance.gameObject.EnsureComponent <SlotExtender>();

            SNLogger.Log($"Component added to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
        }
Esempio n. 3
0
 static void Postfix(SeaMoth __instance, int slotID, TechType techType, bool added)
 {
     if (techType == LaserCannon.TechTypeID)
     {
         if (added)
         {
             if (__instance.GetComponent <LaserCannon_Seamoth>() == null)
             {
                 var laserCannon = __instance.gameObject.AddComponent <LaserCannon_Seamoth>();
                 laserCannon.slotID = slotID;
                 Debug.Log($"[LaserCannon] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
             }
             else
             {
                 var laserCannon = __instance.GetComponent <LaserCannon_Seamoth>();
                 laserCannon.seamoth = __instance.GetComponent <SeaMoth>();
                 laserCannon.slotID  = slotID;
                 laserCannon.enabled = true;
             }
         }
         else
         {
             __instance.GetComponent <LaserCannon_Seamoth>().enabled = false;
         }
     }
 }
Esempio n. 4
0
        public static void Postfix(SeaMoth __instance)
        {
            __instance.gameObject.AddIfNeedComponent <SeamothArmManager>();

            SNLogger.Log($"[SeamothArms] Seamoth Arm Manager added in Awake -> Postfix Patch, ID: {__instance.GetInstanceID()}");
        }
Esempio n. 5
0
 static void Postfix(SeaMoth __instance, int slotID, TechType techType, bool added)
 {
     if (techType == ScannerModule.TechTypeID)
     {
         if (added)
         {
             if (__instance.GetComponent <ScannerModuleSeamoth>() == null)
             {
                 __instance.gameObject.AddComponent <ScannerModuleSeamoth>();
                 Debug.Log($"[ScannerModule] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
             }
             else
             {
                 __instance.GetComponent <ScannerModuleSeamoth>().enabled = true;
             }
         }
         else
         {
             __instance.GetComponent <ScannerModuleSeamoth>().enabled = false;
         }
     }
 }
        internal static void Postfix(SeaMoth __instance)
        {
            if (__instance.GetComponent <SlotExtender>() == null)
            {
                __instance.gameObject.AddComponent <SlotExtender>();

                Debug.Log($"[SlotExtender] Added component to instance: {__instance.name} ID: {__instance.GetInstanceID()}");
            }
        }