暂存
This commit is contained in:
@@ -19,6 +19,7 @@ namespace WulaFallenEmpire
|
||||
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
Log.Warning($"[WulaPodDebug] JobDriver_EnterMaintenancePod started for pawn: {pawn.LabelShortCap}");
|
||||
this.FailOnDespawnedNullOrForbidden(PodIndex);
|
||||
this.FailOnBurningImmobile(PodIndex);
|
||||
|
||||
@@ -26,17 +27,21 @@ namespace WulaFallenEmpire
|
||||
this.FailOn(() => podComp == null || podComp.State != MaintenancePodState.Idle || !podComp.PowerOn);
|
||||
|
||||
// Go to the pod's interaction cell
|
||||
yield return Toils_Goto.GotoThing(PodIndex, PathEndMode.InteractionCell);
|
||||
Toil goToPod = Toils_Goto.GotoThing(PodIndex, PathEndMode.InteractionCell);
|
||||
goToPod.AddPreInitAction(() => Log.Warning($"[WulaPodDebug] EnterJob: Pawn {pawn.LabelShortCap} is going to the pod."));
|
||||
yield return goToPod;
|
||||
|
||||
// Enter the pod
|
||||
yield return new Toil
|
||||
Toil enterToil = new Toil
|
||||
{
|
||||
initAction = () =>
|
||||
{
|
||||
Log.Warning($"[WulaPodDebug] EnterJob: Pawn {pawn.LabelShortCap} has arrived and is entering the pod.");
|
||||
podComp.StartCycle(pawn);
|
||||
},
|
||||
defaultCompleteMode = ToilCompleteMode.Instant
|
||||
};
|
||||
yield return enterToil;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user