Elin Modding Docs Doc
Loading...
Searching...
No Matches
GlobalGoalVisitAndStay.cs
1using System;
2using Newtonsoft.Json;
3using UnityEngine;
4
5// Token: 0x02000229 RID: 553
7{
8 // Token: 0x17000407 RID: 1031
9 // (get) Token: 0x06000F95 RID: 3989 RVA: 0x0006FF08 File Offset: 0x0006E108
10 public Zone destZone
11 {
12 get
13 {
14 return RefZone.Get(this.uidZone);
15 }
16 }
17
18 // Token: 0x06000F96 RID: 3990 RVA: 0x0006FF18 File Offset: 0x0006E118
19 public override void OnAdvanceHour()
20 {
21 if (this.owner.currentZone == EClass.game.activeZone)
22 {
23 return;
24 }
25 if (this.uidZone == 0)
26 {
27 if (this.GetDestZone() == null)
28 {
29 base.Kill();
30 return;
31 }
32 this.uidZone = this.GetDestZone().uid;
33 if (EClass.debug.logAdv)
34 {
35 Debug.Log(string.Concat(new string[]
36 {
37 this.owner.Name,
38 " -> ",
39 this.destZone.Name,
40 " / ",
41 (this != null) ? this.ToString() : null
42 }));
43 }
44 }
45 if (this.owner.currentZone == this.destZone)
46 {
47 this.OnStay();
48 if (this.hours > 64 && EClass.rnd(48) == 0)
49 {
50 base.Complete();
51 return;
52 }
53 }
54 else
55 {
56 this.OnTravel();
57 if (this.hours > 6 && EClass.rnd(4) == 0 && this.destZone != EClass.game.activeZone)
58 {
59 if (EClass.debug.logAdv)
60 {
61 Debug.Log(this.owner.Name + " reached " + this.destZone.Name);
62 }
63 this.owner.MoveZone(this.destZone, ZoneTransition.EnterState.RandomVisit);
64 }
65 }
66 }
67
68 // Token: 0x06000F97 RID: 3991 RVA: 0x0007005D File Offset: 0x0006E25D
69 public virtual void OnStay()
70 {
71 }
72
73 // Token: 0x06000F98 RID: 3992 RVA: 0x0007005F File Offset: 0x0006E25F
74 public virtual void OnTravel()
75 {
76 }
77
78 // Token: 0x06000F99 RID: 3993 RVA: 0x00070061 File Offset: 0x0006E261
79 public virtual Zone GetDestZone()
80 {
81 return this.owner.homeZone;
82 }
83
84 // Token: 0x04000D86 RID: 3462
85 [JsonProperty]
86 public int uidZone;
87}
Definition Zone.cs:14