public static bool preCheckMakeInfection(HediffComp_Infecter __instance)
 {
     if (__instance.Pawn.health.hediffSet.HasHediff(XenomorphDefOf.RRY_Hediff_Cocooned) || (__instance.Pawn.InBed() && __instance.Pawn.CurrentBed() is Building_XenomorphCocoon) || __instance.Pawn.RaceProps.FleshType.defName.Contains("RRY_SynthFlesh"))
     {
         return(false);
     }
     return(true);
 }
 public static bool preCheckMakeInfection(HediffComp_Infecter __instance)
 {
     if (__instance.Pawn.RaceProps.FleshType.defName == ("BETAFlesh"))
     {
         return(false);
     }
     return(true);
 }
示例#3
0
 public static void Prefix(HediffComp_Infecter __instance)
 {
     if (true &&
         __instance.parent.pawn.IsSkippingTicks() &&
         __instance.parent.pawn.IsValidWildlifeOrWorldPawn())
     {
         __instance.ticksUntilInfect -= (__instance.parent.pawn.GetDeltaT() - 1);
     }
 }
示例#4
0
        public static bool HediffComp_Infecter_CheckMakeInfection_Prefix(HediffComp_Infecter __instance)
        {
            Pawn pawn = __instance.Pawn;

            if (pawn != null)
            {
                var raceSettings = AutomataRaceSettingCache.Get(pawn.def);
                if (raceSettings != null)
                {
                    if (!raceSettings.infectionActivated)
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
示例#5
0
        public static bool HediffComp_Infecter_CheckMakeInfection_Prefix(HediffComp_Infecter __instance)
        {
            Pawn pawn = __instance.Pawn;

            if (pawn != null)
            {
                AutomataRaceSettings automataRaceSettings = DefDatabase <AutomataRaceSettings> .GetNamed(pawn.def.defName, errorOnFail : false);

                if (automataRaceSettings != null)
                {
                    if (!automataRaceSettings.infectionActivated)
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }