using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using CustomMapLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppRUMBLE.MoveSystem;
using MelonLoader;
using Microsoft.CodeAnalysis;
using ProBendingArena;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyDescription("please work")]
[assembly: AssemblyCopyright("Created by elmish")]
[assembly: AssemblyTrademark(null)]
[assembly: MelonInfo(typeof(ProBending), "Pro Bending Arena", "1.0.0", "elmish", null)]
[assembly: MelonGame(null, null)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("ProBendingArena")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ProBendingArena")]
[assembly: AssemblyTitle("ProBendingArena")]
[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 ProBendingArena
{
public static class BuildInfo
{
public const string Name = "Pro Bending Arena";
public const string Description = "please work";
public const string Author = "elmish";
public const string Company = null;
public const string Version = "1.0.0";
public const string DownloadLink = null;
}
public class ProBending : Map
{
private GameObject arena;
public override void OnLateInitializeMelon()
{
((Map)this).Initialize("Pro Bending Arena", "1.0.0", "elmish", (Map)(object)this);
}
public override void OnMapCreation()
{
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_016a: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
//IL_024b: Unknown result type (might be due to invalid IL or missing references)
//IL_0250: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Unknown result type (might be due to invalid IL or missing references)
//IL_025d: Unknown result type (might be due to invalid IL or missing references)
//IL_0264: Expected O, but got Unknown
//IL_0275: Unknown result type (might be due to invalid IL or missing references)
//IL_027a: Unknown result type (might be due to invalid IL or missing references)
//IL_028e: Unknown result type (might be due to invalid IL or missing references)
//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
//IL_030d: Unknown result type (might be due to invalid IL or missing references)
//IL_0329: Unknown result type (might be due to invalid IL or missing references)
//IL_032e: Unknown result type (might be due to invalid IL or missing references)
//IL_0342: Unknown result type (might be due to invalid IL or missing references)
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_0383: Unknown result type (might be due to invalid IL or missing references)
//IL_0388: Unknown result type (might be due to invalid IL or missing references)
//IL_039c: Unknown result type (might be due to invalid IL or missing references)
//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
//IL_040f: Unknown result type (might be due to invalid IL or missing references)
//IL_0419: Unknown result type (might be due to invalid IL or missing references)
Il2CppAssetBundle val = LoadBundle("ProBendingArena.Resources.probending");
arena = Object.Instantiate<GameObject>(val.LoadAsset<GameObject>("untitled124356"));
arena.transform.SetParent(base.mapParent.transform);
arena.transform.localScale = Vector3.one * 0.5f;
GetChildRecursive(arena);
GameObject val2 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(0f, -0.5f, 0f), Quaternion.identity, new Vector3(6.5f, 1f, 16.61f), (ObjectType)9, (PrimitivePhysicsMaterial)null);
GameObject val3 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(-2.5207f, -0.5f, 3.2537f), Quaternion.identity, new Vector3(5f, 1f, 8.9f), (ObjectType)9, (PrimitivePhysicsMaterial)null);
val3.transform.localRotation = Quaternion.Euler(0f, 21.1f, 0f);
GameObject val4 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(2.5229f, -0.5f, -3.2511f), Quaternion.identity, new Vector3(5f, 1f, 8.9f), (ObjectType)9, (PrimitivePhysicsMaterial)null);
val4.transform.localRotation = Quaternion.Euler(0f, 21.1f, 0f);
GameObject val5 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(-2.5215f, -0.5f, -3.252f), Quaternion.identity, new Vector3(5f, 1f, 8.9f), (ObjectType)9, (PrimitivePhysicsMaterial)null);
val5.transform.localRotation = Quaternion.Euler(0f, 338.9f, 0f);
GameObject val6 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(2.52f, -0.5f, 3.2551f), Quaternion.identity, new Vector3(5f, 1f, 8.9f), (ObjectType)9, (PrimitivePhysicsMaterial)null);
val6.transform.localRotation = Quaternion.Euler(0f, 338.9f, 0f);
((Renderer)val2.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val3.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val4.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val5.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val6.GetComponent<MeshRenderer>()).enabled = false;
PrimitivePhysicsMaterial val7 = new PrimitivePhysicsMaterial
{
Bounciness = 1000000f,
options = (Options)0
};
GameObject val8 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(4.75f, 0.25f, -4.15f), Quaternion.identity, new Vector3(0.2f, 0.5f, 9f), (ObjectType)1, val7);
val8.transform.localRotation = Quaternion.Euler(0f, 21f, 0f);
GameObject val9 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(4.75f, 0.25f, 4.15f), Quaternion.identity, new Vector3(0.2f, 0.5f, 9f), (ObjectType)1, val7);
val9.transform.localRotation = Quaternion.Euler(0f, -21f, 0f);
GameObject val10 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(-4.75f, 0.25f, -4.15f), Quaternion.identity, new Vector3(0.2f, 0.5f, 9f), (ObjectType)1, val7);
val10.transform.localRotation = Quaternion.Euler(0f, -21f, 0f);
GameObject val11 = ((Map)this).CreatePrimitiveObject((PrimitiveType)3, new Vector3(-4.75f, 0.25f, 4.15f), Quaternion.identity, new Vector3(0.2f, 0.5f, 9f), (ObjectType)1, val7);
val11.transform.localRotation = Quaternion.Euler(0f, 21f, 0f);
((Renderer)val8.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val9.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val10.GetComponent<MeshRenderer>()).enabled = false;
((Renderer)val11.GetComponent<MeshRenderer>()).enabled = false;
base.mapParent.transform.localScale = Vector3.one * 2f;
}
public Il2CppAssetBundle LoadBundle(string path)
{
using Stream stream = ((MelonBase)this).MelonAssembly.Assembly.GetManifestResourceStream(path);
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
return Il2CppAssetBundleManager.LoadFromMemory(Il2CppStructArray<byte>.op_Implicit(array));
}
public void GetChildRecursive(GameObject obj)
{
if (obj.transform.childCount > 0)
{
for (int i = 0; i < obj.transform.childCount; i++)
{
GetChildRecursive(((Component)obj.transform.GetChild(i)).gameObject);
}
}
MeshCollider collider = obj.AddComponent<MeshCollider>();
obj.AddComponent<GroundCollider>().collider = (Collider)(object)collider;
}
}
}