Ejemplo n.º 1
0
        public static bool FullyImmune(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            return(hediffWithComps.TryGetComp <HediffComp_Immunizable>()?.FullyImmune ?? false);
        }
Ejemplo n.º 2
0
        public static bool IsTended(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            return(hediffWithComps.TryGetComp <HediffComp_TendDuration>()?.IsTended ?? false);
        }
Ejemplo n.º 3
0
        public static bool IsPermanent(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            return(hediffWithComps.TryGetComp <HediffComp_GetsPermanent>()?.IsPermanent ?? false);
        }
Ejemplo n.º 4
0
        public static bool IsPermanent(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            HediffComp_GetsPermanent hediffComp_GetsPermanent = hediffWithComps.TryGetComp <HediffComp_GetsPermanent>();

            return(hediffComp_GetsPermanent != null && hediffComp_GetsPermanent.IsPermanent);
        }
Ejemplo n.º 5
0
        public static bool FullyImmune(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            HediffComp_Immunizable hediffComp_Immunizable = hediffWithComps.TryGetComp <HediffComp_Immunizable>();

            return(hediffComp_Immunizable != null && hediffComp_Immunizable.FullyImmune);
        }
Ejemplo n.º 6
0
        public static bool IsTended(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            HediffComp_TendDuration hediffComp_TendDuration = hediffWithComps.TryGetComp <HediffComp_TendDuration>();

            return(hediffComp_TendDuration != null && hediffComp_TendDuration.IsTended);
        }
Ejemplo n.º 7
0
        public static bool IsOld(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;

            if (hediffWithComps == null)
            {
                return(false);
            }
            HediffComp_GetsOld hediffComp_GetsOld = hediffWithComps.TryGetComp <HediffComp_GetsOld>();

            return(hediffComp_GetsOld != null && hediffComp_GetsOld.IsOld);
        }
Ejemplo n.º 8
0
        public static bool FullyImmune(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;
            bool            result;

            if (hediffWithComps == null)
            {
                result = false;
            }
            else
            {
                HediffComp_Immunizable hediffComp_Immunizable = hediffWithComps.TryGetComp <HediffComp_Immunizable>();
                result = (hediffComp_Immunizable != null && hediffComp_Immunizable.FullyImmune);
            }
            return(result);
        }
Ejemplo n.º 9
0
        public static bool IsPermanent(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;
            bool            result;

            if (hediffWithComps == null)
            {
                result = false;
            }
            else
            {
                HediffComp_GetsPermanent hediffComp_GetsPermanent = hediffWithComps.TryGetComp <HediffComp_GetsPermanent>();
                result = (hediffComp_GetsPermanent != null && hediffComp_GetsPermanent.IsPermanent);
            }
            return(result);
        }
Ejemplo n.º 10
0
        public static bool IsTended(this Hediff hd)
        {
            HediffWithComps hediffWithComps = hd as HediffWithComps;
            bool            result;

            if (hediffWithComps == null)
            {
                result = false;
            }
            else
            {
                HediffComp_TendDuration hediffComp_TendDuration = hediffWithComps.TryGetComp <HediffComp_TendDuration>();
                result = (hediffComp_TendDuration != null && hediffComp_TendDuration.IsTended);
            }
            return(result);
        }