using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BoneLib;
using EdibleMelons;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSLZ.VRMK;
using MelonLoader;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "EdibleMelons", "1.0.0", "Goosek", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("EdibleMelons")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("EdibleMelons")]
[assembly: AssemblyTitle("EdibleMelons")]
[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 EdibleMelons
{
public class Core : MelonMod
{
private int buffsApplied = 0;
private int cd = 0;
private bool launched = false;
public override void OnInitializeMelon()
{
Hooking.OnLevelLoaded += LaunchedOn;
Hooking.OnLevelUnloaded += LaunchedOff;
}
private void LaunchedOn(LevelInfo info)
{
launched = true;
}
private void LaunchedOff()
{
launched = false;
}
public override void OnUpdate()
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0137: Unknown result type (might be due to invalid IL or missing references)
if (!launched)
{
return;
}
Collider[] array = Il2CppArrayBase<Collider>.op_Implicit((Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(Player.Head.position, 0.2f));
if (buffsApplied > 0)
{
cd++;
if (cd >= 1200)
{
cd = 0;
buffsApplied--;
Avatar avatar = Player.Avatar;
avatar._strengthUpper -= 10f;
Transform transform = ((Component)Player.Avatar).transform;
transform.localScale += new Vector3(0.1f, 0.1f, 0.1f);
}
}
Collider[] array2 = array;
foreach (Collider val in array2)
{
if (((Object)((Component)val).gameObject).name.StartsWith("Frag_Watermelon"))
{
((MelonBase)this).LoggerInstance.Msg("Ate a watermelon");
Player.PhysicsRig.headSfx.DoubleJump();
Transform transform2 = ((Component)Player.Avatar).transform;
transform2.localScale -= new Vector3(0.1f, 0.1f, 0.1f);
Avatar avatar2 = Player.Avatar;
avatar2._strengthUpper += 10f;
buffsApplied++;
Object.Destroy((Object)(object)((Component)val).gameObject);
}
}
}
}
}