using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("GravityChanger")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GravityChanger")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("729527f1-0a06-423b-97b8-704d7fcb90c9")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace JumpHeightChanger;
[BepInPlugin("com.AquaEther.JumpHeightChanger", "JumpHeightChanger", "1.0.1")]
public class JumpHeightChangerPlugin : BaseUnityPlugin
{
private const string MyGUID = "com.AquaEther.JumpHeightChanger";
private const string PluginName = "JumpHeightChanger";
private const string VersionString = "1.0.1";
public static ManualLogSource Log = new ManualLogSource("JumpHeightChanger");
public ConfigEntry<int> bodyMassConfig;
public Rigidbody body;
public GameObject player;
public void Awake()
{
bodyMassConfig = ((BaseUnityPlugin)this).Config.Bind<int>("General", "Player Mass", 100, "Put the mass lower to have more height");
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: JumpHeightChanger, VersionString: 1.0.1 is loaded.");
Log = ((BaseUnityPlugin)this).Logger;
SceneManager.sceneLoaded -= OnSceneLoaded;
SceneManager.sceneLoaded += OnSceneLoaded;
}
public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
if (!(((Scene)(ref scene)).name == "b3e7f2f8052488a45b35549efb98d902"))
{
player = GameObject.Find("Player");
body = player.GetComponent<Rigidbody>();
body.mass = bodyMassConfig.Value;
}
}
}