using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using GameData;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("SubwaySlammer")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SubwaySlammer")]
[assembly: AssemblyTitle("SubwaySlammer")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace Subway
{
[BepInPlugin("HatsuneFucker.SubwaySlammer.Chargers", "The Subway Charger", "0.9.0")]
public class Plugin : BasePlugin
{
public override void Load()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("HatsuneFucker.SubwaySlammer.Chargers");
val.PatchAll(typeof(SubwayChargers));
((BasePlugin)this).Log.LogInfo((object)"The Subway's Mine for the Slamming!");
}
}
internal static class SubwayChargers
{
internal const string SubwaySlammer = "Assets/Subway/Subway Slammer_CB.prefab";
internal const string SubwayBase = "Assets/Subway/SubwaySlammerBase.prefab";
[HarmonyPatch(typeof(GameDataInit), "Initialize")]
[HarmonyPostfix]
internal static void Chargers()
{
Il2CppStructArray<uint> allPersistentIDs = GameDataBlockBase<EnemyDataBlock>.GetAllPersistentIDs();
foreach (uint item in (Il2CppArrayBase<uint>)(object)allPersistentIDs)
{
if (((GameDataBlockBase<EnemyDataBlock>)(object)GameDataBlockBase<EnemyDataBlock>.GetBlock(item)).name == "Striker_Bullrush" && item == 30)
{
GameDataBlockBase<EnemyDataBlock>.GetBlock(item).BasePrefabs[1] = "Assets/Subway/SubwaySlammerBase.prefab";
GameDataBlockBase<EnemyDataBlock>.GetBlock(item).ModelDatas[0].ModelFile = "Assets/Subway/Subway Slammer_CB.prefab";
}
if (((GameDataBlockBase<EnemyDataBlock>)(object)GameDataBlockBase<EnemyDataBlock>.GetBlock(item)).name == "Brawler" && item == 24)
{
GameDataBlockBase<EnemyDataBlock>.GetBlock(item).BasePrefabs[1] = "Assets/Subway/SubwaySlammerBase.prefab";
GameDataBlockBase<EnemyDataBlock>.GetBlock(item).ModelDatas[0].ModelFile = "Assets/Subway/Subway Slammer_CB.prefab";
}
}
}
}
}