Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CopyCodeAction.cs
Go to the documentation of this file.
2
4
5internal sealed class CopyCodeAction : Action
6{
7 private readonly ArrayList _copyEvents;
8
9 internal CopyCodeAction()
10 {
11 _copyEvents = new ArrayList();
12 }
13
14 internal void AddEvent(Event copyEvent)
15 {
17 }
18
23
24 internal override void ReplaceNamespaceAlias(Compiler compiler)
25 {
27 for (int i = 0; i < count; i++)
28 {
29 ((Event)_copyEvents[i]).ReplaceNamespaceAlias(compiler);
30 }
31 }
32
33 internal override void Execute(Processor processor, ActionFrame frame)
34 {
35 switch (frame.State)
36 {
37 default:
38 return;
39 case 0:
40 frame.Counter = 0;
41 frame.State = 2;
42 break;
43 case 2:
44 break;
45 }
46 while (processor.CanContinue)
47 {
48 Event @event = (Event)_copyEvents[frame.Counter];
49 if (@event.Output(processor, frame))
50 {
51 if (frame.IncrementCounter() >= _copyEvents.Count)
52 {
53 frame.Finished();
54 break;
55 }
56 continue;
57 }
58 break;
59 }
60 }
61}
virtual void AddRange(ICollection c)
virtual int Add(object? value)
void AddEvents(ArrayList copyEvents)
override void ReplaceNamespaceAlias(Compiler compiler)
override void Execute(Processor processor, ActionFrame frame)