using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GDWeave;
using GDWeave.Godot;
using GDWeave.Godot.Variants;
using GDWeave.Modding;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("TranFox.Backrooms")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0+73c1a45b1471126019f7ea1197cd28e18b5fc7c2")]
[assembly: AssemblyProduct("TranFox.Backrooms")]
[assembly: AssemblyTitle("TranFox.Backrooms")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace TranFox.Backrooms
{
public class Config
{
}
public class Mod : IMod, global::System.IDisposable
{
public Config Config;
public Mod(IModInterface modInterface)
{
Config = modInterface.ReadConfig<Config>();
modInterface.RegisterScriptMod((IScriptMod)(object)new WorldReadyPatch());
modInterface.RegisterScriptMod((IScriptMod)(object)new StuckPatch());
}
public void Dispose()
{
}
}
public class StuckPatch : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
{
private int <>1__state;
private Token <>2__current;
private int <>l__initialThreadId;
private global::System.Collections.Generic.IEnumerable<Token> tokens;
public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;
private MultiTokenWaiter <waiter>5__2;
private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap2;
Token global::System.Collections.Generic.IEnumerator<Token>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object global::System.Collections.IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Modify>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void global::System.IDisposable.Dispose()
{
int num = <>1__state;
if (num == -3 || (uint)(num - 1) <= 22u)
{
try
{
}
finally
{
<>m__Finally1();
}
}
}
private bool MoveNext()
{
//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
//IL_01c5: Expected O, but got Unknown
//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
//IL_01ee: Expected O, but got Unknown
//IL_0210: Unknown result type (might be due to invalid IL or missing references)
//IL_021a: Expected O, but got Unknown
//IL_0236: Unknown result type (might be due to invalid IL or missing references)
//IL_0240: Expected O, but got Unknown
//IL_023b: Unknown result type (might be due to invalid IL or missing references)
//IL_0245: Expected O, but got Unknown
//IL_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_0271: Expected O, but got Unknown
//IL_0290: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Expected O, but got Unknown
//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
//IL_02c6: Expected O, but got Unknown
//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
//IL_02ec: Expected O, but got Unknown
//IL_030f: Unknown result type (might be due to invalid IL or missing references)
//IL_0319: Expected O, but got Unknown
//IL_0336: Unknown result type (might be due to invalid IL or missing references)
//IL_0340: Expected O, but got Unknown
//IL_0363: Unknown result type (might be due to invalid IL or missing references)
//IL_036d: Expected O, but got Unknown
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_0394: Expected O, but got Unknown
//IL_038f: Unknown result type (might be due to invalid IL or missing references)
//IL_0399: Expected O, but got Unknown
//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
//IL_03c6: Expected O, but got Unknown
//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
//IL_03f0: Expected O, but got Unknown
//IL_040d: Unknown result type (might be due to invalid IL or missing references)
//IL_0417: Expected O, but got Unknown
//IL_043a: Unknown result type (might be due to invalid IL or missing references)
//IL_0444: Expected O, but got Unknown
//IL_0461: Unknown result type (might be due to invalid IL or missing references)
//IL_046b: Expected O, but got Unknown
//IL_048e: Unknown result type (might be due to invalid IL or missing references)
//IL_0498: Expected O, but got Unknown
//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
//IL_04c5: Expected O, but got Unknown
//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ef: Expected O, but got Unknown
//IL_050c: Unknown result type (might be due to invalid IL or missing references)
//IL_0516: Expected O, but got Unknown
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<waiter>5__2 = new MultiTokenWaiter(new Func<Token, bool>[6]
{
(Token t) => (int)t.Type == 2 && t.AssociatedData == 211,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89 && t.AssociatedData == 2,
(Token t) => (int)t.Type == 1 && ((IdentifierToken)t).Name == "_kill",
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81
}, false, true);
<>7__wrap2 = tokens.GetEnumerator();
<>1__state = -3;
break;
case 1:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 2;
return true;
case 2:
<>1__state = -3;
<>2__current = new Token((TokenType)5, (uint?)63u);
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("WE ARE STUCK AAAAAAAAAAAAA"));
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 6;
return true;
case 6:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 7;
return true;
case 7:
<>1__state = -3;
<>2__current = new Token((TokenType)59, (uint?)null);
<>1__state = 8;
return true;
case 8:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("modNode");
<>1__state = 9;
return true;
case 9:
<>1__state = -3;
<>2__current = new Token((TokenType)23, (uint?)null);
<>1__state = 10;
return true;
case 10:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("get_node");
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("/root/TranFoxBackrooms"));
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 14;
return true;
case 14:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("modNode");
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 17;
return true;
case 17:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("_maybeGoToBackroooms");
<>1__state = 18;
return true;
case 18:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 19;
return true;
case 19:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 20;
return true;
case 20:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 21;
return true;
case 21:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 22;
return true;
case 22:
<>1__state = -3;
break;
case 23:
<>1__state = -3;
break;
}
if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext())
{
Token current = <>7__wrap2.Current;
if (<waiter>5__2.Check(current))
{
<>2__current = current;
<>1__state = 1;
return true;
}
<>2__current = current;
<>1__state = 23;
return true;
}
<>m__Finally1();
<>7__wrap2 = null;
return false;
}
catch
{
//try-fault
((global::System.IDisposable)this).Dispose();
throw;
}
}
bool global::System.Collections.IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>7__wrap2 != null)
{
((global::System.IDisposable)<>7__wrap2).Dispose();
}
}
[DebuggerHidden]
void global::System.Collections.IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
[DebuggerHidden]
global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
{
<Modify>d__1 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__1(0);
}
<Modify>d__.tokens = <>3__tokens;
return <Modify>d__;
}
[DebuggerHidden]
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
}
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/Entities/Player/player.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__1))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
MultiTokenWaiter waiter = new MultiTokenWaiter(new Func<Token, bool>[6]
{
(Token t) => (int)t.Type == 2 && t.AssociatedData == 211,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89 && t.AssociatedData == 2,
(Token t) => (int)t.Type == 1 && ((IdentifierToken)t).Name == "_kill",
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81
}, false, true);
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token current = enumerator.Current;
if (waiter.Check(current))
{
yield return current;
yield return new Token((TokenType)89, (uint?)2u);
yield return new Token((TokenType)5, (uint?)63u);
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("WE ARE STUCK AAAAAAAAAAAAA"));
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)2u);
yield return new Token((TokenType)59, (uint?)null);
yield return (Token)new IdentifierToken("modNode");
yield return new Token((TokenType)23, (uint?)null);
yield return (Token)new IdentifierToken("get_node");
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("/root/TranFoxBackrooms"));
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)2u);
yield return (Token)new IdentifierToken("modNode");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("_maybeGoToBackroooms");
yield return new Token((TokenType)80, (uint?)null);
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)2u);
yield return new Token((TokenType)89, (uint?)2u);
}
else
{
yield return current;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
internal class WorldReadyPatch : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
{
private int <>1__state;
private Token <>2__current;
private int <>l__initialThreadId;
private global::System.Collections.Generic.IEnumerable<Token> tokens;
public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;
private MultiTokenWaiter <waiter>5__2;
private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap2;
Token global::System.Collections.Generic.IEnumerator<Token>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object global::System.Collections.IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Modify>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void global::System.IDisposable.Dispose()
{
int num = <>1__state;
if (num == -3 || (uint)(num - 1) <= 16u)
{
try
{
}
finally
{
<>m__Finally1();
}
}
}
private bool MoveNext()
{
//IL_0181: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Expected O, but got Unknown
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Expected O, but got Unknown
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01dd: Expected O, but got Unknown
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0209: Expected O, but got Unknown
//IL_0225: Unknown result type (might be due to invalid IL or missing references)
//IL_022f: Expected O, but got Unknown
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Expected O, but got Unknown
//IL_0277: Unknown result type (might be due to invalid IL or missing references)
//IL_0281: Expected O, but got Unknown
//IL_027c: Unknown result type (might be due to invalid IL or missing references)
//IL_0286: Expected O, but got Unknown
//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
//IL_02b2: Expected O, but got Unknown
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Expected O, but got Unknown
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: Expected O, but got Unknown
//IL_0326: Unknown result type (might be due to invalid IL or missing references)
//IL_0330: Expected O, but got Unknown
//IL_034d: Unknown result type (might be due to invalid IL or missing references)
//IL_0357: Expected O, but got Unknown
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_0384: Expected O, but got Unknown
//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
//IL_03b1: Expected O, but got Unknown
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_03d8: Expected O, but got Unknown
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<waiter>5__2 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
(Token t) => (int)t.Type == 1 && t is IdentifierToken && ((IdentifierToken)t).Name == "_ready",
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89
}, false, true);
<>7__wrap2 = tokens.GetEnumerator();
<>1__state = -3;
break;
case 1:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 2;
return true;
case 2:
<>1__state = -3;
<>2__current = new Token((TokenType)59, (uint?)null);
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("modNode");
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = new Token((TokenType)23, (uint?)null);
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("get_node");
<>1__state = 6;
return true;
case 6:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 7;
return true;
case 7:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("/root/TranFoxBackrooms"));
<>1__state = 8;
return true;
case 8:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 9;
return true;
case 9:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 10;
return true;
case 10:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("modNode");
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("_addBackroomsZone");
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<>2__current = new Token((TokenType)80, (uint?)null);
<>1__state = 14;
return true;
case 14:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
break;
case 17:
<>1__state = -3;
break;
}
if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext())
{
Token current = <>7__wrap2.Current;
if (<waiter>5__2.Check(current))
{
<>2__current = current;
<>1__state = 1;
return true;
}
<>2__current = current;
<>1__state = 17;
return true;
}
<>m__Finally1();
<>7__wrap2 = null;
return false;
}
catch
{
//try-fault
((global::System.IDisposable)this).Dispose();
throw;
}
}
bool global::System.Collections.IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>7__wrap2 != null)
{
((global::System.IDisposable)<>7__wrap2).Dispose();
}
}
[DebuggerHidden]
void global::System.Collections.IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
[DebuggerHidden]
global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
{
<Modify>d__1 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__1(0);
}
<Modify>d__.tokens = <>3__tokens;
return <Modify>d__;
}
[DebuggerHidden]
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
}
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/World/world.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__1))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
MultiTokenWaiter waiter = new MultiTokenWaiter(new Func<Token, bool>[5]
{
(Token t) => (int)t.Type == 1 && t is IdentifierToken && ((IdentifierToken)t).Name == "_ready",
(Token t) => (int)t.Type == 80,
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89
}, false, true);
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token current = enumerator.Current;
if (waiter.Check(current))
{
yield return current;
yield return new Token((TokenType)89, (uint?)1u);
yield return new Token((TokenType)59, (uint?)null);
yield return (Token)new IdentifierToken("modNode");
yield return new Token((TokenType)23, (uint?)null);
yield return (Token)new IdentifierToken("get_node");
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("/root/TranFoxBackrooms"));
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)1u);
yield return (Token)new IdentifierToken("modNode");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("_addBackroomsZone");
yield return new Token((TokenType)80, (uint?)null);
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)89, (uint?)1u);
}
else
{
yield return current;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
}
namespace TranFox.Backrooms.Properties
{
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
internal class Resources
{
private static ResourceManager resourceMan;
private static CultureInfo resourceCulture;
[EditorBrowsable(/*Could not decode attribute arguments.*/)]
internal static ResourceManager ResourceManager
{
get
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Expected O, but got Unknown
if (resourceMan == null)
{
resourceMan = new ResourceManager("TranFox.Backrooms.Properties.Resources", typeof(Resources).Assembly);
}
return resourceMan;
}
}
[EditorBrowsable(/*Could not decode attribute arguments.*/)]
internal static CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
internal static string GDWeavePath => ResourceManager.GetString("GDWeavePath", resourceCulture);
internal Resources()
{
}
}
}