using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
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("BuffStack")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+2e3c3012843d5ed3905226225696bb93d7c2fbd6")]
[assembly: AssemblyProduct("BuffStack")]
[assembly: AssemblyTitle("BuffStack")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace BuffStack;
public class Mod : IMod, global::System.IDisposable
{
public Mod(IModInterface modInterface)
{
modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerPatch());
}
public void Dispose()
{
}
}
public class PlayerPatch : 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 string path;
public string <>3__path;
private global::System.Collections.Generic.IEnumerable<Token> tokens;
public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;
public PlayerPatch <>4__this;
private MultiTokenWaiter <catchMatch>5__1;
private MultiTokenWaiter <catchBigMatch>5__2;
private MultiTokenWaiter <catchDeluxeMatch>5__3;
private MultiTokenWaiter <speedMatch>5__4;
private MultiTokenWaiter <speedBurstMatch>5__5;
private TokenConsumer <newlineConsumer>5__6;
private global::System.Collections.Generic.IEnumerator<Token> <>s__7;
private Token <token>5__8;
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) > 21u)
{
return;
}
try
{
}
finally
{
<>m__Finally1();
}
}
private bool MoveNext()
{
//IL_0593: Unknown result type (might be due to invalid IL or missing references)
//IL_059d: Expected O, but got Unknown
//IL_05c0: Unknown result type (might be due to invalid IL or missing references)
//IL_05ca: Expected O, but got Unknown
//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
//IL_05f2: Expected O, but got Unknown
//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
//IL_05f7: Expected O, but got Unknown
//IL_066e: Unknown result type (might be due to invalid IL or missing references)
//IL_0678: Expected O, but got Unknown
//IL_069b: Unknown result type (might be due to invalid IL or missing references)
//IL_06a5: Expected O, but got Unknown
//IL_06c3: Unknown result type (might be due to invalid IL or missing references)
//IL_06cd: Expected O, but got Unknown
//IL_06c8: Unknown result type (might be due to invalid IL or missing references)
//IL_06d2: Expected O, but got Unknown
//IL_074b: Unknown result type (might be due to invalid IL or missing references)
//IL_0755: Expected O, but got Unknown
//IL_0779: Unknown result type (might be due to invalid IL or missing references)
//IL_0783: Expected O, but got Unknown
//IL_07a2: Unknown result type (might be due to invalid IL or missing references)
//IL_07ac: Expected O, but got Unknown
//IL_07a7: Unknown result type (might be due to invalid IL or missing references)
//IL_07b1: Expected O, but got Unknown
//IL_082a: Unknown result type (might be due to invalid IL or missing references)
//IL_0834: Expected O, but got Unknown
//IL_0858: Unknown result type (might be due to invalid IL or missing references)
//IL_0862: Expected O, but got Unknown
//IL_0881: Unknown result type (might be due to invalid IL or missing references)
//IL_088b: Expected O, but got Unknown
//IL_0886: Unknown result type (might be due to invalid IL or missing references)
//IL_0890: Expected O, but got Unknown
//IL_0909: Unknown result type (might be due to invalid IL or missing references)
//IL_0913: Expected O, but got Unknown
//IL_0937: Unknown result type (might be due to invalid IL or missing references)
//IL_0941: Expected O, but got Unknown
//IL_0960: Unknown result type (might be due to invalid IL or missing references)
//IL_096a: Expected O, but got Unknown
//IL_0965: Unknown result type (might be due to invalid IL or missing references)
//IL_096f: Expected O, but got Unknown
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a7: Expected O, but got Unknown
//IL_025a: Unknown result type (might be due to invalid IL or missing references)
//IL_0264: Expected O, but got Unknown
//IL_0317: Unknown result type (might be due to invalid IL or missing references)
//IL_0321: Expected O, but got Unknown
//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
//IL_03de: Expected O, but got Unknown
//IL_0491: Unknown result type (might be due to invalid IL or missing references)
//IL_049b: 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
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<catchMatch>5__1 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val14 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result5;
if (val14 != null)
{
Variant value5 = val14.Value;
StringVariant val15 = (StringVariant)(object)((value5 is StringVariant) ? value5 : null);
if (val15 != null)
{
result5 = ((val15.Value == "catch") ? 1 : 0);
goto IL_002c;
}
}
result5 = 0;
goto IL_002c;
IL_002c:
return (byte)result5 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val13 != null && val13.Name == "catch_drink_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
<catchBigMatch>5__2 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val11 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result4;
if (val11 != null)
{
Variant value4 = val11.Value;
StringVariant val12 = (StringVariant)(object)((value4 is StringVariant) ? value4 : null);
if (val12 != null)
{
result4 = ((val12.Value == "catch_big") ? 1 : 0);
goto IL_002c;
}
}
result4 = 0;
goto IL_002c;
IL_002c:
return (byte)result4 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val10 != null && val10.Name == "catch_drink_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
<catchDeluxeMatch>5__3 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val8 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result3;
if (val8 != null)
{
Variant value3 = val8.Value;
StringVariant val9 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null);
if (val9 != null)
{
result3 = ((val9.Value == "catch_deluxe") ? 1 : 0);
goto IL_002c;
}
}
result3 = 0;
goto IL_002c;
IL_002c:
return (byte)result3 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val7 != null && val7.Name == "catch_drink_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
<speedMatch>5__4 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val5 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result2;
if (val5 != null)
{
Variant value2 = val5.Value;
StringVariant val6 = (StringVariant)(object)((value2 is StringVariant) ? value2 : null);
if (val6 != null)
{
result2 = ((val6.Value == "speed") ? 1 : 0);
goto IL_002c;
}
}
result2 = 0;
goto IL_002c;
IL_002c:
return (byte)result2 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val4 != null && val4.Name == "boost_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
<speedBurstMatch>5__5 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val2 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result;
if (val2 != null)
{
Variant value = val2.Value;
StringVariant val3 = (StringVariant)(object)((value is StringVariant) ? value : null);
if (val3 != null)
{
result = ((val3.Value == "speed_burst") ? 1 : 0);
goto IL_002c;
}
}
result = 0;
goto IL_002c;
IL_002c:
return (byte)result != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "boost_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
<newlineConsumer>5__6 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89));
<>s__7 = tokens.GetEnumerator();
<>1__state = -3;
goto IL_09c8;
case 1:
<>1__state = -3;
<newlineConsumer>5__6.Reset();
goto IL_0550;
case 2:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("catch_drink_timer");
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = new Token((TokenType)16, (uint?)null);
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<catchMatch>5__1.Reset();
<newlineConsumer>5__6.SetReady();
goto IL_09c0;
case 6:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("catch_drink_timer");
<>1__state = 7;
return true;
case 7:
<>1__state = -3;
<>2__current = new Token((TokenType)16, (uint?)null);
<>1__state = 8;
return true;
case 8:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
<>1__state = 9;
return true;
case 9:
<>1__state = -3;
<catchBigMatch>5__2.Reset();
<newlineConsumer>5__6.SetReady();
goto IL_09c0;
case 10:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("catch_drink_timer");
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = new Token((TokenType)16, (uint?)null);
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<catchDeluxeMatch>5__3.Reset();
<newlineConsumer>5__6.SetReady();
goto IL_09c0;
case 14:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("boost_timer");
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = new Token((TokenType)16, (uint?)null);
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
<>1__state = 17;
return true;
case 17:
<>1__state = -3;
<catchDeluxeMatch>5__3.Reset();
<newlineConsumer>5__6.SetReady();
goto IL_09c0;
case 18:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("boost_timer");
<>1__state = 19;
return true;
case 19:
<>1__state = -3;
<>2__current = new Token((TokenType)16, (uint?)null);
<>1__state = 20;
return true;
case 20:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(900L, false));
<>1__state = 21;
return true;
case 21:
<>1__state = -3;
<catchDeluxeMatch>5__3.Reset();
<newlineConsumer>5__6.SetReady();
goto IL_09c0;
case 22:
{
<>1__state = -3;
goto IL_09c0;
}
IL_09c0:
<token>5__8 = null;
goto IL_09c8;
IL_09c8:
do
{
if (((global::System.Collections.IEnumerator)<>s__7).MoveNext())
{
<token>5__8 = <>s__7.Current;
continue;
}
<>m__Finally1();
<>s__7 = null;
return false;
}
while (<newlineConsumer>5__6.Check(<token>5__8));
if (<newlineConsumer>5__6.Ready)
{
<>2__current = <token>5__8;
<>1__state = 1;
return true;
}
goto IL_0550;
IL_0550:
if (<catchMatch>5__1.Check(<token>5__8))
{
<>2__current = <token>5__8;
<>1__state = 2;
return true;
}
if (<catchBigMatch>5__2.Check(<token>5__8))
{
<>2__current = <token>5__8;
<>1__state = 6;
return true;
}
if (<catchDeluxeMatch>5__3.Check(<token>5__8))
{
<>2__current = <token>5__8;
<>1__state = 10;
return true;
}
if (<speedMatch>5__4.Check(<token>5__8))
{
<>2__current = <token>5__8;
<>1__state = 14;
return true;
}
if (<speedBurstMatch>5__5.Check(<token>5__8))
{
<>2__current = <token>5__8;
<>1__state = 18;
return true;
}
<>2__current = <token>5__8;
<>1__state = 22;
return true;
}
}
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 (<>s__7 != null)
{
((global::System.IDisposable)<>s__7).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)
{
<>4__this = <>4__this
};
}
<Modify>d__.path = <>3__path;
<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 catchMatch = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val14 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result5;
if (val14 != null)
{
Variant value5 = val14.Value;
StringVariant val15 = (StringVariant)(object)((value5 is StringVariant) ? value5 : null);
if (val15 != null)
{
result5 = ((val15.Value == "catch") ? 1 : 0);
goto IL_002c;
}
}
result5 = 0;
goto IL_002c;
IL_002c:
return (byte)result5 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val13 != null && val13.Name == "catch_drink_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter catchBigMatch = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val11 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result4;
if (val11 != null)
{
Variant value4 = val11.Value;
StringVariant val12 = (StringVariant)(object)((value4 is StringVariant) ? value4 : null);
if (val12 != null)
{
result4 = ((val12.Value == "catch_big") ? 1 : 0);
goto IL_002c;
}
}
result4 = 0;
goto IL_002c;
IL_002c:
return (byte)result4 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val10 != null && val10.Name == "catch_drink_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter catchDeluxeMatch = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val8 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result3;
if (val8 != null)
{
Variant value3 = val8.Value;
StringVariant val9 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null);
if (val9 != null)
{
result3 = ((val9.Value == "catch_deluxe") ? 1 : 0);
goto IL_002c;
}
}
result3 = 0;
goto IL_002c;
IL_002c:
return (byte)result3 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val7 != null && val7.Name == "catch_drink_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter speedMatch = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val5 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result2;
if (val5 != null)
{
Variant value2 = val5.Value;
StringVariant val6 = (StringVariant)(object)((value2 is StringVariant) ? value2 : null);
if (val6 != null)
{
result2 = ((val6.Value == "speed") ? 1 : 0);
goto IL_002c;
}
}
result2 = 0;
goto IL_002c;
IL_002c:
return (byte)result2 != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val4 != null && val4.Name == "boost_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter speedBurstMatch = new MultiTokenWaiter(new Func<Token, bool>[5]
{
delegate(Token t)
{
ConstantToken val2 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
int result;
if (val2 != null)
{
Variant value = val2.Value;
StringVariant val3 = (StringVariant)(object)((value is StringVariant) ? value : null);
if (val3 != null)
{
result = ((val3.Value == "speed_burst") ? 1 : 0);
goto IL_002c;
}
}
result = 0;
goto IL_002c;
IL_002c:
return (byte)result != 0;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "boost_timer";
},
(Token t) => (int)t.Type == 23
}, false, false);
TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89));
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token token = enumerator.Current;
if (!newlineConsumer.Check(token))
{
if (newlineConsumer.Ready)
{
yield return token;
newlineConsumer.Reset();
}
if (catchMatch.Check(token))
{
yield return token;
yield return (Token)new IdentifierToken("catch_drink_timer");
yield return new Token((TokenType)16, (uint?)null);
yield return (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
catchMatch.Reset();
newlineConsumer.SetReady();
}
else if (catchBigMatch.Check(token))
{
yield return token;
yield return (Token)new IdentifierToken("catch_drink_timer");
yield return new Token((TokenType)16, (uint?)null);
yield return (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
catchBigMatch.Reset();
newlineConsumer.SetReady();
}
else if (catchDeluxeMatch.Check(token))
{
yield return token;
yield return (Token)new IdentifierToken("catch_drink_timer");
yield return new Token((TokenType)16, (uint?)null);
yield return (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
catchDeluxeMatch.Reset();
newlineConsumer.SetReady();
}
else if (speedMatch.Check(token))
{
yield return token;
yield return (Token)new IdentifierToken("boost_timer");
yield return new Token((TokenType)16, (uint?)null);
yield return (Token)new ConstantToken((Variant)new IntVariant(18000L, false));
catchDeluxeMatch.Reset();
newlineConsumer.SetReady();
}
else if (speedBurstMatch.Check(token))
{
yield return token;
yield return (Token)new IdentifierToken("boost_timer");
yield return new Token((TokenType)16, (uint?)null);
yield return (Token)new ConstantToken((Variant)new IntVariant(900L, false));
catchDeluxeMatch.Reset();
newlineConsumer.SetReady();
}
else
{
yield return token;
}
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}