Elin Modding Docs Doc
Loading...
Searching...
No Matches
WidgetStats.cs
1using System;
2using System.Collections.Generic;
3
4// Token: 0x02000639 RID: 1593
6{
7 // Token: 0x06002CB8 RID: 11448 RVA: 0x000FAC77 File Offset: 0x000F8E77
8 public static void RefreshAll()
9 {
10 if (!WidgetStats.Instance)
11 {
12 return;
13 }
14 WidgetStats.Instance._RefreshAll();
15 }
16
17 // Token: 0x06002CB9 RID: 11449 RVA: 0x000FAC90 File Offset: 0x000F8E90
18 public override void _OnActivate()
19 {
20 WidgetStats.Instance = this;
21 NotificationStats notificationStats = new NotificationStats();
22 notificationStats.stats = (() => EMono.pc.hunger);
23 base.Add(notificationStats, null);
24 NotificationStats notificationStats2 = new NotificationStats();
25 notificationStats2.stats = (() => EMono.pc.burden);
26 base.Add(notificationStats2, null);
27 NotificationStats notificationStats3 = new NotificationStats();
28 notificationStats3.stats = (() => EMono.pc.depression);
29 base.Add(notificationStats3, null);
30 NotificationStats notificationStats4 = new NotificationStats();
31 notificationStats4.stats = (() => EMono.pc.bladder);
32 base.Add(notificationStats4, null);
33 NotificationStats notificationStats5 = new NotificationStats();
34 notificationStats5.stats = (() => EMono.pc.hygiene);
35 base.Add(notificationStats5, null);
36 NotificationStats notificationStats6 = new NotificationStats();
37 notificationStats6.stats = (() => EMono.pc.sleepiness);
38 base.Add(notificationStats6, null);
39 NotificationStats notificationStats7 = new NotificationStats();
40 notificationStats7.stats = (() => EMono.pc.stamina);
41 base.Add(notificationStats7, null);
42 base.Add(new NotificationExceedParty(), null);
43 }
44
45 // Token: 0x06002CBA RID: 11450 RVA: 0x000FAE10 File Offset: 0x000F9010
46 public override void OnRefresh()
47 {
48 this.conditions.ForeachReverse(delegate(NotificationCondition a)
49 {
50 if (a.ShouldRemove())
51 {
52 this.conditions.Remove(a);
53 base.Remove(a);
54 }
55 });
56 foreach (Condition condition in EMono.pc.conditions)
57 {
58 if (condition.ShowInWidget)
59 {
60 bool flag = true;
61 using (List<NotificationCondition>.Enumerator enumerator2 = this.conditions.GetEnumerator())
62 {
63 while (enumerator2.MoveNext())
64 {
65 if (enumerator2.Current.condition == condition)
66 {
67 flag = false;
68 break;
69 }
70 }
71 }
72 if (flag)
73 {
74 NotificationCondition notificationCondition = condition.CreateNotification() as NotificationCondition;
75 base.Add(notificationCondition, null);
76 this.conditions.Add(notificationCondition);
77 }
78 }
79 }
80 }
81
82 // Token: 0x0400190F RID: 6415
83 public static WidgetStats Instance;
84
85 // Token: 0x04001910 RID: 6416
86 public List<NotificationCondition> conditions = new List<NotificationCondition>();
87
88 // Token: 0x04001911 RID: 6417
89 public ItemNotice moldBuff;
90
91 // Token: 0x04001912 RID: 6418
92 public ItemNotice moldStance;
93}
Definition EMono.cs:6