Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ARgbGameValueTracker.cs
Go to the documentation of this file.
1using System;
2using Newtonsoft.Json.Linq;
3
5
6public abstract class ARgbGameValueTracker
7{
8 public string EventName;
9
10 protected bool _needsToSendMessage;
11
12 public bool IsVisible;
13
14 public JObject TryGettingRequest()
15 {
16 //IL_0011: Unknown result type (might be due to invalid IL or missing references)
17 //IL_0017: Expected O, but got Unknown
18 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
19 //IL_0023: Unknown result type (might be due to invalid IL or missing references)
20 //IL_0039: Unknown result type (might be due to invalid IL or missing references)
21 //IL_0046: Expected O, but got Unknown
23 {
24 return null;
25 }
26 _needsToSendMessage = false;
27 JObject jObject = new JObject();
28 WriteValueToData(jObject);
29 JObject val = new JObject();
30 val.Add("event", JToken.op_Implicit(EventName));
31 val.Add("data", (JToken)(object)jObject);
32 return val;
33 }
34
35 protected abstract void WriteValueToData(JObject data);
36}
38{
39 private const int TimesToDenyIdenticalValues = 30;
40
42
43 private int _timesDeniedRepeat;
44
45 public void Update(TValueType value, bool isVisible)
46 {
47 IsVisible = isVisible;
48 if (_currentValue.Equals(value) && _timesDeniedRepeat < 30)
49 {
51 return;
52 }
56 }
57}
void Update(TValueType value, bool isVisible)