//
// 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.Collections.Generic;
namespace Ariadne.UnitTests
{
partial class Campaign
{
partial class Outpost
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Scout__waited;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Scout.waited");
}
}
[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.ArcTests.Gates 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 Outpost()
{
}
protected Outpost(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
}
protected Outpost(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("Scout.waited");
}
#pragma warning restore
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Scout.waited":
#line 14 "Campaign.cs"
writer.Local("Scout.waited", this.Scout__waited);
#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("Scout.waited", out int loaded)) { this.Scout__waited = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "Scout": goto Scout;
}
#line hidden
Scout:
#line 28 "Campaign.cs"
using (__frame.Enter("Scout")) { if (!Scout__Passage(__frame, __time, gates)) { return false; } }
#line 29 "Campaign.cs"
Log.Add("done");
#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 "Scout":
Scout__LocalsToSave(__frame, depth + 1, writer);
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Scout__Passage(__Frame __frame, global::Ariadne.TickTime __time, ArcTests.Gates gates)
{
#line hidden
ref int waited = ref __frame.Scout__waited;
switch (__frame.ResumeKey)
{
case "look": goto look;
}
#line 14 "Campaign.cs"
waited = 0;
#line hidden
look:
#line 17 "Campaign.cs"
while (!gates.Open.Contains("clear"))
#line hidden
{
#line 19 "Campaign.cs"
waited++;
#line 20 "Campaign.cs"
__frame.Mark("look"); return false;
#line hidden
}
#line 23 "Campaign.cs"
Log.Add("scouted after " + waited);
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Scout__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "look":
__frame.SaveLocal("Scout.waited", writer);
break;
}
}
}
}
}