Пример #1
0
        protected virtual IntVec3 GetExactWanderDest(Pawn pawn)
        {
            IntVec3  wanderRoot = GetWanderRoot(pawn);
            PawnDuty duty       = pawn.mindState.duty;

            if (duty != null && duty.wanderRadius.HasValue)
            {
                wanderRadius = duty.wanderRadius.Value;
            }
            return(RCellFinder.RandomWanderDestFor(pawn, wanderRoot, wanderRadius, wanderDestValidator, PawnUtility.ResolveMaxDanger(pawn, maxDanger)));
        }
Пример #2
0
 public void Reset(bool clearInspiration = false)
 {
     mentalStateHandler.Reset();
     mentalBreaker.Reset();
     if (clearInspiration)
     {
         inspirationHandler.Reset();
     }
     activeInt               = true;
     lastJobTag              = JobTag.Misc;
     lastIngestTick          = -99999;
     nextApparelOptimizeTick = -99999;
     lastJobGiver            = null;
     lastJobGiverThinkTree   = null;
     lastGivenWorkType       = null;
     canFleeIndividual       = true;
     exitMapAfterTick        = -99999;
     lastDisturbanceTick     = -99999;
     forcedGotoPosition      = IntVec3.Invalid;
     knownExploder           = null;
     wantsToTradeWithColony  = false;
     lastMannedThing         = null;
     canLovinTick            = -99999;
     canSleepTick            = -99999;
     meleeThreat             = null;
     lastMeleeThreatHarmTick = -99999;
     lastEngageTargetTick    = -99999;
     lastAttackTargetTick    = -99999;
     lastAttackedTarget      = LocalTargetInfo.Invalid;
     enemyTarget             = null;
     duty = null;
     thinkData.Clear();
     lastAssignedInteractTime    = -99999;
     interactionsToday           = 0;
     lastInventoryRawFoodUseTick = 0;
     priorityWork.Clear();
     nextMoveOrderIsWait             = true;
     lastTakeCombatEnhancingDrugTick = -99999;
     lastHarmTick                              = -99999;
     anyCloseHostilesRecently                  = false;
     WillJoinColonyIfRescued                   = false;
     WildManEverReachedOutside                 = false;
     timesGuestTendedToByPlayer                = 0;
     lastSelfTendTick                          = -99999;
     spawnedByInfestationThingComp             = false;
     lastPredatorHuntingPlayerNotificationTick = -99999;
 }
Пример #3
0
 public void Reset()
 {
     this.mentalStateHandler.Reset();
     this.mentalBreaker.Reset();
     this.inspirationHandler.Reset();
     this.activeInt               = true;
     this.lastJobTag              = JobTag.Misc;
     this.lastIngestTick          = -99999;
     this.nextApparelOptimizeTick = -99999;
     this.lastJobGiver            = null;
     this.lastJobGiverThinkTree   = null;
     this.lastGivenWorkType       = null;
     this.canFleeIndividual       = true;
     this.exitMapAfterTick        = -99999;
     this.lastDisturbanceTick     = -99999;
     this.forcedGotoPosition      = IntVec3.Invalid;
     this.knownExploder           = null;
     this.wantsToTradeWithColony  = false;
     this.lastMannedThing         = null;
     this.canLovinTick            = -99999;
     this.canSleepTick            = -99999;
     this.meleeThreat             = null;
     this.lastMeleeThreatHarmTick = -99999;
     this.lastEngageTargetTick    = -99999;
     this.lastAttackTargetTick    = -99999;
     this.lastAttackedTarget      = LocalTargetInfo.Invalid;
     this.enemyTarget             = null;
     this.duty = null;
     this.thinkData.Clear();
     this.lastAssignedInteractTime    = -99999;
     this.lastInventoryRawFoodUseTick = 0;
     this.priorityWork.Clear();
     this.nextMoveOrderIsWait             = true;
     this.lastTakeCombatEnhancingDrugTick = -99999;
     this.lastHarmTick                  = -99999;
     this.anyCloseHostilesRecently      = false;
     this.willJoinColonyIfRescued       = false;
     this.wildManEverReachedOutside     = false;
     this.timesGuestTendedToByPlayer    = 0;
     this.lastSelfTendTick              = -99999;
     this.spawnedByInfestationThingComp = false;
 }