Example #1
0
        public static bool Prefix(ref Verb_LaunchProjectileStatic __instance, ref bool __result, ref bool __state)
        {
            CompWargearUseable useable = WargearCompSource(__instance);

            if (useable != null)
            {
                __result = useable.CanBeUsed;
                return(__result);
            }
            return(true);
        }
Example #2
0
 public static void Postfix(ref Verb_LaunchProjectileStatic __instance, ref bool __result, ref bool __state)
 {
     if (__result)
     {
         CompWargearUseable useable = WargearCompSource(__instance);
         if (useable != null && __instance.WarmingUp)
         {
             //    useable.UsedOnce();
         }
     }
 }
        public static void Postfix(ref Verb __instance, LocalTargetInfo castTarg, ref bool __result)
        {
            Verb_LaunchProjectileStatic verb = __instance as Verb_LaunchProjectileStatic;

            if (__result && verb != null)
            {
                CompWargearUseable useable = __instance.DirectOwner as CompWargearUseable;
                if (useable != null && verb.WarmingUp)
                {
                    useable.UsedOnce();
                }
            }
        }
Example #4
0
 public static CompWargearUseable WargearCompSource(Verb_LaunchProjectileStatic __instance)
 {
     return(__instance.DirectOwner as CompWargearUseable);
 }