Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Avt.cs
Go to the documentation of this file.
3using System.Text;
4
6
7internal sealed class Avt
8{
9 private readonly string _constAvt;
10
11 private readonly TextEvent[] _events;
12
13 [MemberNotNullWhen(false, "_events")]
14 public bool IsConstant
15 {
16 [MemberNotNullWhen(false, "_events")]
17 get
18 {
19 return _events == null;
20 }
21 }
22
23 private Avt(string constAvt)
24 {
26 }
27
29 {
30 _events = new TextEvent[eventList.Count];
31 for (int i = 0; i < eventList.Count; i++)
32 {
34 }
35 }
36
37 internal string Evaluate(Processor processor, ActionFrame frame)
38 {
39 if (IsConstant)
40 {
41 return _constAvt;
42 }
43 StringBuilder sharedStringBuilder = processor.GetSharedStringBuilder();
44 for (int i = 0; i < _events.Length; i++)
45 {
47 }
48 processor.ReleaseSharedStringBuilder();
50 }
51
52 internal static Avt CompileAvt(Compiler compiler, string avtText)
53 {
54 bool constant;
56 if (!constant)
57 {
58 return new Avt(eventList);
59 }
60 return new Avt(avtText);
61 }
62}
override string ToString()
StringBuilder Append(char value, int repeatCount)
readonly string _constAvt
Definition Avt.cs:9
readonly TextEvent[] _events
Definition Avt.cs:11
Avt(ArrayList eventList)
Definition Avt.cs:28
Avt(string constAvt)
Definition Avt.cs:23
string Evaluate(Processor processor, ActionFrame frame)
Definition Avt.cs:37
static Avt CompileAvt(Compiler compiler, string avtText)
Definition Avt.cs:52