//
// Ariadne.Generator's copy of the scripts in this file: the code that actually runs. Edits here are overwritten.
// In the copy beside the script, #line paths are relative to it; the compiled code uses full paths.
#pragma warning disable
using System;
using System.Collections.Generic;
namespace Ariadne.UnitTests
{
partial class SingleLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public SingleLatchScript()
{
}
protected SingleLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected SingleLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 30 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line 27 "ConditionWaitScripts.cs"
world.Log.Add("start");
#line hidden
first:
#line 30 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
first__resume:
#line 30 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 31 "ConditionWaitScripts.cs"
world.Log.Add("door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ClearLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public ClearLatchScript()
{
}
protected ClearLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ClearLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 45 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line 42 "ConditionWaitScripts.cs"
world.Log.Add("start");
#line hidden
first:
#line 45 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(!world.Door);
#line hidden
first__resume:
#line 45 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 46 "ConditionWaitScripts.cs"
world.Log.Add("clear");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class LoopedLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__count;
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.count");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public LoopedLatchScript()
{
}
protected LoopedLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LoopedLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.count");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 61 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.count":
#line 57 "ConditionWaitScripts.cs"
writer.Local("Run.count", this.Run__count);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.count", out int loaded)) { this.Run__count = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
ref int count = ref __frame.Run__count;
switch (__frame.ResumeKey)
{
case "spin": goto spin__resume;
}
#line 57 "ConditionWaitScripts.cs"
count = 0;
#line hidden
__loopStart1:
#line hidden
{
#line 58 "ConditionWaitScripts.cs"
if (!(count < 3)) goto __loopEnd1;
#line hidden
}
#line hidden
spin:
#line hidden
{
#line 61 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
}
#line hidden
spin__resume:
#line hidden
{
#line 61 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("spin"); return false; } __frame.Run____triggers1.Finish();
#line 62 "ConditionWaitScripts.cs"
++count;
#line 63 "ConditionWaitScripts.cs"
world.Log.Add("door " + count);
#line hidden
goto __loopStart1;
#line hidden
}
#line hidden
__loopEnd1:
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "spin":
__frame.SaveLocal("Run.count", writer);
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class LatchThenSleepScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public LatchThenSleepScript()
{
}
protected LatchThenSleepScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LatchThenSleepScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 76 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 80 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
case "nap": goto nap__resume;
}
#line hidden
first:
#line 76 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
first__resume:
#line 76 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 77 "ConditionWaitScripts.cs"
world.Log.Add("door");
#line hidden
nap:
#line 80 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(TimeSpan.FromSeconds(100));
#line hidden
nap__resume:
#line 80 "ConditionWaitScripts.cs"
if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Mark("nap"); return false; }
#line 81 "ConditionWaitScripts.cs"
world.Log.Add("rested");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
case "nap":
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TimedLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public TimedLatchScript()
{
}
protected TimedLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TimedLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 93 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 93 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 93 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(world.Limit);
#line 93 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
first__resume:
#line 93 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Expire(); } global::Ariadne.Condition got; got = __frame.Run____triggers1.Finish();
#line 94 "ConditionWaitScripts.cs"
world.Log.Add(got == world.Door ? "door" : "timeout");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TimedClearScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public TimedClearScript()
{
}
protected TimedClearScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TimedClearScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 106 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 106 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 106 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(world.Limit);
#line 106 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(!world.Door);
#line hidden
first__resume:
#line 106 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Expire(); } global::Ariadne.Condition got; got = __frame.Run____triggers1.Finish();
#line 107 "ConditionWaitScripts.cs"
world.Log.Add(got == null ? "timeout" : "clear");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TimedLatchThenSleepScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Run____wait1;
public global::Amphora.Duration Run____wait2;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
lister.Local("Run.__wait2");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public TimedLatchThenSleepScript()
{
}
protected TimedLatchThenSleepScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TimedLatchThenSleepScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
lister.Local("Run.__wait2");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 119 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 119 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
case "Run.__wait2":
#line 123 "ConditionWaitScripts.cs"
writer.Local("Run.__wait2", this.Run____wait2);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
{ if (reader.TryLocal("Run.__wait2", out global::Amphora.Duration loaded)) { this.Run____wait2 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
case "nap": goto nap__resume;
}
#line hidden
first:
#line 119 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(world.Limit);
#line 119 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
first__resume:
#line 119 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Expire(); } __frame.Run____triggers1.Finish();
#line 120 "ConditionWaitScripts.cs"
world.Log.Add("through");
#line hidden
nap:
#line 123 "ConditionWaitScripts.cs"
__frame.Run____wait2 = __time.DeadlineAfter(TimeSpan.FromSeconds(100));
#line hidden
nap__resume:
#line 123 "ConditionWaitScripts.cs"
if (__time.GameTime < __frame.Run____wait2) { __frame.Sleep(__frame.Run____wait2); __frame.Mark("nap"); return false; }
#line 124 "ConditionWaitScripts.cs"
world.Log.Add("rested");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
__frame.SaveLocal("Run.__wait1", writer);
break;
case "nap":
__frame.SaveLocal("Run.__wait2", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class RestartableLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public RestartableLatchScript()
{
}
protected RestartableLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Skip", out bool loaded)) { this.Skip = loaded; } else if (!reader.HasField("Skip")) { throw new global::System.IO.InvalidDataException("RestartableLatchScript's save has no field 'Skip', which has no initializer to fall back on. Give it one."); } }
}
protected RestartableLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Skip");
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 133 "ConditionWaitScripts.cs"
writer.Field("Skip", this.Skip);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 140 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 145 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
case "nap": goto nap__resume;
}
#line hidden
{
#line 137 "ConditionWaitScripts.cs"
if (!(!Skip)) goto __end1;
#line hidden
}
#line hidden
first:
#line hidden
{
#line 140 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
}
#line hidden
first__resume:
#line hidden
{
#line 140 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 141 "ConditionWaitScripts.cs"
world.Log.Add("door");
#line hidden
}
#line hidden
__end1:
#line hidden
nap:
#line 145 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(TimeSpan.FromSeconds(100));
#line hidden
nap__resume:
#line 145 "ConditionWaitScripts.cs"
if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Mark("nap"); return false; }
#line 146 "ConditionWaitScripts.cs"
world.Log.Add("rested");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
case "nap":
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class RestartableLatchPassageScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Amphora.Duration Run____wait1;
public global::Ariadne.TriggerWait Watch____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__wait1");
lister.Local("Watch.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public RestartableLatchPassageScript()
{
}
protected RestartableLatchPassageScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Skip", out bool loaded)) { this.Skip = loaded; } else if (!reader.HasField("Skip")) { throw new global::System.IO.InvalidDataException("RestartableLatchPassageScript's save has no field 'Skip', which has no initializer to fall back on. Give it one."); } }
}
protected RestartableLatchPassageScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Skip");
lister.Local("Run.__wait1");
lister.Local("Watch.__triggers1");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 155 "ConditionWaitScripts.cs"
writer.Field("Skip", this.Skip);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__wait1":
#line 173 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
case "Watch.__triggers1":
#line 160 "ConditionWaitScripts.cs"
writer.Local("Watch.__triggers1", this.Watch____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
{ if (reader.TryLocal("Watch.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Watch____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Watch____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Watch____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "call": goto call;
case "nap": goto nap__resume;
}
#line hidden
{
#line 166 "ConditionWaitScripts.cs"
if (!(!Skip)) goto __end1;
#line hidden
}
#line hidden
call:
#line hidden
{
#line 169 "ConditionWaitScripts.cs"
using (__frame.Enter("call")) { if (!Watch__Passage(__frame, __time, world)) { return false; } }
#line hidden
}
#line hidden
__end1:
#line hidden
nap:
#line 173 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(TimeSpan.FromSeconds(100));
#line hidden
nap__resume:
#line 173 "ConditionWaitScripts.cs"
if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Mark("nap"); return false; }
#line 174 "ConditionWaitScripts.cs"
world.Log.Add("rested");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "call":
Watch__LocalsToSave(__frame, depth + 1, writer);
break;
case "nap":
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Watch__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "inner": goto inner__resume;
}
#line hidden
inner:
#line 160 "ConditionWaitScripts.cs"
__frame.Watch____triggers1.Begin(__frame, requiresAll: false); __frame.Watch____triggers1.Add(world.Door);
#line hidden
inner__resume:
#line 160 "ConditionWaitScripts.cs"
if (!__frame.Watch____triggers1.Complete) { __frame.Suspend(); __frame.Mark("inner"); return false; } __frame.Watch____triggers1.Finish();
#line 161 "ConditionWaitScripts.cs"
world.Log.Add("door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Watch__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "inner":
__frame.SaveLocal("Watch.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class LatchLookoutScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Watch____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Watch.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
public LatchLookoutScript()
{
}
protected LatchLookoutScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected LatchLookoutScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Watch.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Watch.__triggers1":
#line 186 "ConditionWaitScripts.cs"
writer.Local("Watch.__triggers1", this.Watch____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Watch.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Watch____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Watch____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Watch____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
}
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public bool Watch__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "watch": goto watch__resume;
}
#line hidden
watch:
#line 186 "ConditionWaitScripts.cs"
__frame.Watch____triggers1.Begin(__frame, requiresAll: false); __frame.Watch____triggers1.Add(world.Door);
#line hidden
watch__resume:
#line 186 "ConditionWaitScripts.cs"
if (!__frame.Watch____triggers1.Complete) { __frame.Suspend(); __frame.Mark("watch"); return false; } __frame.Watch____triggers1.Finish();
#line 187 "ConditionWaitScripts.cs"
world.Log.Add("door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public void Watch__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "watch":
__frame.SaveLocal("Watch.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class LatchRelayScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Amphora.Duration Run____wait1;
public global::Ariadne.UnitTests.LatchLookoutScript Run____call_relay_receiver;
public global::Ariadne.UnitTests.LatchLookoutScript.__Frame Run____call_relay_frame;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__wait1");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Run.relay/", typeof(global::Ariadne.UnitTests.LatchLookoutScript.__Frame));
if (scope != null)
{
scope.Local("receiver");
global::Ariadne.UnitTests.LatchLookoutScript.__Frame.ListParts(scope);
}
}
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public LatchRelayScript()
{
}
protected LatchRelayScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Lookout", out global::Ariadne.UnitTests.LatchLookoutScript loaded)) { this.Lookout = loaded; } else if (!reader.HasField("Lookout")) { throw new global::System.IO.InvalidDataException("LatchRelayScript's save has no field 'Lookout', which has no initializer to fall back on. Give it one."); } }
{ if (reader.TryField("Skip", out bool loaded)) { this.Skip = loaded; } else if (!reader.HasField("Skip")) { throw new global::System.IO.InvalidDataException("LatchRelayScript's save has no field 'Skip', which has no initializer to fall back on. Give it one."); } }
}
protected LatchRelayScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Lookout");
lister.Field("Skip");
lister.Local("Run.__wait1");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Run.relay/", typeof(global::Ariadne.UnitTests.LatchLookoutScript.__Frame));
if (scope != null)
{
scope.Local("receiver");
global::Ariadne.UnitTests.LatchLookoutScript.__Frame.ListParts(scope);
}
}
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 200 "ConditionWaitScripts.cs"
writer.Field("Lookout", this.Lookout);
#line 202 "ConditionWaitScripts.cs"
writer.Field("Skip", this.Skip);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__wait1":
#line 213 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
case "Run.relay/receiver":
#line 209 "ConditionWaitScripts.cs"
writer.Local("receiver", this.Run____call_relay_receiver);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
{
if (reader.TryScope("Run.relay/", out global::Ariadne.IArcReader scope))
{
{ if (scope.TryLocal("receiver", out global::Ariadne.UnitTests.LatchLookoutScript loaded)) { this.Run____call_relay_receiver = loaded; } }
if (this.Run____call_relay_receiver != null)
{
this.Run____call_relay_frame = (global::Ariadne.UnitTests.LatchLookoutScript.__Frame)this.Run____call_relay_receiver.NewFrame();
this.Run____call_relay_frame.LoadLocals(scope);
}
}
}
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.AttachWaits(slot);
if (this.Run____call_relay_frame != null) { this.Run____call_relay_frame.AttachWaits(slot); }
}
public override void EndWaits()
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.EndWaits();
if (this.Run____call_relay_frame != null) { this.Run____call_relay_frame.EndWaits(); }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "relay": goto relay;
case "nap": goto nap__resume;
}
#line hidden
{
#line 206 "ConditionWaitScripts.cs"
if (!(!Skip)) goto __end1;
#line hidden
}
#line hidden
relay:
#line hidden
{
#line 209 "ConditionWaitScripts.cs"
using (__frame.Enter("relay")) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); if (__frame.ResumeKey == null) { __frame.Run____call_relay_receiver = (Lookout); __frame.Run____call_relay_frame = null; } if (__frame.Run____call_relay_frame == null) { __frame.Run____call_relay_frame = (global::Ariadne.UnitTests.LatchLookoutScript.__Frame)__frame.Run____call_relay_receiver.NewFrame(); } if (!__frame.Run____call_relay_receiver.Watch__Passage(__frame.Lend(__frame.Run____call_relay_frame), __time, world)) { return false; } }
#line hidden
}
#line hidden
__end1:
#line hidden
nap:
#line 213 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(TimeSpan.FromSeconds(100));
#line hidden
nap__resume:
#line 213 "ConditionWaitScripts.cs"
if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Mark("nap"); return false; }
#line 214 "ConditionWaitScripts.cs"
world.Log.Add("rested");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "relay":
{ global::Ariadne.IArcWriter scope = writer.Scope("Run.relay/"); __frame.SaveLocal("Run.relay/receiver", scope); if (__frame.Run____call_relay_receiver != null) { __frame.Run____call_relay_receiver.Watch__LocalsToSave(__frame.Lend(__frame.Run____call_relay_frame), depth + 1, scope); } }
break;
case "nap":
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AnyLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public AnyLatchScript()
{
}
protected AnyLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AnyLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 226 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 226 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(world.Alarm);
#line hidden
first__resume:
#line 226 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } global::Ariadne.Condition got; got = __frame.Run____triggers1.Finish();
#line 227 "ConditionWaitScripts.cs"
world.Log.Add(got == world.Alarm ? "alarm" : "door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AnyOrInverseScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public AnyOrInverseScript()
{
}
protected AnyOrInverseScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AnyOrInverseScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 239 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 239 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(!world.Door);
#line hidden
first__resume:
#line 239 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 240 "ConditionWaitScripts.cs"
world.Log.Add("through");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AnyLatchThenSleepScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public AnyLatchThenSleepScript()
{
}
protected AnyLatchThenSleepScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AnyLatchThenSleepScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 252 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 256 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
case "nap": goto nap__resume;
}
#line hidden
first:
#line 252 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(world.Alarm);
#line hidden
first__resume:
#line 252 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 253 "ConditionWaitScripts.cs"
world.Log.Add("through");
#line hidden
nap:
#line 256 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(TimeSpan.FromSeconds(100));
#line hidden
nap__resume:
#line 256 "ConditionWaitScripts.cs"
if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Mark("nap"); return false; }
#line 257 "ConditionWaitScripts.cs"
world.Log.Add("rested");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
case "nap":
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AllLatchesScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public AllLatchesScript()
{
}
protected AllLatchesScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected AllLatchesScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 269 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 269 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: true); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(world.Alarm);
#line hidden
first__resume:
#line 269 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } global::Ariadne.Condition last; last = __frame.Run____triggers1.Finish();
#line 270 "ConditionWaitScripts.cs"
world.Log.Add(last == world.Alarm ? "all set" : "other");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class DoorOpenAlarmClearScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public DoorOpenAlarmClearScript()
{
}
protected DoorOpenAlarmClearScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected DoorOpenAlarmClearScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 282 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 282 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: true); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(!world.Alarm);
#line hidden
first__resume:
#line 282 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 283 "ConditionWaitScripts.cs"
world.Log.Add("ready");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ContradictoryAllScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public ContradictoryAllScript()
{
}
protected ContradictoryAllScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ContradictoryAllScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 295 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 295 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: true); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(!world.Door);
#line hidden
first__resume:
#line 295 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Finish();
#line 296 "ConditionWaitScripts.cs"
world.Log.Add("never");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TimedAnyLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public TimedAnyLatchScript()
{
}
protected TimedAnyLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TimedAnyLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 308 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 308 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 308 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(world.Limit);
#line 308 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(world.Alarm);
#line hidden
first__resume:
#line 308 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Expire(); } global::Ariadne.Condition got; got = __frame.Run____triggers1.Finish();
#line 309 "ConditionWaitScripts.cs"
world.Log.Add(got == null ? "timeout" : got == world.Alarm ? "alarm" : "door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class TimedAllLatchesScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(2, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public TimedAllLatchesScript()
{
}
protected TimedAllLatchesScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected TimedAllLatchesScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 321 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 321 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 321 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(world.Limit);
#line 321 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: true); __frame.Run____triggers1.Add(world.Door); __frame.Run____triggers1.Add(world.Alarm);
#line hidden
first__resume:
#line 321 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Expire(); } global::Ariadne.Condition got; got = __frame.Run____triggers1.Finish();
#line 322 "ConditionWaitScripts.cs"
world.Log.Add(got == null ? "timeout" : "all set");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class AssignedLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Run____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Run____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public AssignedLatchScript()
{
}
protected AssignedLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Last", out global::Ariadne.Condition loaded)) { this.Last = loaded; } else if (!reader.HasField("Last")) { throw new global::System.IO.InvalidDataException("AssignedLatchScript's save has no field 'Last', which has no initializer to fall back on. Give it one."); } }
}
protected AssignedLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Last");
lister.Local("Run.__triggers1");
lister.Local("Run.__wait1");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 331 "ConditionWaitScripts.cs"
writer.Field("Last", this.Last);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.__triggers1":
#line 336 "ConditionWaitScripts.cs"
writer.Local("Run.__triggers1", this.Run____triggers1);
#line hidden
return;
case "Run.__wait1":
#line 336 "ConditionWaitScripts.cs"
writer.Local("Run.__wait1", this.Run____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Run____triggers1 = loaded; } }
{ if (reader.TryLocal("Run.__wait1", out global::Amphora.Duration loaded)) { this.Run____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Run____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Run____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "first": goto first__resume;
}
#line hidden
first:
#line 336 "ConditionWaitScripts.cs"
__frame.Run____wait1 = __time.DeadlineAfter(world.Limit);
#line 336 "ConditionWaitScripts.cs"
__frame.Run____triggers1.Begin(__frame, requiresAll: false); __frame.Run____triggers1.Add(world.Door);
#line hidden
first__resume:
#line 336 "ConditionWaitScripts.cs"
if (!__frame.Run____triggers1.Complete) { if (__time.GameTime < __frame.Run____wait1) { __frame.Sleep(__frame.Run____wait1); __frame.Suspend(); __frame.Mark("first"); return false; } __frame.Run____triggers1.Expire(); } Last = __frame.Run____triggers1.Finish();
#line 337 "ConditionWaitScripts.cs"
world.Log.Add(Last == null ? "timeout" : "door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "first":
__frame.SaveLocal("Run.__triggers1", writer);
__frame.SaveLocal("Run.__wait1", writer);
break;
}
}
}
}
namespace Ariadne.UnitTests
{
partial class ReturnedLatchScript
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Ariadne.TriggerWait Pick____triggers1 = new global::Ariadne.TriggerWait(1, onConditions: true);
public global::Amphora.Duration Pick____wait1;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Pick.__triggers1");
lister.Local("Pick.__wait1");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Ariadne.UnitTests.LatchWorld context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public ReturnedLatchScript()
{
}
protected ReturnedLatchScript(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected ReturnedLatchScript(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Pick.__triggers1");
lister.Local("Pick.__wait1");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Pick.__triggers1":
#line 356 "ConditionWaitScripts.cs"
writer.Local("Pick.__triggers1", this.Pick____triggers1);
#line hidden
return;
case "Pick.__wait1":
#line 356 "ConditionWaitScripts.cs"
writer.Local("Pick.__wait1", this.Pick____wait1);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Pick.__triggers1", out global::Ariadne.TriggerWait loaded)) { this.Pick____triggers1 = loaded; } }
{ if (reader.TryLocal("Pick.__wait1", out global::Amphora.Duration loaded)) { this.Pick____wait1 = loaded; } }
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
base.AttachWaits(slot);
this.Pick____triggers1.Attach(slot);
}
public override void EndWaits()
{
base.EndWaits();
this.Pick____triggers1.Expire();
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world)
{
#line hidden
switch (__frame.ResumeKey)
{
case "call": goto call;
}
#line hidden
call:
#line 349 "ConditionWaitScripts.cs"
global::Ariadne.Condition got; { global::Ariadne.Condition __value; using (__frame.Enter("call")) { if (!Pick__Passage(__frame, __time, world, __result: out __value)) { return false; } } got = __value; }
#line 350 "ConditionWaitScripts.cs"
world.Log.Add(got == null ? "timeout" : "door");
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "call":
Pick__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Pick__Passage(__Frame __frame, global::Ariadne.TickTime __time, LatchWorld world, out global::Ariadne.Condition __result)
{
#line hidden
__result = default(global::Ariadne.Condition);
switch (__frame.ResumeKey)
{
case "inner": goto inner__resume;
}
#line hidden
inner:
#line 356 "ConditionWaitScripts.cs"
__frame.Pick____wait1 = __time.DeadlineAfter(world.Limit);
#line 356 "ConditionWaitScripts.cs"
__frame.Pick____triggers1.Begin(__frame, requiresAll: false); __frame.Pick____triggers1.Add(world.Door);
#line hidden
inner__resume:
#line 356 "ConditionWaitScripts.cs"
if (!__frame.Pick____triggers1.Complete) { if (__time.GameTime < __frame.Pick____wait1) { __frame.Sleep(__frame.Pick____wait1); __frame.Suspend(); __frame.Mark("inner"); return false; } __frame.Pick____triggers1.Expire(); } __result = __frame.Pick____triggers1.Finish(); __frame.Exit(); return true;
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Pick__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "inner":
__frame.SaveLocal("Pick.__triggers1", writer);
__frame.SaveLocal("Pick.__wait1", writer);
break;
}
}
}
}