コード例 #1
0
        public override void Tick()
        {
            var state = TendDuration.GetInfectionState();

            if (state == InfectionState.None)
            {
                base.Tick();
                return;
            }

            if (state == InfectionState.Infected)
            {
                Tools.QueueConvertToZombie(pawn);
                return;
            }

            if (TendDuration.IsTended && (state >= InfectionState.BittenHarmless && state <= InfectionState.Infecting))
            {
                if (Severity > 0f)
                {
                    Severity = Math.Max(0f, Severity - 0.001f);
                }
            }
            else
            {
                base.Tick();
            }
        }
コード例 #2
0
        public override bool CauseDeathNow()
        {
            if (TendDuration != null && TendDuration.GetInfectionState() == InfectionState.Infected)
            {
                return(true);
            }

            return(base.CauseDeathNow());
        }
コード例 #3
0
 bool InfectionLocked()
 {
     return(TendDuration != null && TendDuration.GetInfectionState() == InfectionState.Infecting);
 }