using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using HaroldHarryHarringtonTheFirst;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using MelonLoader;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(Core), "HaroldHarryHarringtonTheFirst", "1.2.0", "Orangenal", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("HaroldHarryHarringtonTheFirst")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HaroldHarryHarringtonTheFirst")]
[assembly: AssemblyTitle("HaroldHarryHarringtonTheFirst")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace HaroldHarryHarringtonTheFirst
{
public class Core : MelonMod
{
private Il2CppAssetBundle assetBundle;
private GameObject tophat;
private GameObject mustache;
private GameObject yardSign;
private GameObject LoadAsset(string item)
{
if (assetBundle == null)
{
MelonLogger.Msg("Loading fanciness...");
using Stream stream = ((MelonBase)this).MelonAssembly.Assembly.GetManifestResourceStream("HaroldHarryHarringtonTheFirst.Resources.harold");
if (stream == null)
{
MelonLogger.Error("Failed to find resource stream!");
return null;
}
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
assetBundle = Il2CppAssetBundleManager.LoadFromMemory(Il2CppStructArray<byte>.op_Implicit(array));
}
if (assetBundle == null)
{
MelonLogger.Error("AssetBundle failed to load.");
return null;
}
GameObject val = ((item == "tophat") ? assetBundle.LoadAsset<GameObject>("TopHat") : ((!(item == "the 'stache")) ? assetBundle.LoadAsset<GameObject>("harold's yard") : assetBundle.LoadAsset<GameObject>("mustache")));
if ((Object)(object)val == (Object)null)
{
MelonLogger.Error("Failed to load texture from AssetBundle!");
}
return val;
}
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_0156: 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_01c2: Unknown result type (might be due to invalid IL or missing references)
if (sceneName == "Gym")
{
if ((Object)(object)tophat == (Object)null)
{
tophat = LoadAsset("tophat");
Object.DontDestroyOnLoad((Object)(object)tophat);
}
if ((Object)(object)mustache == (Object)null)
{
mustache = LoadAsset("the 'stache");
Object.DontDestroyOnLoad((Object)(object)mustache);
}
if ((Object)(object)yardSign == (Object)null)
{
yardSign = LoadAsset("signy mcsignface");
Object.DontDestroyOnLoad((Object)(object)yardSign);
}
GameObject val = GameObject.Find("--------------LOGIC--------------/Heinhouser products/Howard root/DummyRoot/Howard/Armature/Stand/Base/Shaft/Torso/NeckBend/NeckTwist/NeckPivot/Head");
if ((Object)(object)val != (Object)null)
{
GameObject obj = Object.Instantiate<GameObject>(tophat, val.transform);
obj.transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
obj.transform.localPosition = new Vector3(0f, 0.2f, 0f);
GameObject obj2 = Object.Instantiate<GameObject>(mustache, val.transform);
obj2.transform.localScale = new Vector3(1.3f, 1.3f, 1.3f);
obj2.transform.localPosition = new Vector3(0f, 0.05f, 0.1f);
obj2.transform.localEulerAngles = new Vector3(0f, 90f, 0f);
GameObject val2 = GameObject.Find("--------------SCENE--------------/Dynemic/Signs/Area signs (2)/Howards yard");
GameObject val3 = GameObject.Find("--------------SCENE--------------/Dynemic/Signs/Area signs (2)/");
GameObject obj3 = Object.Instantiate<GameObject>(yardSign, val3.transform);
val2.active = false;
obj3.transform.localScale = new Vector3(0.7211f, 0.7211f, 1.0084f);
obj3.transform.localPosition = new Vector3(0.05f, 0.09f, 0.05f);
((Renderer)((Component)obj3.transform.GetChild(1)).gameObject.GetComponent<MeshRenderer>()).material = ((Renderer)val2.GetComponent<MeshRenderer>()).material;
}
}
}
}
}