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 BepInEx;
using HarmonyLib;
using Lilly_s_Beyond_Limits;
using MelonLoader;
using Microsoft.CodeAnalysis;
using Mirror;
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(MelonLoad), "Lilly's Beyond Limits", "1.0.0", "Lilly", null)]
[assembly: MelonGame("KisSoft", "ATLYSS")]
[assembly: MelonOptionalDependencies(new string[] { "BepInEx" })]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Lilly_s_Beyond_Limits")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+59da1c375941ebd2733d1085cf54abfefc19da1d")]
[assembly: AssemblyProduct("Lilly_s_Beyond_Limits")]
[assembly: AssemblyTitle("Lilly_s_Beyond_Limits")]
[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 Lilly_s_Beyond_Limits
{
[BepInPlugin("0a26c5bd-f173-47f8-8f50-006dd6806ce6", "Lilly's Beyond Limits", "1.0.0.0")]
public class Bepin : BaseUnityPlugin
{
private BeyondCore beyondcore;
private void Awake()
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
if (!((Object)(object)BeyondCore.Beyondinstance != (Object)null))
{
GameObject val = Object.Instantiate<GameObject>(GameObject.CreatePrimitive((PrimitiveType)3));
((Object)val).hideFlags = (HideFlags)61;
beyondcore = val.AddComponent<BeyondCore>();
Harmony val2 = new Harmony("Lilly's Beyond Limits");
val2.PatchAll();
}
}
}
public class BeyondCore : MonoBehaviour
{
[HarmonyPatch(typeof(ChatBehaviour), "Cmd_SendChatMessage")]
public static class chatCommands
{
[HarmonyPrefix]
private static bool Prefix(ref ChatBehaviour __instance, ref string _message)
{
try
{
string text = _message.ToLower();
string[] array = text.Split(" ");
if (text.StartsWith("/size"))
{
if (Beyondinstance.scalePlayer(array))
{
__instance.New_ChatMessage("Size Changed");
}
else
{
__instance.New_ChatMessage("Size Change Failed");
}
return false;
}
if (text.StartsWith("/slider"))
{
if (Beyondinstance.setSliderLimit(array))
{
__instance.New_ChatMessage("Slider Size Changed");
}
else
{
__instance.New_ChatMessage("Slider Size Change Failed");
}
return false;
}
}
catch (Exception)
{
return false;
}
return true;
}
}
[HarmonyPatch(typeof(Player), "Handle_ServerConditions")]
public static class fixPlayer
{
[HarmonyPostfix]
public static void Postfix(ref Player __instance)
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Invalid comparison between Unknown and I4
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Invalid comparison between Unknown and I4
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: 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)
try
{
if (!Beyondinstance.fix && (int)__instance.Network_currentPlayerCondition == 2 && ((NetworkBehaviour)__instance).isLocalPlayer && (int)__instance.Network_currentPlayerCondition == 2 && ((NetworkBehaviour)__instance).isLocalPlayer)
{
PlayerAppearanceStruct playerAppearanceStruct = Beyondinstance.playerVis._playerAppearanceStruct;
PlayerAppearance_Profile profile = Beyondinstance.profile;
playerAppearanceStruct._boobWeight = profile._boobWeight;
playerAppearanceStruct._headWidth = profile._headWidth;
playerAppearanceStruct._bottomWeight = profile._bottomWeight;
playerAppearanceStruct._heightWeight = profile._heightWeight;
playerAppearanceStruct._widthWeight = profile._widthWeight;
playerAppearanceStruct._torsoWeight = profile._torsoWeight;
playerAppearanceStruct._muzzleWeight = profile._muzzleWeight;
playerAppearanceStruct._voicePitch = profile._voicePitch;
playerAppearanceStruct._bellyWeight = profile._bellyWeight;
playerAppearanceStruct._armWeight = profile._armWeight;
Beyondinstance.playerVis.Cmd_SendNew_PlayerAppearanceStruct(playerAppearanceStruct);
Beyondinstance.fix = true;
}
}
catch (Exception ex)
{
Debug.Log((object)ex);
}
}
}
[HarmonyPatch(typeof(AtlyssNetworkManager), "OnStopClient")]
public static class reset
{
[HarmonyPostfix]
public static void Postfix()
{
try
{
Beyondinstance.fix = false;
}
catch (Exception ex)
{
Debug.Log((object)ex);
}
}
}
[HarmonyPatch(typeof(CameraFunction), "FollowTargetObj")]
public static class cameraHeight
{
[HarmonyPrefix]
public static void Prefix(ref CameraFunction __instance)
{
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
try
{
if (!((Object)(object)Beyondinstance.playerVis != (Object)null))
{
return;
}
CameraFunction._current._mainCamera.farClipPlane = 10000f;
CameraFunction._current._mainCamera.nearClipPlane = 0.0001f;
if (Beyondinstance.playerVis._visualAnimator.GetCurrentAnimatorClipInfo(11).Length != 0)
{
if (((Object)((AnimatorClipInfo)(ref Beyondinstance.playerVis._visualAnimator.GetCurrentAnimatorClipInfo(11)[0])).clip).name.Contains("_sit"))
{
__instance.positionAdjust = new Vector3(0f, 2.15f, 0f) * Beyondinstance.playerVis._playerAppearanceStruct._heightWeight / 2f;
}
else
{
__instance.positionAdjust = new Vector3(0f, 2.15f, 0f) * Beyondinstance.playerVis._playerAppearanceStruct._heightWeight;
}
}
else
{
__instance.positionAdjust = new Vector3(0f, 2.15f, 0f) * Beyondinstance.playerVis._playerAppearanceStruct._heightWeight;
}
}
catch (Exception ex)
{
Debug.Log((object)ex);
}
}
}
[HarmonyPatch(typeof(CameraFogDensity), "OnPreRender")]
public static class cameraFog
{
[HarmonyPrefix]
public static bool Prefix(ref CameraFogDensity __instance)
{
try
{
__instance.fogDensity = 0.0001f;
return false;
}
catch (Exception ex)
{
Debug.Log((object)ex);
return true;
}
}
}
[HarmonyPatch(typeof(ScriptablePlayerRace), "Init_ParamsCheck")]
public static class bypass
{
[HarmonyPrefix]
private static bool Prefix(ref PlayerAppearance_Profile _aP, ref PlayerAppearance_Profile __result)
{
__result = _aP;
return false;
}
}
[HarmonyPatch(typeof(CharacterSelectManager), "Apply_CharacterSelectDisplay")]
public static class getProfile
{
[HarmonyPostfix]
private static void Postfix()
{
try
{
Beyondinstance.profile = ProfileDataManager._current._characterFile._appearanceProfile;
}
catch (Exception ex)
{
Debug.Log((object)ex);
}
}
}
[HarmonyPatch(typeof(PlayerVisual), "Apply_NetworkedCharacterDisplay")]
public static class fixapp
{
[HarmonyPrefix]
private static void Prefix(ref PlayerVisual __instance)
{
try
{
if (((NetworkBehaviour)__instance).isLocalPlayer)
{
CharacterParamsGroup raceDisplayParams = __instance._playerRaceModel._scriptablePlayerRace._raceDisplayParams;
Beyondinstance.playerVis = __instance;
}
}
catch (Exception)
{
}
}
}
[HarmonyPatch(typeof(SettingsManager), "Load_SettingsData")]
public static class fixSettings
{
[HarmonyPostfix]
private static void Postfix(ref SettingsManager __instance)
{
try
{
__instance._limitProportionsToggle.isOn = false;
}
catch (Exception)
{
}
}
}
[HarmonyPatch(typeof(CameraCollision), "<LateUpdate>g__Handle_DistanceControl|13_0")]
public static class setMaxCamDis
{
[HarmonyPrefix]
private static bool Prefix(ref CameraCollision __instance)
{
try
{
float axis = Input.GetAxis("Mouse ScrollWheel");
if (axis != 0f && !Player._mainPlayer._bufferingStatus && !Player._mainPlayer._inChat && !Player._mainPlayer._inUI)
{
CameraCollision obj = __instance;
obj.maxDistance += axis * (35.5f + MathF.Abs(Beyondinstance.camDis));
}
Beyondinstance.camDis = __instance.maxDistance;
return false;
}
catch (Exception ex)
{
Debug.Log((object)ex);
return true;
}
}
}
[HarmonyPatch(typeof(CameraCollision), "Handle_DetectGroundLayer")]
public static class removeCamCol
{
[HarmonyPostfix]
private static void Postfix(ref bool __result)
{
CameraCollision current = CameraCollision._current;
current.maxDistance = Beyondinstance.camDis;
if (!col)
{
__result = false;
}
}
}
public Vector2[] maxSizes = (Vector2[])(object)new Vector2[10];
public static BeyondCore Beyondinstance;
public PlayerVisual playerVis;
public PlayerAppearance_Profile profile;
public PlayerAppearanceStruct playerapp;
public bool fix = false;
public bool isSitting = false;
public float camDis;
private static bool col;
public bool scalePlayer(string[] Parts)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
PlayerAppearanceStruct playerAppearanceStruct = Beyondinstance.playerVis._playerAppearanceStruct;
PlayerAppearance_Profile val = Beyondinstance.profile;
float result;
try
{
float.TryParse(Parts[2], out result);
}
catch (Exception)
{
return false;
}
if (Parts[1] == "boobs" || Parts[1] == "tits" || Parts[1] == "boob" || Parts[1] == "tit" || Parts[1] == "breast" || Parts[1] == "breasts")
{
playerAppearanceStruct._boobWeight = result;
val._boobWeight = result;
}
else if (Parts[1] == "scale")
{
playerAppearanceStruct._heightWeight = result;
playerAppearanceStruct._widthWeight = result;
val._heightWeight = result;
val._widthWeight = result;
}
else if (Parts[1] == "height")
{
playerAppearanceStruct._heightWeight = result;
val._heightWeight = result;
}
else if (Parts[1] == "head")
{
playerAppearanceStruct._headWidth = result;
val._headWidth = result;
}
else if (Parts[1] == "width")
{
playerAppearanceStruct._widthWeight = result;
val._widthWeight = result;
}
else if (Parts[1] == "butt" || Parts[1] == "ass" || Parts[1] == "bottom")
{
playerAppearanceStruct._bottomWeight = result;
val._bottomWeight = result;
}
else if (Parts[1] == "belly" || Parts[1] == "stomach")
{
playerAppearanceStruct._bellyWeight = result;
val._bellyWeight = result;
}
else if (Parts[1] == "muzzle" || Parts[1] == "snout" || Parts[1] == "nose")
{
playerAppearanceStruct._muzzleWeight = result;
val._muzzleWeight = result;
}
else if (Parts[1] == "voice" || Parts[1] == "Pitch")
{
playerAppearanceStruct._voicePitch = result;
val._voicePitch = result;
}
else if (Parts[1] == "torso" || Parts[1] == "chest")
{
playerAppearanceStruct._torsoWeight = result;
val._torsoWeight = result;
}
else
{
if (!(Parts[1] == "arms"))
{
return false;
}
playerAppearanceStruct._armWeight = result;
val._armWeight = result;
}
Beyondinstance.playerVis.Cmd_SendNew_PlayerAppearanceStruct(playerAppearanceStruct);
ProfileDataManager._current._characterFile._appearanceProfile = val;
ProfileDataManager._current.Save_ProfileData();
return true;
}
public bool setSliderLimit(string[] Parts)
{
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: 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_0155: 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_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
//IL_0203: Unknown result type (might be due to invalid IL or missing references)
//IL_0204: Unknown result type (might be due to invalid IL or missing references)
//IL_0235: Unknown result type (might be due to invalid IL or missing references)
//IL_0236: Unknown result type (might be due to invalid IL or missing references)
//IL_0255: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: Unknown result type (might be due to invalid IL or missing references)
CharacterParamsGroup raceDisplayParams = playerVis._playerRaceModel._scriptablePlayerRace._raceDisplayParams;
float result;
float result2;
try
{
float.TryParse(Parts[2], out result);
float.TryParse(Parts[3], out result2);
}
catch (Exception)
{
return false;
}
Vector2 val = default(Vector2);
((Vector2)(ref val))..ctor(result, result2);
if (Parts[1] == "boobs" || Parts[1] == "tits" || Parts[1] == "boob" || Parts[1] == "tit" || Parts[1] == "breast" || Parts[1] == "breasts")
{
raceDisplayParams._boobRange = val;
return true;
}
if (Parts[1] == "height")
{
raceDisplayParams._heightRange = val;
return true;
}
if (Parts[1] == "head")
{
raceDisplayParams._headWidthRange = val;
return true;
}
if (Parts[1] == "width")
{
raceDisplayParams._widthRange = val;
return true;
}
if (Parts[1] == "butt" || Parts[1] == "ass" || Parts[1] == "bottom")
{
raceDisplayParams._bottomRange = val;
return true;
}
if (Parts[1] == "belly" || Parts[1] == "stomach")
{
raceDisplayParams._bellyRange = val;
return true;
}
if (Parts[1] == "muzzle" || Parts[1] == "snout" || Parts[1] == "nose")
{
raceDisplayParams._headModRange = val;
return true;
}
if (Parts[1] == "voice" || Parts[1] == "Pitch")
{
raceDisplayParams._pitchRange = val;
return true;
}
if (Parts[1] == "torso" || Parts[1] == "chest")
{
raceDisplayParams._torsoRange = val;
return true;
}
if (Parts[1] == "arms")
{
raceDisplayParams._armRange = val;
return true;
}
return false;
}
private void Start()
{
Beyondinstance = this;
}
private void Update()
{
if (Input.GetKeyDown((KeyCode)96) && Input.GetKey((KeyCode)306) && Input.GetKey((KeyCode)304))
{
col = !col;
ChatBehaviour._current.New_ChatMessage($"Camera Collision: {col}");
}
}
}
public class MelonLoad : MelonMod
{
private BeyondCore beyondcore;
public override void OnInitializeMelon()
{
if (!((Object)(object)BeyondCore.Beyondinstance != (Object)null))
{
GameObject val = Object.Instantiate<GameObject>(GameObject.CreatePrimitive((PrimitiveType)3));
((Object)val).hideFlags = (HideFlags)61;
beyondcore = val.AddComponent<BeyondCore>();
}
}
}
}