using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using ChalkSave.Mods;
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("BarkOrMeow")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: AssemblyProduct("BarkOrMeow")]
[assembly: AssemblyTitle("BarkOrMeow")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace ChalkSave.Mods
{
public class InjectPlayer : 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 <barkFuncWaiter>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) <= 43u)
{
try
{
}
finally
{
<>m__Finally1();
}
}
}
private bool MoveNext()
{
//IL_0253: Unknown result type (might be due to invalid IL or missing references)
//IL_025d: Expected O, but got Unknown
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_0289: Expected O, but got Unknown
//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
//IL_02af: Expected O, but got Unknown
//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
//IL_02db: Expected O, but got Unknown
//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0301: Expected O, but got Unknown
//IL_0323: Unknown result type (might be due to invalid IL or missing references)
//IL_032d: Expected O, but got Unknown
//IL_0349: Unknown result type (might be due to invalid IL or missing references)
//IL_0353: Expected O, but got Unknown
//IL_034e: Unknown result type (might be due to invalid IL or missing references)
//IL_0358: 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_03d1: Unknown result type (might be due to invalid IL or missing references)
//IL_03db: Expected O, but got Unknown
//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0408: Expected O, but got Unknown
//IL_0425: Unknown result type (might be due to invalid IL or missing references)
//IL_042f: Expected O, but got Unknown
//IL_0452: Unknown result type (might be due to invalid IL or missing references)
//IL_045c: Expected O, but got Unknown
//IL_0479: Unknown result type (might be due to invalid IL or missing references)
//IL_0483: Expected O, but got Unknown
//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
//IL_04b0: Expected O, but got Unknown
//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
//IL_04d7: Expected O, but got Unknown
//IL_04f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0503: Expected O, but got Unknown
//IL_0520: Unknown result type (might be due to invalid IL or missing references)
//IL_052a: Expected O, but got Unknown
//IL_0525: Unknown result type (might be due to invalid IL or missing references)
//IL_052f: Expected O, but got Unknown
//IL_0552: Unknown result type (might be due to invalid IL or missing references)
//IL_055c: Expected O, but got Unknown
//IL_057c: Unknown result type (might be due to invalid IL or missing references)
//IL_0586: Expected O, but got Unknown
//IL_05a3: Unknown result type (might be due to invalid IL or missing references)
//IL_05ad: Expected O, but got Unknown
//IL_05d0: Unknown result type (might be due to invalid IL or missing references)
//IL_05da: Expected O, but got Unknown
//IL_05fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0607: Expected O, but got Unknown
//IL_0624: Unknown result type (might be due to invalid IL or missing references)
//IL_062e: Expected O, but got Unknown
//IL_0629: Unknown result type (might be due to invalid IL or missing references)
//IL_0633: Expected O, but got Unknown
//IL_0656: Unknown result type (might be due to invalid IL or missing references)
//IL_0660: Expected O, but got Unknown
//IL_067d: Unknown result type (might be due to invalid IL or missing references)
//IL_0687: Expected O, but got Unknown
//IL_0682: Unknown result type (might be due to invalid IL or missing references)
//IL_068c: Expected O, but got Unknown
//IL_06af: Unknown result type (might be due to invalid IL or missing references)
//IL_06b9: Expected O, but got Unknown
//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
//IL_06e0: Expected O, but got Unknown
//IL_06db: Unknown result type (might be due to invalid IL or missing references)
//IL_06e5: Expected O, but got Unknown
//IL_0708: Unknown result type (might be due to invalid IL or missing references)
//IL_0712: Expected O, but got Unknown
//IL_0732: Unknown result type (might be due to invalid IL or missing references)
//IL_073c: Expected O, but got Unknown
//IL_075f: Unknown result type (might be due to invalid IL or missing references)
//IL_0769: Expected O, but got Unknown
//IL_078c: Unknown result type (might be due to invalid IL or missing references)
//IL_0796: Expected O, but got Unknown
//IL_07b3: Unknown result type (might be due to invalid IL or missing references)
//IL_07bd: Expected O, but got Unknown
//IL_07e0: Unknown result type (might be due to invalid IL or missing references)
//IL_07ea: Expected O, but got Unknown
//IL_080d: Unknown result type (might be due to invalid IL or missing references)
//IL_0817: Expected O, but got Unknown
//IL_0834: Unknown result type (might be due to invalid IL or missing references)
//IL_083e: Expected O, but got Unknown
//IL_0839: Unknown result type (might be due to invalid IL or missing references)
//IL_0843: Expected O, but got Unknown
//IL_0866: Unknown result type (might be due to invalid IL or missing references)
//IL_0870: Expected O, but got Unknown
//IL_088d: Unknown result type (might be due to invalid IL or missing references)
//IL_0897: Expected O, but got Unknown
//IL_0892: Unknown result type (might be due to invalid IL or missing references)
//IL_089c: Expected O, but got Unknown
//IL_08bf: Unknown result type (might be due to invalid IL or missing references)
//IL_08c9: Expected O, but got Unknown
//IL_08e6: Unknown result type (might be due to invalid IL or missing references)
//IL_08f0: Expected O, but got Unknown
//IL_08eb: Unknown result type (might be due to invalid IL or missing references)
//IL_08f5: Expected O, but got Unknown
//IL_0918: Unknown result type (might be due to invalid IL or missing references)
//IL_0922: Expected O, but got Unknown
//IL_093f: Unknown result type (might be due to invalid IL or missing references)
//IL_0949: Expected O, but got Unknown
//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<barkFuncWaiter>5__2 = new MultiTokenWaiter(new Func<Token, bool>[8]
{
(Token t) => (int)t.Type == 76,
delegate(Token t)
{
IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val3 != null && val3.Name == "PlayerData";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "cosmetics_equipped";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "species";
},
(Token t) => (int)t.Type == 77,
(Token t) => (int)t.Type == 89
}, false, false);
<>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)38, (uint?)null);
<>1__state = 3;
return true;
case 3:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("Input");
<>1__state = 4;
return true;
case 4:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 5;
return true;
case 5:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("is_action_pressed");
<>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("secondary_action"));
<>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)86, (uint?)null);
<>1__state = 10;
return true;
case 10:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 11;
return true;
case 11:
<>1__state = -3;
<>2__current = new Token((TokenType)38, (uint?)null);
<>1__state = 12;
return true;
case 12:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("PlayerData");
<>1__state = 13;
return true;
case 13:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 14;
return true;
case 14:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("cosmetics_equipped");
<>1__state = 15;
return true;
case 15:
<>1__state = -3;
<>2__current = new Token((TokenType)84, (uint?)null);
<>1__state = 16;
return true;
case 16:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("species");
<>1__state = 17;
return true;
case 17:
<>1__state = -3;
<>2__current = new Token((TokenType)7, (uint?)null);
<>1__state = 18;
return true;
case 18:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("species_cat"));
<>1__state = 19;
return true;
case 19:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 20;
return true;
case 20:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)3u);
<>1__state = 21;
return true;
case 21:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("bark_id");
<>1__state = 22;
return true;
case 22:
<>1__state = -3;
<>2__current = new Token((TokenType)23, (uint?)null);
<>1__state = 23;
return true;
case 23:
<>1__state = -3;
<>2__current = new Token((TokenType)76, (uint?)null);
<>1__state = 24;
return true;
case 24:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("bark_dog"));
<>1__state = 25;
return true;
case 25:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 26;
return true;
case 26:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("growl_dog"));
<>1__state = 27;
return true;
case 27:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 28;
return true;
case 28:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("whine_dog"));
<>1__state = 29;
return true;
case 29:
<>1__state = -3;
<>2__current = new Token((TokenType)77, (uint?)null);
<>1__state = 30;
return true;
case 30:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)2u);
<>1__state = 31;
return true;
case 31:
<>1__state = -3;
<>2__current = new Token((TokenType)40, (uint?)null);
<>1__state = 32;
return true;
case 32:
<>1__state = -3;
<>2__current = new Token((TokenType)86, (uint?)null);
<>1__state = 33;
return true;
case 33:
<>1__state = -3;
<>2__current = (Token)new IdentifierToken("bark_id");
<>1__state = 34;
return true;
case 34:
<>1__state = -3;
<>2__current = new Token((TokenType)23, (uint?)null);
<>1__state = 35;
return true;
case 35:
<>1__state = -3;
<>2__current = new Token((TokenType)76, (uint?)null);
<>1__state = 36;
return true;
case 36:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("bark_cat"));
<>1__state = 37;
return true;
case 37:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 38;
return true;
case 38:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("growl_cat"));
<>1__state = 39;
return true;
case 39:
<>1__state = -3;
<>2__current = new Token((TokenType)82, (uint?)null);
<>1__state = 40;
return true;
case 40:
<>1__state = -3;
<>2__current = (Token)new ConstantToken((Variant)new StringVariant("whine_cat"));
<>1__state = 41;
return true;
case 41:
<>1__state = -3;
<>2__current = new Token((TokenType)77, (uint?)null);
<>1__state = 42;
return true;
case 42:
<>1__state = -3;
<>2__current = new Token((TokenType)89, (uint?)1u);
<>1__state = 43;
return true;
case 43:
<>1__state = -3;
break;
case 44:
<>1__state = -3;
break;
}
if (((global::System.Collections.IEnumerator)<>7__wrap2).MoveNext())
{
Token current = <>7__wrap2.Current;
if (<barkFuncWaiter>5__2.Check(current))
{
<>2__current = current;
<>1__state = 1;
return true;
}
<>2__current = current;
<>1__state = 44;
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 barkFuncWaiter = new MultiTokenWaiter(new Func<Token, bool>[8]
{
(Token t) => (int)t.Type == 76,
delegate(Token t)
{
IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val3 != null && val3.Name == "PlayerData";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val2 != null && val2.Name == "cosmetics_equipped";
},
(Token t) => (int)t.Type == 84,
delegate(Token t)
{
IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
return val != null && val.Name == "species";
},
(Token t) => (int)t.Type == 77,
(Token t) => (int)t.Type == 89
}, false, false);
global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
try
{
while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
{
Token current = enumerator.Current;
if (barkFuncWaiter.Check(current))
{
yield return current;
yield return new Token((TokenType)89, (uint?)1u);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("Input");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("is_action_pressed");
yield return new Token((TokenType)80, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("secondary_action"));
yield return new Token((TokenType)81, (uint?)null);
yield return new Token((TokenType)86, (uint?)null);
yield return new Token((TokenType)89, (uint?)2u);
yield return new Token((TokenType)38, (uint?)null);
yield return (Token)new IdentifierToken("PlayerData");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("cosmetics_equipped");
yield return new Token((TokenType)84, (uint?)null);
yield return (Token)new IdentifierToken("species");
yield return new Token((TokenType)7, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("species_cat"));
yield return new Token((TokenType)86, (uint?)null);
yield return new Token((TokenType)89, (uint?)3u);
yield return (Token)new IdentifierToken("bark_id");
yield return new Token((TokenType)23, (uint?)null);
yield return new Token((TokenType)76, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("bark_dog"));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("growl_dog"));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("whine_dog"));
yield return new Token((TokenType)77, (uint?)null);
yield return new Token((TokenType)89, (uint?)2u);
yield return new Token((TokenType)40, (uint?)null);
yield return new Token((TokenType)86, (uint?)null);
yield return (Token)new IdentifierToken("bark_id");
yield return new Token((TokenType)23, (uint?)null);
yield return new Token((TokenType)76, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("bark_cat"));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("growl_cat"));
yield return new Token((TokenType)82, (uint?)null);
yield return (Token)new ConstantToken((Variant)new StringVariant("whine_cat"));
yield return new Token((TokenType)77, (uint?)null);
yield return new Token((TokenType)89, (uint?)1u);
}
else
{
yield return current;
}
}
}
finally
{
((global::System.IDisposable)enumerator)?.Dispose();
}
}
}
}
namespace ChalkImageDraw
{
public class Mod : IMod, global::System.IDisposable
{
public Mod(IModInterface modInterface)
{
modInterface.Logger.Information("BarkOrMeow loaded!");
modInterface.RegisterScriptMod((IScriptMod)(object)new InjectPlayer());
}
public void Dispose()
{
}
}
}