using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text.Json.Serialization;
using GDWeave;
using GDWeave.Godot;
using GDWeave.Godot.Variants;
using GDWeave.Modding;
using WebfishingSampleMod;
using Xenon.Mods;
[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("Xenon")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0+71668a5fb0e350f07169dc0eaaae5bbd8a01da95")]
[assembly: AssemblyProduct("Xenon")]
[assembly: AssemblyTitle("Xenon")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Xenon.Mods
{
public class Player : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__4 : 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;
public Player <>4__this;
private MultiTokenWaiter <sprintMatch>5__2;
private MultiTokenWaiter <catchStructureMatch1>5__3;
private MultiTokenWaiter <catchStructureMatch2>5__4;
private MultiTokenWaiter <catchStructureMatch3>5__5;
private MultiTokenWaiter <baitWarnMatch>5__6;
private MultiTokenWaiter <gravityMatch>5__7;
private MultiTokenWaiter <validFishingSpotMatch>5__8;
private MultiTokenWaiter <diveDistanceMatch>5__9;
private MultiTokenWaiter <jumpHeightMatch>5__10;
private MultiTokenWaiter <speedMultMatch1>5__11;
private MultiTokenWaiter <speedMultMatch2>5__12;
private MultiTokenWaiter <speedMultMatch3>5__13;
private MultiTokenWaiter <scratchOffFuncMatch>5__14;
private MultiTokenWaiter <cameraZoomClampMatch>5__15;
private TokenConsumer <newlineConsumer>5__16;
private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap16;
private Token <token>5__18;
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__4(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) <= 43u)
{
try
{
}
finally
{
<>m__Finally1();
}
}
}
private bool MoveNext()
{
//IL_0aa5: Unknown result type (might be due to invalid IL or missing references)
//IL_0aaf: Expected O, but got Unknown
//IL_0aaa: Unknown result type (might be due to invalid IL or missing references)
//IL_0ab4: Expected O, but got Unknown
//IL_0b5c: Unknown result type (might be due to invalid IL or missing references)
//IL_0b66: Expected O, but got Unknown
//IL_0b61: Unknown result type (might be due to invalid IL or missing references)
//IL_0b6b: Expected O, but got Unknown
//IL_0cf4: Unknown result type (might be due to invalid IL or missing references)
//IL_0cfe: Expected O, but got Unknown
//IL_0d20: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2a: Expected O, but got Unknown
//IL_0d25: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2f: Expected O, but got Unknown
//IL_0d53: Unknown result type (might be due to invalid IL or missing references)
//IL_0d5d: Expected O, but got Unknown
//IL_0d7f: Unknown result type (might be due to invalid IL or missing references)
//IL_0d89: Expected O, but got Unknown
//IL_0d84: Unknown result type (might be due to invalid IL or missing references)
//IL_0d8e: Expected O, but got Unknown
//IL_0db2: Unknown result type (might be due to invalid IL or missing references)
//IL_0dbc: Expected O, but got Unknown
//IL_0dde: Unknown result type (might be due to invalid IL or missing references)
//IL_0de8: Expected O, but got Unknown
//IL_0de3: Unknown result type (might be due to invalid IL or missing references)
//IL_0ded: Expected O, but got Unknown
//IL_0e11: Unknown result type (might be due to invalid IL or missing references)
//IL_0e1b: Expected O, but got Unknown
//IL_0e3d: Unknown result type (might be due to invalid IL or missing references)
//IL_0e47: Expected O, but got Unknown
//IL_0e42: Unknown result type (might be due to invalid IL or missing references)
//IL_0e4c: Expected O, but got Unknown
//IL_0e70: Unknown result type (might be due to invalid IL or missing references)
//IL_0e7a: Expected O, but got Unknown
//IL_0e9c: Unknown result type (might be due to invalid IL or missing references)
//IL_0ea6: Expected O, but got Unknown
//IL_0ea1: Unknown result type (might be due to invalid IL or missing references)
//IL_0eab: Expected O, but got Unknown
//IL_0ecf: Unknown result type (might be due to invalid IL or missing references)
//IL_0ed9: Expected O, but got Unknown
//IL_0f47: Unknown result type (might be due to invalid IL or missing references)
//IL_0f51: Expected O, but got Unknown
//IL_0f4c: Unknown result type (might be due to invalid IL or missing references)
//IL_0f56: Expected O, but got Unknown
//IL_100d: Unknown result type (might be due to invalid IL or missing references)
//IL_1017: Expected O, but got Unknown
//IL_1012: Unknown result type (might be due to invalid IL or missing references)
//IL_101c: Expected O, but got Unknown
//IL_10d3: Unknown result type (might be due to invalid IL or missing references)
//IL_10dd: Expected O, but got Unknown
//IL_10d8: Unknown result type (might be due to invalid IL or missing references)
//IL_10e2: Expected O, but got Unknown
//IL_1199: Unknown result type (might be due to invalid IL or missing references)
//IL_11a3: Expected O, but got Unknown
//IL_119e: Unknown result type (might be due to invalid IL or missing references)
//IL_11a8: Expected O, but got Unknown
//IL_1269: Unknown result type (might be due to invalid IL or missing references)
//IL_1273: Expected O, but got Unknown
//IL_126e: Unknown result type (might be due to invalid IL or missing references)
//IL_1278: Expected O, but got Unknown
//IL_1337: Unknown result type (might be due to invalid IL or missing references)
//IL_1341: Expected O, but got Unknown
//IL_133c: Unknown result type (might be due to invalid IL or missing references)
//IL_1346: Expected O, but got Unknown
//IL_136a: Unknown result type (might be due to invalid IL or missing references)
//IL_1374: Expected O, but got Unknown
//IL_138f: Unknown result type (might be due to invalid IL or missing references)
//IL_1399: Expected O, but got Unknown
//IL_1394: Unknown result type (might be due to invalid IL or missing references)
//IL_139e: Expected O, but got Unknown
//IL_13c2: Unknown result type (might be due to invalid IL or missing references)
//IL_13cc: Expected O, but got Unknown
//IL_1446: Unknown result type (might be due to invalid IL or missing references)
//IL_1450: Expected O, but got Unknown
//IL_144b: Unknown result type (might be due to invalid IL or missing references)
//IL_1455: Expected O, but got Unknown
//IL_14eb: Unknown result type (might be due to invalid IL or missing references)
//IL_14f5: Expected O, but got Unknown
//IL_1519: Unknown result type (might be due to invalid IL or missing references)
//IL_1523: Expected O, but got Unknown
//IL_1548: Unknown result type (might be due to invalid IL or missing references)
//IL_1552: Expected O, but got Unknown
//IL_154d: Unknown result type (might be due to invalid IL or missing references)
//IL_1557: Expected O, but got Unknown
//IL_161b: Unknown result type (might be due to invalid IL or missing references)
//IL_1625: Expected O, but got Unknown
//IL_1620: Unknown result type (might be due to invalid IL or missing references)
//IL_162a: Expected O, but got Unknown
//IL_164e: Unknown result type (might be due to invalid IL or missing references)
//IL_1658: Expected O, but got Unknown
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_014f: Expected O, but got Unknown
//IL_0bca: Unknown result type (might be due to invalid IL or missing references)
//IL_0bd4: Expected O, but got Unknown
//IL_0bcf: Unknown result type (might be due to invalid IL or missing references)
//IL_0bd9: Expected O, but got Unknown
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Expected O, but got Unknown
//IL_0c5c: Unknown result type (might be due to invalid IL or missing references)
//IL_0c66: Expected O, but got Unknown
//IL_0c61: Unknown result type (might be due to invalid IL or missing references)
//IL_0c6b: Expected O, but got Unknown
//IL_0cc2: Unknown result type (might be due to invalid IL or missing references)
//IL_0ccc: Expected O, but got Unknown
//IL_0cc7: Unknown result type (might be due to invalid IL or missing references)
//IL_0cd1: Expected O, but got Unknown
//IL_0237: Unknown result type (might be due to invalid IL or missing references)
//IL_0241: 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_034b: Unknown result type (might be due to invalid IL or missing references)
//IL_0355: Expected O, but got Unknown
//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
//IL_03ce: Expected O, but got Unknown
//IL_043d: Unknown result type (might be due to invalid IL or missing references)
//IL_0447: Expected O, but got Unknown
//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
//IL_04c0: Expected O, but got Unknown
//IL_052f: Unknown result type (might be due to invalid IL or missing references)
//IL_0539: Expected O, but got Unknown
//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
//IL_05b2: Expected O, but got Unknown
//IL_0665: Unknown result type (might be due to invalid IL or missing references)
//IL_066f: Expected O, but got Unknown
//IL_0788: Unknown result type (might be due to invalid IL or missing references)
//IL_0792: Expected O, but got Unknown
//IL_0889: Unknown result type (might be due to invalid IL or missing references)
//IL_0893: Expected O, but got Unknown
//IL_09ac: Unknown result type (might be due to invalid IL or missing references)
//IL_09b6: Expected O, but got Unknown
//IL_09d6: Unknown result type (might be due to invalid IL or missing references)
//IL_09e0: Expected O, but got Unknown
try
{
int num = <>1__state;
Player player = <>4__this;
switch (num)
{
default:
return false;
case 0:
<>1__state = -1;
<sprintMatch>5__2 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val29 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val29 != null && val29.Name == "sprint_speed";
},
(Token t) => (int)t.Type == 23
}, false, false);
<catchStructureMatch1>5__3 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
delegate(Token t)
{
ConstantToken val27 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val27 != null)
{
Variant value7 = val27.Value;
StringVariant val28 = (StringVariant)(object)((value7 is StringVariant) ? value7 : null);
if (val28 != null)
{
return val28.Value == "catch";
}
}
return false;
},
(Token t) => (int)t.Type == 86,
delegate(Token t)
{
ConstantToken val25 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val25 != null)
{
Variant value6 = val25.Value;
RealVariant val26 = (RealVariant)(object)((value6 is RealVariant) ? value6 : null);
if (val26 != null)
{
return val26.Value == 0.0;
}
}
return false;
}
}, false, false);
<catchStructureMatch2>5__4 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
delegate(Token t)
{
ConstantToken val23 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val23 != null)
{
Variant value5 = val23.Value;
StringVariant val24 = (StringVariant)(object)((value5 is StringVariant) ? value5 : null);
if (val24 != null)
{
return val24.Value == "max_tier";
}
}
return false;
},
(Token t) => (int)t.Type == 86,
delegate(Token t)
{
ConstantToken val21 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val21 != null)
{
Variant value4 = val21.Value;
IntVariant val22 = (IntVariant)(object)((value4 is IntVariant) ? value4 : null);
if (val22 != null)
{
return val22.Value == 0;
}
}
return false;
}
}, false, false);
<catchStructureMatch3>5__5 = new MultiTokenWaiter(new Func<Token, bool>[4]
{
delegate(Token t)
{
ConstantToken val19 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val19 != null)
{
Variant value3 = val19.Value;
StringVariant val20 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null);
if (val20 != null)
{
return val20.Value == "quality";
}
}
return false;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 76,
(Token t) => (int)t.Type == 77
}, false, false);
<baitWarnMatch>5__6 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val18 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val18 != null && val18.Name == "bait_warn";
},
(Token t) => (int)t.Type == 23
}, false, false);
<gravityMatch>5__7 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 58,
delegate(Token t)
{
IdentifierToken val17 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val17 != null && val17.Name == "GRAVITY";
},
(Token t) => (int)t.Type == 23
}, false, false);
<validFishingSpotMatch>5__8 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val16 != null && val16.Name == "is_valid_fishing_spot";
},
(Token t) => (int)t.Type == 23
}, false, false);
<diveDistanceMatch>5__9 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val15 != null && val15.Name == "dive_distance";
},
(Token t) => (int)t.Type == 23
}, false, false);
<jumpHeightMatch>5__10 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val14 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val14 != null && val14.Name == "jump_height";
},
(Token t) => (int)t.Type == 23
}, false, false);
<speedMultMatch1>5__11 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val13 != null && val13.Name == "speed_mult";
},
(Token t) => (int)t.Type == 23
}, false, false);
<speedMultMatch2>5__12 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
(Token t) => (int)t.Type == 38,
delegate(Token t)
{
IdentifierToken val12 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val12 != null && val12.Name == "diving";
},
(Token t) => (int)t.Type == 86,
delegate(Token t)
{
IdentifierToken val11 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val11 != null && val11.Name == "speed_mult";
},
(Token t) => (int)t.Type == 23
}, false, false);
<speedMultMatch3>5__13 = new MultiTokenWaiter(new Func<Token, bool>[8]
{
delegate(Token t)
{
IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val10 != null && val10.Name == "gravity_vec";
},
(Token t) => (int)t.Type == 24,
(Token t) => (int)t.Type == 4,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
ConstantToken val8 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val8 != null)
{
Variant value2 = val8.Value;
IntVariant val9 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null);
if (val9 != null)
{
return val9.Value == 0;
}
}
return false;
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val7 != null && val7.Name == "jump_height";
},
(Token t) => (int)t.Type == 18
}, false, false);
<scratchOffFuncMatch>5__14 = new MultiTokenWaiter(new Func<Token, bool>[7]
{
(Token t) => (int)t.Type == 48,
delegate(Token t)
{
IdentifierToken val6 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val6 != null && val6.Name == "_scratch_off";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val5 != null && val5.Name == "type";
},
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89
}, false, false);
<cameraZoomClampMatch>5__15 = new MultiTokenWaiter(new Func<Token, bool>[8]
{
delegate(Token t)
{
IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val4 != null && val4.Name == "camera_zoom";
},
(Token t) => (int)t.Type == 23,
(Token t) => (int)t.Type == 5,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val3 != null && val3.Name == "camera_zoom";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val != null)
{
Variant value = val.Value;
RealVariant val2 = (RealVariant)(object)((value is RealVariant) ? value : null);
if (val2 != null)
{
return val2.Value == 0.0;
}
}
return false;
},
(Token t) => (int)t.Type == 82
}, false, false);
<newlineConsumer>5__16 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89));
<>7__wrap16 = tokens.GetEnumerator();
<>1__state = -3;
goto IL_16c3;
case 1:
<>1__state = -3;
<newlineConsumer>5__16.Reset();
goto IL_0a5f;
case 2:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerSprintSpeed, false));
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Changed sprint speed to {player.Config.PlayerSprintSpeed}");
<sprintMatch>5__2.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 4:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(3L, false));
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<baitWarnMatch>5__6.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 6:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Made it possible to catch with no bait (TOKEN): {<token>5__18}");
<catchStructureMatch1>5__3.Reset();
goto IL_16bc;
case 7:
<>1__state = -3;
<catchStructureMatch2>5__4.Reset();
goto IL_16bc;
case 8:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 9;
return true;
case 9:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
<>1__state = 10;
return true;
case 10:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
<>1__state = 14;
return true;
case 14:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 17;
return true;
case 17:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
<>1__state = 18;
return true;
case 18:
<>1__state = -3;
<>2__current = new Token((TokenType)77, (uint?)null);
<>1__state = 19;
return true;
case 19:
<>1__state = -3;
<catchStructureMatch3>5__5.Reset();
goto IL_16bc;
case 20:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerGravity, false));
<>1__state = 21;
return true;
case 21:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Changed gravity to {player.Config.PlayerGravity}");
<gravityMatch>5__7.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 22:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerDiveDistance, false));
<>1__state = 23;
return true;
case 23:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Changed dive distance to {player.Config.PlayerDiveDistance}");
<diveDistanceMatch>5__9.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 24:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerJumpHeight, false));
<>1__state = 25;
return true;
case 25:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Changed jump height to {player.Config.PlayerJumpHeight}");
<jumpHeightMatch>5__10.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 26:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerSpeedMult, false));
<>1__state = 27;
return true;
case 27:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Changed speed multiplier to {player.Config.PlayerSpeedMult}");
<speedMultMatch1>5__11.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 28:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.PlayerSpeedMult + 0.15, false));
<>1__state = 29;
return true;
case 29:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Changed speed multiplier for diving to {(double)player.Config.PlayerSpeedMult + 0.15}");
<speedMultMatch2>5__12.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 30:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
<>1__state = 31;
return true;
case 31:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 32;
return true;
case 32:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(0L, false));
<>1__state = 33;
return true;
case 33:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 34;
return true;
case 34:
<>1__state = -3;
<speedMultMatch3>5__13.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 35:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(true));
<>1__state = 36;
return true;
case 36:
<>1__state = -3;
player.modInterface.Logger.Information("[XENON]: Enabled fishing anywhere.");
<validFishingSpotMatch>5__8.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 37:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("player_scale");
<>1__state = 38;
return true;
case 38:
<>1__state = -3;
<>2__current = new Token((TokenType)24, (uint?)null);
<>1__state = 39;
return true;
case 39:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant((double)player.Config.GrowOnGambleAmount, false));
<>1__state = 40;
return true;
case 40:
<>1__state = -3;
player.modInterface.Logger.Information($"[XENON]: Enabled grow on gamble and set growth to {player.Config.GrowOnGambleAmount}");
<scratchOffFuncMatch>5__14.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 41:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(999999999.0, false));
<>1__state = 42;
return true;
case 42:
<>1__state = -3;
<>2__current = new Token((TokenType)81, (uint?)null);
<>1__state = 43;
return true;
case 43:
<>1__state = -3;
player.modInterface.Logger.Information("[XENON]: Uncapped zoom");
<cameraZoomClampMatch>5__15.Reset();
<newlineConsumer>5__16.SetReady();
goto IL_16bc;
case 44:
{
<>1__state = -3;
goto IL_16bc;
}
IL_16bc:
<token>5__18 = null;
goto IL_16c3;
IL_16c3:
do
{
if (((global::System.Collections.IEnumerator)<>7__wrap16).MoveNext())
{
<token>5__18 = <>7__wrap16.Current;
continue;
}
<>m__Finally1();
<>7__wrap16 = null;
return false;
}
while (<newlineConsumer>5__16.Check(<token>5__18));
if (<newlineConsumer>5__16.Ready)
{
<>2__current = <token>5__18;
<>1__state = 1;
return true;
}
goto IL_0a5f;
IL_0a5f:
if (<sprintMatch>5__2.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 2;
return true;
}
if (<baitWarnMatch>5__6.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 4;
return true;
}
if (<catchStructureMatch1>5__3.Check(<token>5__18) && player.Config.AllowFishingWithNoBait)
{
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
<>1__state = 6;
return true;
}
if (<catchStructureMatch2>5__4.Check(<token>5__18) && player.Config.NoBaitOP)
{
<>2__current = (Token)new ConstantToken((Variant)new IntVariant(4L, false));
<>1__state = 7;
return true;
}
if (<catchStructureMatch3>5__5.Check(<token>5__18) && player.Config.NoBaitOP)
{
<>2__current = (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
<>1__state = 8;
return true;
}
if (<gravityMatch>5__7.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 20;
return true;
}
if (<diveDistanceMatch>5__9.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 22;
return true;
}
if (<jumpHeightMatch>5__10.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 24;
return true;
}
if (<speedMultMatch1>5__11.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 26;
return true;
}
if (<speedMultMatch2>5__12.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 28;
return true;
}
if (<speedMultMatch3>5__13.Check(<token>5__18))
{
<>2__current = <token>5__18;
<>1__state = 30;
return true;
}
if (<validFishingSpotMatch>5__8.Check(<token>5__18) && player.Config.FishAnywhere)
{
<>2__current = <token>5__18;
<>1__state = 35;
return true;
}
if (<scratchOffFuncMatch>5__14.Check(<token>5__18) && player.Config.GrowOnGamble)
{
<>2__current = <token>5__18;
<>1__state = 37;
return true;
}
if (<cameraZoomClampMatch>5__15.Check(<token>5__18) && player.Config.UncapZoom)
{
<>2__current = <token>5__18;
<>1__state = 41;
return true;
}
<>2__current = <token>5__18;
<>1__state = 44;
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 (<>7__wrap16 != null)
{
((global::System.IDisposable)<>7__wrap16).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__4 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__4(0)
{
<>4__this = <>4__this
};
}
<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();
}
}
private Config Config;
private IModInterface modInterface;
public Player(IModInterface modInterface)
{
modInterface.Logger.Information("[XENON]: Loading modifications for Scenes/Entities/Player/player.gdc");
Config = modInterface.ReadConfig<Config>();
this.modInterface = modInterface;
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/Entities/Player/player.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__4))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
MultiTokenWaiter sprintMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val29 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val29 != null && val29.Name == "sprint_speed";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter catchStructureMatch1 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
delegate(Token t)
{
ConstantToken val27 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val27 != null)
{
Variant value7 = val27.Value;
StringVariant val28 = (StringVariant)(object)((value7 is StringVariant) ? value7 : null);
if (val28 != null)
{
return val28.Value == "catch";
}
}
return false;
},
(Token t) => (int)t.Type == 86,
delegate(Token t)
{
ConstantToken val25 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val25 != null)
{
Variant value6 = val25.Value;
RealVariant val26 = (RealVariant)(object)((value6 is RealVariant) ? value6 : null);
if (val26 != null)
{
return val26.Value == 0.0;
}
}
return false;
}
}, false, false);
MultiTokenWaiter catchStructureMatch2 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
delegate(Token t)
{
ConstantToken val23 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val23 != null)
{
Variant value5 = val23.Value;
StringVariant val24 = (StringVariant)(object)((value5 is StringVariant) ? value5 : null);
if (val24 != null)
{
return val24.Value == "max_tier";
}
}
return false;
},
(Token t) => (int)t.Type == 86,
delegate(Token t)
{
ConstantToken val21 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val21 != null)
{
Variant value4 = val21.Value;
IntVariant val22 = (IntVariant)(object)((value4 is IntVariant) ? value4 : null);
if (val22 != null)
{
return val22.Value == 0;
}
}
return false;
}
}, false, false);
MultiTokenWaiter catchStructureMatch3 = new MultiTokenWaiter(new Func<Token, bool>[4]
{
delegate(Token t)
{
ConstantToken val19 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val19 != null)
{
Variant value3 = val19.Value;
StringVariant val20 = (StringVariant)(object)((value3 is StringVariant) ? value3 : null);
if (val20 != null)
{
return val20.Value == "quality";
}
}
return false;
},
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 76,
(Token t) => (int)t.Type == 77
}, false, false);
MultiTokenWaiter baitWarnMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val18 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val18 != null && val18.Name == "bait_warn";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter gravityMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 58,
delegate(Token t)
{
IdentifierToken val17 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val17 != null && val17.Name == "GRAVITY";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter validFishingSpotMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val16 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val16 != null && val16.Name == "is_valid_fishing_spot";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter diveDistanceMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val15 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val15 != null && val15.Name == "dive_distance";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter jumpHeightMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val14 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val14 != null && val14.Name == "jump_height";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter speedMultMatch1 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
(Token t) => (int)t.Type == 59,
delegate(Token t)
{
IdentifierToken val13 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val13 != null && val13.Name == "speed_mult";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter speedMultMatch2 = new MultiTokenWaiter(new Func<Token, bool>[5]
{
(Token t) => (int)t.Type == 38,
delegate(Token t)
{
IdentifierToken val12 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val12 != null && val12.Name == "diving";
},
(Token t) => (int)t.Type == 86,
delegate(Token t)
{
IdentifierToken val11 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val11 != null && val11.Name == "speed_mult";
},
(Token t) => (int)t.Type == 23
}, false, false);
MultiTokenWaiter speedMultMatch3 = new MultiTokenWaiter(new Func<Token, bool>[8]
{
delegate(Token t)
{
IdentifierToken val10 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val10 != null && val10.Name == "gravity_vec";
},
(Token t) => (int)t.Type == 24,
(Token t) => (int)t.Type == 4,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
ConstantToken val8 = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val8 != null)
{
Variant value2 = val8.Value;
IntVariant val9 = (IntVariant)(object)((value2 is IntVariant) ? value2 : null);
if (val9 != null)
{
return val9.Value == 0;
}
}
return false;
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
IdentifierToken val7 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val7 != null && val7.Name == "jump_height";
},
(Token t) => (int)t.Type == 18
}, false, false);
MultiTokenWaiter scratchOffFuncMatch = new MultiTokenWaiter(new Func<Token, bool>[7]
{
(Token t) => (int)t.Type == 48,
delegate(Token t)
{
IdentifierToken val6 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val6 != null && val6.Name == "_scratch_off";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val5 != null && val5.Name == "type";
},
(Token t) => (int)t.Type == 81,
(Token t) => (int)t.Type == 86,
(Token t) => (int)t.Type == 89
}, false, false);
MultiTokenWaiter cameraZoomClampMatch = new MultiTokenWaiter(new Func<Token, bool>[8]
{
delegate(Token t)
{
IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val4 != null && val4.Name == "camera_zoom";
},
(Token t) => (int)t.Type == 23,
(Token t) => (int)t.Type == 5,
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val3 != null && val3.Name == "camera_zoom";
},
(Token t) => (int)t.Type == 82,
delegate(Token t)
{
ConstantToken val = (ConstantToken)(object)((t is ConstantToken) ? t : null);
if (val != null)
{
Variant value = val.Value;
RealVariant val2 = (RealVariant)(object)((value is RealVariant) ? value : null);
if (val2 != null)
{
return val2.Value == 0.0;
}
}
return false;
},
(Token t) => (int)t.Type == 82
}, 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 (sprintMatch.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerSprintSpeed, false));
modInterface.Logger.Information($"[XENON]: Changed sprint speed to {Config.PlayerSprintSpeed}");
sprintMatch.Reset();
newlineConsumer.SetReady();
}
else if (baitWarnMatch.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new IntVariant(3L, false));
baitWarnMatch.Reset();
newlineConsumer.SetReady();
}
else if (catchStructureMatch1.Check(token) && Config.AllowFishingWithNoBait)
{
yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
modInterface.Logger.Information($"[XENON]: Made it possible to catch with no bait (TOKEN): {token}");
catchStructureMatch1.Reset();
}
else if (catchStructureMatch2.Check(token) && Config.NoBaitOP)
{
yield return (Token)new ConstantToken((Variant)new IntVariant(4L, false));
catchStructureMatch2.Reset();
}
else if (catchStructureMatch3.Check(token) && Config.NoBaitOP)
{
yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(0.01, false));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
yield return new Token((TokenType)77, (uint?)null);
catchStructureMatch3.Reset();
}
else if (gravityMatch.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerGravity, false));
modInterface.Logger.Information($"[XENON]: Changed gravity to {Config.PlayerGravity}");
gravityMatch.Reset();
newlineConsumer.SetReady();
}
else if (diveDistanceMatch.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerDiveDistance, false));
modInterface.Logger.Information($"[XENON]: Changed dive distance to {Config.PlayerDiveDistance}");
diveDistanceMatch.Reset();
newlineConsumer.SetReady();
}
else if (jumpHeightMatch.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerJumpHeight, false));
modInterface.Logger.Information($"[XENON]: Changed jump height to {Config.PlayerJumpHeight}");
jumpHeightMatch.Reset();
newlineConsumer.SetReady();
}
else if (speedMultMatch1.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerSpeedMult, false));
modInterface.Logger.Information($"[XENON]: Changed speed multiplier to {Config.PlayerSpeedMult}");
speedMultMatch1.Reset();
newlineConsumer.SetReady();
}
else if (speedMultMatch2.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.PlayerSpeedMult + 0.15, false));
modInterface.Logger.Information($"[XENON]: Changed speed multiplier for diving to {(double)Config.PlayerSpeedMult + 0.15}");
speedMultMatch2.Reset();
newlineConsumer.SetReady();
}
else if (speedMultMatch3.Check(token))
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant(1.0, false));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new IntVariant(0L, false));
yield return new Token((TokenType)81, (uint?)null);
speedMultMatch3.Reset();
newlineConsumer.SetReady();
}
else if (validFishingSpotMatch.Check(token) && Config.FishAnywhere)
{
yield return token;
yield return (Token)new ConstantToken((Variant)new BoolVariant(true));
modInterface.Logger.Information("[XENON]: Enabled fishing anywhere.");
validFishingSpotMatch.Reset();
newlineConsumer.SetReady();
}
else if (scratchOffFuncMatch.Check(token) && Config.GrowOnGamble)
{
yield return token;
yield return (Token)new IdentifierToken("player_scale");
yield return new Token((TokenType)24, (uint?)null);
yield return (Token)new ConstantToken((Variant)new RealVariant((double)Config.GrowOnGambleAmount, false));
modInterface.Logger.Information($"[XENON]: Enabled grow on gamble and set growth to {Config.GrowOnGambleAmount}");
scratchOffFuncMatch.Reset();
newlineConsumer.SetReady();
}
else if (cameraZoomClampMatch.Check(token) && Config.UncapZoom)
{
yield return token;
yield return (Token)new ConstantToken((Variant)new RealVariant(999999999.0, false));
yield return new Token((TokenType)81, (uint?)null);
modInterface.Logger.Information("[XENON]: Uncapped zoom");
cameraZoomClampMatch.Reset();
newlineConsumer.SetReady();
}
else
{
yield return token;
}
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
public class PlayerData : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__4 : 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 TokenConsumer <newlineConsumer>5__2;
private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap2;
private Token <token>5__4;
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__4(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) <= 1u)
{
try
{
}
finally
{
<>m__Finally1();
}
}
}
private bool MoveNext()
{
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<newlineConsumer>5__2 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89));
<>7__wrap2 = tokens.GetEnumerator();
<>1__state = -3;
goto IL_00f0;
case 1:
<>1__state = -3;
<newlineConsumer>5__2.Reset();
break;
case 2:
{
<>1__state = -3;
<token>5__4 = null;
goto IL_00f0;
}
IL_00f0:
do
{
if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext())
{
<token>5__4 = <>7__wrap2.Current;
continue;
}
<>m__Finally1();
<>7__wrap2 = null;
return false;
}
while (<newlineConsumer>5__2.Check(<token>5__4));
if (<newlineConsumer>5__2.Ready)
{
<>2__current = <token>5__4;
<>1__state = 1;
return true;
}
break;
}
<>2__current = <token>5__4;
<>1__state = 2;
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 (<>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__4 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__4(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();
}
}
private Config Config;
private IModInterface modInterface;
public PlayerData(IModInterface modInterface)
{
modInterface.Logger.Information("[XENON]: Loading modifications for Scenes/Singletons/playerdata.gdc");
Config = modInterface.ReadConfig<Config>();
this.modInterface = modInterface;
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/Singletons/playerdata.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__4))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
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();
}
yield return token;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
public class ScratchSpots : IScriptMod
{
[CompilerGenerated]
private sealed class <Modify>d__4 : 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;
public ScratchSpots <>4__this;
private TokenConsumer <newlineConsumer>5__2;
private MultiTokenWaiter <prizeAmountMatch>5__3;
private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap3;
private Token <token>5__5;
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__4(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) <= 2u)
{
try
{
}
finally
{
<>m__Finally1();
}
}
}
private bool MoveNext()
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Expected O, but got Unknown
try
{
int num = <>1__state;
ScratchSpots scratchSpots = <>4__this;
switch (num)
{
default:
return false;
case 0:
<>1__state = -1;
<newlineConsumer>5__2 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89));
<prizeAmountMatch>5__3 = new MultiTokenWaiter(new Func<Token, bool>[3]
{
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "_set_price";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "prize_amt";
}
}, false, false);
<>7__wrap3 = tokens.GetEnumerator();
<>1__state = -3;
goto IL_01dd;
case 1:
<>1__state = -3;
<newlineConsumer>5__2.Reset();
break;
case 2:
<>1__state = -3;
scratchSpots.modInterface.Logger.Information($"[XENON]: Changed gambling prizes. {<token>5__5}");
<prizeAmountMatch>5__3.Reset();
goto IL_01d6;
case 3:
{
<>1__state = -3;
goto IL_01d6;
}
IL_01d6:
<token>5__5 = null;
goto IL_01dd;
IL_01dd:
do
{
if (((global::System.Collections.IEnumerator)<>7__wrap3).MoveNext())
{
<token>5__5 = <>7__wrap3.Current;
continue;
}
<>m__Finally1();
<>7__wrap3 = null;
return false;
}
while (<newlineConsumer>5__2.Check(<token>5__5));
if (<newlineConsumer>5__2.Ready)
{
<>2__current = <token>5__5;
<>1__state = 1;
return true;
}
break;
}
if (<prizeAmountMatch>5__3.Check(<token>5__5))
{
}
<>2__current = <token>5__5;
<>1__state = 3;
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 (<>7__wrap3 != null)
{
((global::System.IDisposable)<>7__wrap3).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__4 <Modify>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Modify>d__ = this;
}
else
{
<Modify>d__ = new <Modify>d__4(0)
{
<>4__this = <>4__this
};
}
<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();
}
}
private Config Config;
private IModInterface modInterface;
public ScratchSpots(IModInterface modInterface)
{
modInterface.Logger.Information("[XENON]: Loading modifications for Scenes/Minigames/ScratchTicket/scratch_spots.gdc");
Config = modInterface.ReadConfig<Config>();
this.modInterface = modInterface;
}
public bool ShouldRun(string path)
{
return path == "res://Scenes/Minigames/ScratchTicket/scratch_spots.gdc";
}
[IteratorStateMachine(typeof(<Modify>d__4))]
public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
{
TokenConsumer newlineConsumer = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 89));
MultiTokenWaiter prizeAmountMatch = new MultiTokenWaiter(new Func<Token, bool>[3]
{
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "_set_price";
},
(Token t) => (int)t.Type == 80,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "prize_amt";
}
}, false, false);
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 (prizeAmountMatch.Check(token))
{
}
yield return token;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
}
namespace WebfishingSampleMod
{
public class Config
{
[JsonInclude]
public bool GrowOnGamble;
[JsonInclude]
public float GrowOnGambleAmount = 2f;
[JsonInclude]
public float PlayerSprintSpeed = 6.88f;
[JsonInclude]
public float PlayerDiveDistance = 15f;
[JsonInclude]
public float PlayerJumpHeight = 7.5f;
[JsonInclude]
public float PlayerSpeedMult = 1.35f;
[JsonInclude]
public float PlayerGravity = 32f;
[JsonInclude]
public bool UncapZoom;
[JsonInclude]
public bool AllowFishingWithNoBait;
[JsonInclude]
public bool NoBaitOP;
[JsonInclude]
public bool FishAnywhere;
}
public class Mod : IMod, global::System.IDisposable
{
public Config Config;
public Mod(IModInterface modInterface)
{
Config = modInterface.ReadConfig<Config>();
modInterface.RegisterScriptMod((IScriptMod)(object)new Player(modInterface));
modInterface.RegisterScriptMod((IScriptMod)(object)new PlayerData(modInterface));
modInterface.RegisterScriptMod((IScriptMod)(object)new ScratchSpots(modInterface));
modInterface.Logger.Information("[XENON]: Loaded successfully!");
}
public void Dispose()
{
}
}
}