I've written a bunch of code up now, all of it looks pretty nice, but I cant finish it without writing new IEnumerables.
I understand what they do. They use toils to direct what the pawns do.
Where if anywhere can I find the code for all the IEnumerables? I know where all the toils are located.
Does anyone know what this specific little chunk from the Building_Bed does? I need to define a new Building class for my MedBeds.
This is my failed attempt to basically rewrite the TakeToBed/Rescue JobDriver. I'm wondering if anyone knows how it should be written, or a better way to acheive the same result.
I understand what they do. They use toils to direct what the pawns do.
Where if anywhere can I find the code for all the IEnumerables? I know where all the toils are located.
Does anyone know what this specific little chunk from the Building_Bed does? I need to define a new Building class for my MedBeds.
Code Select
public override IEnumerable<Command> GetCommands()
{
Building_Bed.<GetCommands>c__IteratorC <GetCommands>c__IteratorC = new Building_Bed.<GetCommands>c__IteratorC();
<GetCommands>c__IteratorC.<>f__this = this;
Building_Bed.<GetCommands>c__IteratorC expr_0E = <GetCommands>c__IteratorC;
expr_0E.$PC = -2;
return expr_0E;
}This is my failed attempt to basically rewrite the TakeToBed/Rescue JobDriver. I'm wondering if anyone knows how it should be written, or a better way to acheive the same result.
Code Select
class JobDriver_TakeToMedBed : JobDriver
{protected Pawn Takee
get
return (Pawn)base.CurJob.targetA.Thing;
protected Building_MedBed DropBed
get
return (Building_MedBed)base.CurJob.targetB.Thing;
public JobDriver_TakeToMedBed(Pawn pawn) : base(pawn)
protected override IEnumerable<Toil> MakeNewToils()
{
//yield return Toils_Goto.GotoThing(TargetIndex.A, PathMode.ClosestTouch);
//yield return Toils_Haul.StartCarryThing(TargetIndex.A);
//yield return Toils_Haul.
}
}
I'm pretty sure it's bugless and compatible with everything. Going to run a test game here in a bit.
But Tynan already said never on z-levels right?