Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MethodSequenceListItem.cs
Go to the documentation of this file.
1using System;
3
5
7{
8 public string Name;
9
11
13
14 public bool Skip;
15
17 {
18 Name = name;
19 Method = method;
20 Parent = parent;
21 }
22
24 {
25 if (Skip)
26 {
27 return false;
28 }
29 if (!sequence.Contains(this))
30 {
31 return false;
32 }
33 if (Parent != null)
34 {
36 }
37 return true;
38 }
39
40 public bool Act()
41 {
42 return Method();
43 }
44
46 {
48 {
49 if (item.ShouldAct(sequence) && !item.Act())
50 {
51 break;
52 }
53 }
54 }
55
56 public override string ToString()
57 {
58 return "name: " + Name + " skip: " + Skip.ToString() + " parent: " + Parent;
59 }
60}
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
static void ExecuteSequence(List< MethodSequenceListItem > sequence)
bool ShouldAct(List< MethodSequenceListItem > sequence)
MethodSequenceListItem(string name, Func< bool > method, MethodSequenceListItem parent=null)