Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
UseAttributeSetsAction.cs
Go to the documentation of this file.
2
4{
6
7 private string _useString;
8
10
11 internal override void Compile(Compiler compiler)
12 {
13 _useString = compiler.Input.Value;
14 if (_useString.Length == 0)
15 {
17 return;
18 }
20 try
21 {
23 for (int i = 0; i < array.Length; i++)
24 {
25 _useAttributeSets[i] = compiler.CreateXPathQName(array[i]);
26 }
27 }
28 catch (XsltException)
29 {
30 if (!compiler.ForwardCompatibility)
31 {
32 throw;
33 }
35 }
36 }
37
38 internal override void Execute(Processor processor, ActionFrame frame)
39 {
40 switch (frame.State)
41 {
42 default:
43 return;
44 case 0:
45 frame.Counter = 0;
46 frame.State = 2;
47 break;
48 case 2:
49 break;
50 }
51 if (frame.Counter < _useAttributeSets.Length)
52 {
53 AttributeSetAction attributeSet = processor.RootAction.GetAttributeSet(_useAttributeSets[frame.Counter]);
54 frame.IncrementCounter();
55 processor.PushActionFrame(attributeSet, frame.NodeSet);
56 }
57 else
58 {
59 frame.Finished();
60 }
61 }
62}
static string[] SplitString(string value)
override void Execute(Processor processor, ActionFrame frame)