示例#1
0
        public void Notify_DamageTaken(DamageInfo dinfo)
        {
            if (curJob == null)
            {
                return;
            }
            Job job = curJob;

            curDriver.Notify_DamageTaken(dinfo);
            if (curJob == job && dinfo.Def.ExternalViolenceFor(pawn) && dinfo.Def.canInterruptJobs && !curJob.playerForced && Find.TickManager.TicksGame >= lastDamageCheckTick + 180)
            {
                Thing instigator = dinfo.Instigator;
                if (curJob.def.checkOverrideOnDamage == CheckJobOverrideOnDamageMode.Always || (curJob.def.checkOverrideOnDamage == CheckJobOverrideOnDamageMode.OnlyIfInstigatorNotJobTarget && !curJob.AnyTargetIs(instigator)))
                {
                    lastDamageCheckTick = Find.TickManager.TicksGame;
                    CheckForJobOverride();
                }
            }
        }