Exemple #1
0
        public override void UpdateAllDuties()
        {
            foreach (Pawn pawn in lord.ownedPawns)
            {
                DutyDef returnAnchorDef = DefDatabase <DutyDef> .GetNamed("MTW_ReturnAnchor");

                pawn.mindState.duty = new PawnDuty(returnAnchorDef);
            }
        }
Exemple #2
0
 private void EnsureCorrectDuties()
 {
     for (int i = 0; i < lord.ownedPawns.Count; i++)
     {
         Pawn    pawn            = lord.ownedPawns[i];
         DutyDef expectedDutyDef = GetExpectedDutyDef(pawn);
         if (pawn.mindState != null && (pawn.mindState.duty == null || pawn.mindState.duty.def != expectedDutyDef))
         {
             pawn.mindState.duty            = new PawnDuty(expectedDutyDef, shuttle);
             pawn.mindState.duty.locomotion = locomotion;
             pawn.mindState.duty.canDig     = canDig;
             if (interruptCurrentJob && pawn.jobs != null && pawn.jobs.curJob != null)
             {
                 pawn.jobs.EndCurrentJob(JobCondition.InterruptForced);
             }
         }
     }
 }
        //TODO: Create custom jobgivers to allow more boss-like behavior
        // JobGiver_AITrashBuildingsDistant
        public BossFightDuty()
        {
            locomotion = LocomotionUrgency.Sprint;
            canDig     = true;
            def        = new DutyDef {
                defName          = "BossAssaultColony",
                alwaysShowWeapon = true,
                thinkNode        = new ThinkNode_Priority {
                    subNodes =
                    {
                        //unnecessary for now, need to reenable with adding human bosses
                        //new JobGiver_TakeCombatEnhancingDrug(),

                        new JobGiver_BossFightEnemy(),
                        new JobGiver_AITrashColonyClose(),
                        new JobGiver_AITrashBuildingsDistant(),
                        new JobGiver_AIGotoNearestHostile(),
                        new JobGiver_AITrashBuildingsDistant(),
                        new JobGiver_AISapper()
                    }
                }
            };
        }
Exemple #4
0
 public LordToil_WanderAndChat(DutyDef def)
 {
     this.dutyDef = def;
 }