8 public override IEnumerable<
AIAct.Status> Run()
12 for (i = 0; i < 5; i = num + 1)
14 yield
return AIAct.Status.Running;
17 TraitBed traitBed = this.owner.FindBed();
20 traitBed = this.owner.TryAssignBed();
24 this.bed = traitBed.owner.Thing;
28 yield
return base.DoGoto(this.bed,
new Func<AIAct.Status>(base.KeepRunning));
30 else if (this.owner.memberType != FactionMemberType.Livestock)
35 yield
return base.DoGoto(baseArea.GetRandomFreePos(), 0,
false,
new Func<AIAct.Status>(base.KeepRunning));
39 while (i < 5 && this.owner.pos.HasMultipleChara)
41 this.owner.MoveRandom();
42 yield
return AIAct.Status.Running;
46 this.owner.AddCondition<
ConSleep>(3000,
true);
47 yield
return AIAct.Status.Running;
52 public override void OnSimulatePosition()
54 this.owner.AddCondition<
ConSleep>(2000,
true);
55 TraitBed traitBed = this.owner.FindBed();
56 this.bed = (((traitBed !=
null) ? traitBed.owner.Thing :
null) ??
null);
57 if (this.bed ==
null &&
EClass._zone.IsPCFaction)
59 this.owner.TryAssignBed();
61 if (this.bed !=
null && !this.bed.pos.HasChara)
63 this.owner.MoveImmediate(this.bed.pos,
true,
true);
69 this.owner.MoveImmediate(baseArea.GetRandomFreePos(),
true,
true);
74 public int timer = 20;