8 public override void OnAfterInit()
10 ELayer.ui.ShowCover(this.coverShow, this.coverAlpha,
null,
default(Color));
14 public void Wait(
float duration = 5f)
16 ELayer.Sound.Play(
"jingle_sleep");
17 TweenUtil.Tween(duration,
null, delegate()
19 ELayer.ui.HideCover(this.coverHide, delegate
27 public void Sleep(
int _hours,
Thing _bed,
Thing _pillow =
null)
29 ELayer.Sound.Play(
"jingle_sleep");
32 this.pillow = _pillow;
33 this.maxMin = this.hours * 60;
34 base.InvokeRepeating(
"Advance", this.repeatRate, this.repeatRate);
35 ELayer.pc.faith.Revelation(
"sleep", 100);
36 ELayer.player.stats.slept++;
42 if (this.min > this.maxMin)
47 ELayer.player.SimulateFaction();
51 chara.OnSleep(this.bed, 1);
53 Msg.Say(
"slept", this.hours.ToString() ??
"",
null,
null,
null);
56 ELayer.world.region.RenewRandomSites();
58 if (!
ELayer.debug.ignoreAutoSave)
60 ELayer.game.Save(
false,
null,
false);
64 ELayer._zone.Region.UpdateRandomSites();
66 ELayer.ui.ShowCover(0f, 1f,
null,
default(Color));
67 TweenUtil.Delay(this.hideDelay, delegate
69 ELayer.ui.HideCover(this.coverHide, delegate
77 ELayer.world.date.AdvanceMin(10);
81 public float repeatRate;
84 public float coverAlpha;
87 public float coverShow;
90 public float coverHide;
93 public float hideDelay;
108 private Thing pillow;