Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SizeManagerPlus v2.5.4
SizeManager.dll
Decompiled 2 years agousing System; using System.Collections; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using HG.BlendableTypes; using On.EntityStates; using On.RoR2; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("SizeManager")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SizeManager")] [assembly: AssemblyTitle("SizeManager")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Flood_Warning; public static class ModCompat { private static bool? optionsEnabled; public static bool RiskOfOptionsEnabled { get { if (!optionsEnabled.HasValue) { optionsEnabled = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); } return optionsEnabled.Value; } } public static void AddOptionsSupport() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Expected O, but got Unknown //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Expected O, but got Unknown //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Expected O, but got Unknown //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Expected O, but got Unknown //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Expected O, but got Unknown //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected O, but got Unknown //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Expected O, but got Unknown //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Expected O, but got Unknown //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeGlass)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeInteractionDistanceCap)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeInteractionDistanceCoefficient)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeInteractionDistanceCapEnable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.optionsEnableDisable)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTime)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.disableInBazaar)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeGlassStats)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.fixCamera_Sensitivity_Height)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.fixCamera_Sensitivity_Width)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.hereticFailsafe)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.scaleInteractionDistance)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.baseSize)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizePlayer)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeAlly)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeMonster)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeBoss)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeNeutral)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeElite)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeChampion)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeChampionBoss)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.healthScaling)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.damageScaling)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.armourScaling)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.speedScaling)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.jumpScaling)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.hasteScaling)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.multiplierStrength)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.exponentStrength)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.dynamicSize)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeLeveling)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(SizeManager.sizeLevelingMinimum)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeLevelingIncrement)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeCamera)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeInventory)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeVoidTier1)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeVoidTier2)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeVoidTier3)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeVoidTierB)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTier1)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTier2)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTier3)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTierB)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTierL)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTier1Scrap)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTier2Scrap)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTier3Scrap)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeTierBScrap)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizePearl)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeShinyPearl)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeItemCount)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.sizeCap)); ModSettingsManager.AddOption((BaseOption)new SliderOption(SizeManager.animationSpeedCoefficient)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeCapEnabled)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.sizeCapFormulas)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.fixCamera)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.continuousUpdate)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(SizeManager.scaleAnimationSpeed)); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.cubeanimataz.SizeManagerPlus", "Size Manager Plus", "2.5.4")] public class SizeManager : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnDisable <>9__0_5; public static hook_OnBodyDestroyed <>9__0_6; internal void <Awake>b__0_5(orig_OnDisable orig, CharacterBody self) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).gameObject) && sizeCamera.Value && (Object)(object)((Component)self).gameObject.GetComponent<SizeMemory>() != (Object)null && self.isPlayerControlled && ((NetworkBehaviour)self).localPlayerAuthority) { ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(((Component)self).gameObject.GetComponent<SizeMemory>().camera); } orig.Invoke(self); } internal void <Awake>b__0_6(orig_OnBodyDestroyed orig, CharacterMaster self, CharacterBody body) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).gameObject) && sizeCamera.Value && (Object)(object)((Component)body).gameObject.GetComponent<SizeMemory>() != (Object)null && body.isPlayerControlled && ((NetworkBehaviour)body).localPlayerAuthority) { ((Component)body).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(((Component)body).gameObject.GetComponent<SizeMemory>().camera); } orig.Invoke(self, body); } } public static ConfigEntry<float> sizeGlass { get; set; } public static ConfigEntry<float> sizeInteractionDistanceCap { get; set; } public static ConfigEntry<float> sizeInteractionDistanceCoefficient { get; set; } public static ConfigEntry<bool> sizeInteractionDistanceCapEnable { get; set; } public static ConfigEntry<bool> optionsEnableDisable { get; set; } public static ConfigEntry<float> sizeTime { get; set; } public static ConfigEntry<bool> disableInBazaar { get; set; } public static ConfigEntry<bool> sizeGlassStats { get; set; } public static ConfigEntry<float> fixCamera_Sensitivity_Height { get; set; } public static ConfigEntry<float> fixCamera_Sensitivity_Width { get; set; } public static ConfigEntry<bool> hereticFailsafe { get; set; } public static ConfigEntry<bool> scaleInteractionDistance { get; set; } public static ConfigEntry<float> baseSize { get; set; } public static ConfigEntry<float> sizePlayer { get; set; } public static ConfigEntry<float> sizeAlly { get; set; } public static ConfigEntry<float> sizeMonster { get; set; } public static ConfigEntry<float> sizeBoss { get; set; } public static ConfigEntry<float> sizeNeutral { get; set; } public static ConfigEntry<float> sizeElite { get; set; } public static ConfigEntry<float> sizeChampion { get; set; } public static ConfigEntry<float> sizeChampionBoss { get; set; } public static ConfigEntry<int> healthScaling { get; set; } public static ConfigEntry<int> damageScaling { get; set; } public static ConfigEntry<int> armourScaling { get; set; } public static ConfigEntry<int> speedScaling { get; set; } public static ConfigEntry<int> jumpScaling { get; set; } public static ConfigEntry<int> hasteScaling { get; set; } public static ConfigEntry<float> multiplierStrength { get; set; } public static ConfigEntry<float> exponentStrength { get; set; } public static ConfigEntry<bool> dynamicSize { get; set; } public static ConfigEntry<bool> sizeLeveling { get; set; } public static ConfigEntry<int> sizeLevelingMinimum { get; set; } public static ConfigEntry<float> sizeLevelingIncrement { get; set; } public static ConfigEntry<bool> sizeCamera { get; set; } public static ConfigEntry<bool> sizeInventory { get; set; } public static ConfigEntry<float> sizeVoidTier1 { get; set; } public static ConfigEntry<float> sizeVoidTier2 { get; set; } public static ConfigEntry<float> sizeVoidTier3 { get; set; } public static ConfigEntry<float> sizeVoidTierB { get; set; } public static ConfigEntry<float> sizeTier1 { get; set; } public static ConfigEntry<float> sizeTier2 { get; set; } public static ConfigEntry<float> sizeTier3 { get; set; } public static ConfigEntry<float> sizeTierB { get; set; } public static ConfigEntry<float> sizeTierL { get; set; } public static ConfigEntry<float> sizeTier1Scrap { get; set; } public static ConfigEntry<float> sizeTier2Scrap { get; set; } public static ConfigEntry<float> sizeTier3Scrap { get; set; } public static ConfigEntry<float> sizeTierBScrap { get; set; } public static ConfigEntry<float> sizePearl { get; set; } public static ConfigEntry<float> sizeShinyPearl { get; set; } public static ConfigEntry<float> sizeItemCount { get; set; } public static ConfigEntry<bool> sizeCapEnabled { get; set; } public static ConfigEntry<float> sizeCap { get; set; } public static ConfigEntry<bool> sizeCapFormulas { get; set; } public static ConfigEntry<bool> excludeWormStats { get; set; } public static ConfigEntry<bool> fixCamera { get; set; } public static ConfigEntry<bool> continuousUpdate { get; set; } public static ConfigEntry<bool> scaleAnimationSpeed { get; set; } public static ConfigEntry<float> animationSpeedCoefficient { get; set; } private void Awake() { //IL_0823: Unknown result type (might be due to invalid IL or missing references) //IL_082d: Expected O, but got Unknown //IL_08f4: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Expected O, but got Unknown //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_0860: Expected O, but got Unknown //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Unknown result type (might be due to invalid IL or missing references) //IL_0924: Expected O, but got Unknown //IL_087b: Unknown result type (might be due to invalid IL or missing references) //IL_0885: Expected O, but got Unknown //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Expected O, but got Unknown //IL_08d2: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Expected O, but got Unknown sizeCamera = ((BaseUnityPlugin)this).Config.Bind<bool>("Camera", "sizeCamera", true, "If true, the size of your character also effects the camera's field of view."); fixCamera = ((BaseUnityPlugin)this).Config.Bind<bool>("Camera", "fixCamera", true, "If true, tries to readjust the camera to be over your character's head. May not work properly on sizes smaller than 100% or sizes that are monstrously large."); fixCamera_Sensitivity_Height = ((BaseUnityPlugin)this).Config.Bind<float>("Camera", "fixCamera_Sensitivity_Height", 1.5f, "How fast the camera shifts downward/upward according to player size."); fixCamera_Sensitivity_Width = ((BaseUnityPlugin)this).Config.Bind<float>("Camera", "fixCamera_Sensitivity_Width", 1.9f, "How fast the camera zooms inward/outward according to player size."); disableInBazaar = ((BaseUnityPlugin)this).Config.Bind<bool>("Contextual Deactivation", "disableInBazaar", true, "If true, character size is vanilla while in the bazaar so players don't have a size/camera too obnoxious for shopping. Stat calculations still take effect."); hereticFailsafe = ((BaseUnityPlugin)this).Config.Bind<bool>("Contextual Deactivation", "hereticFailsafe", true, "If true, the Heretic will not be resized (but stat calculations will still take effect), to counter a bug about them which stops the camera fix from applying properly."); baseSize = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "baseSize", 1f, "The initial size of ALL characters; players and NPCs alike."); sizePlayer = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizePlayer", 1.3f, "The size of players will be multiplied by this value."); sizeAlly = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeAlly", 1.1f, "The size of allied NPCs will be multiplied by this value."); sizeMonster = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeMonster", 1.3f, "The size of enemies (rogue players and enemy NPCs) will be multiplied by this value."); sizeBoss = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeBoss", 1.15f, "The size of bosses (e.g. Stone Titan) will be multiplied by this value."); sizeNeutral = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeNeutral", 0.9f, "The size of neutral NPCs (e.g. Newt) will be multiplied by this value."); sizeElite = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeElite", 1.2f, "The size of elite monsters will be multiplied by this value."); sizeChampion = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeChampion", 1.4f, "The size of champion monsters (red-healthbar monsters, like Teleporter enemies) will be multiplied by this value."); sizeChampionBoss = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeChampionBoss", 1.2f, "The size of champion bosses (red-healthbar boss monsters, like Teleporter bosses) will be multiplied by this value."); healthScaling = ((BaseUnityPlugin)this).Config.Bind<int>("Statistic Modifiers", "healthScaling", 1, "Determines max health behaviour. 0: Size has no influence on health. 1: Size linearly scales health. 2: Size exponentially scales health."); damageScaling = ((BaseUnityPlugin)this).Config.Bind<int>("Statistic Modifiers", "damageScaling", 1, "Determines damage behaviour. 0: Size has no influence on damage. 1: Size linearly scales damage. 2: Size exponentially scales damage."); armourScaling = ((BaseUnityPlugin)this).Config.Bind<int>("Statistic Modifiers", "armourScaling", 0, "Determines armour behaviour. 0: Size has no influence on armour. 1: Size linearly scales armour. 2: Size exponentially scales armour."); speedScaling = ((BaseUnityPlugin)this).Config.Bind<int>("Statistic Modifiers", "speedScaling", 0, "Determines movement speed behaviour. 0: Size has no influence on movement speed. 1: Realism - Size multiplies movement speed. 2: Inverse - Size divides movement speed."); jumpScaling = ((BaseUnityPlugin)this).Config.Bind<int>("Statistic Modifiers", "jumpScaling", 0, "Determines jump power behaviour. 0: Size has no influence on jump power. 1: Realism - Size multiplies jump power. 2: Inverse - Size divides jump power."); hasteScaling = ((BaseUnityPlugin)this).Config.Bind<int>("Statistic Modifiers", "hasteScaling", 0, "Determines haste (attack speed) behaviour. 0: Size has no influence on haste. 1: Realism - Size divides haste. 2: Inverse - Size multiplies haste."); multiplierStrength = ((BaseUnityPlugin)this).Config.Bind<float>("Statistic Modifiers", "multiplierStrength", 1f, "Determines how strong the multiplier is in linear scaling. Changing this is not as dramatic as exponential scaling."); exponentStrength = ((BaseUnityPlugin)this).Config.Bind<float>("Statistic Modifiers", "exponentStrength", 1.3f, "Determines how strong the exponent is in exponential scaling. This is a very delicate value - changing it in the slightest can have a huge effect!"); dynamicSize = ((BaseUnityPlugin)this).Config.Bind<bool>("Dynamic Size", "dynamicSize", false, "If true, enables features which let the size of characters change during gameplay. Calculates size differently. This can potentially break things or go haywire!"); continuousUpdate = ((BaseUnityPlugin)this).Config.Bind<bool>("Dynamic Size", "continuousUpdate", false, "If true, will perform a constant update on every character. This can potentially be very heavy on performance!"); sizeLeveling = ((BaseUnityPlugin)this).Config.Bind<bool>("Dynamic Size", "sizeLeveling", false, "If true, the level of a character can influence their size."); sizeLevelingMinimum = ((BaseUnityPlugin)this).Config.Bind<int>("Dynamic Size", "sizeLevelingMinimum", 1, "The minimum level required for levels to start influencing size."); sizeLevelingIncrement = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeLevelingIncrement", 0.06f, "How much extra size multiplier to apply to the character for each level they are above the initial. See 'sizeLevelingMinimum'."); sizeInventory = ((BaseUnityPlugin)this).Config.Bind<bool>("Dynamic Size", "sizeInventory", false, "If true, the character's inventory also contributes to size."); sizeTier1 = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTier1", 0.01f, "% of size added per white item carried by the character."); sizeTier2 = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTier2", 0.03f, "% of size added per green item carried by the character."); sizeTier3 = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTier3", 0.09f, "% of size added per red item carried by the character."); sizeTierB = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTierB", 0.05f, "% of size added per yellow item carried by the character."); sizeVoidTier1 = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeVoidTier1", 0.01f, "% of size added per void white item carried by the character."); sizeVoidTier2 = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeVoidTier2", 0.03f, "% of size added per void green item carried by the character."); sizeVoidTier3 = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeVoidTier3", 0.09f, "% of size added per void red item carried by the character."); sizeVoidTierB = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeVoidTierB", 0.05f, "% of size added per void yellow item carried by the character."); sizeTierL = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTierL", -0.08f, "% of size added per blue item carried by the character."); sizeTier1Scrap = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTier1Scrap", 0.01f, "% of size added per white scrap carried by the character."); sizeTier2Scrap = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTier2Scrap", 0.03f, "% of size added per green scrap carried by the character."); sizeTier3Scrap = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTier3Scrap", 0.09f, "% of size added per red scrap carried by the character."); sizeTierBScrap = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeTierBScrap", 0.05f, "% of size added per yellow scrap carried by the character."); sizePearl = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizePearl", 0.1f, "% of size added per Pearl carried by the character."); sizeShinyPearl = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeShinyPearl", 0.3f, "% of size added per Irradiant Pearl carried by the character."); sizeGlass = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeGlass", 0.5f, "Total size is multiplied by this percentage for every Shaped Glass the character has."); sizeGlassStats = ((BaseUnityPlugin)this).Config.Bind<bool>("Dynamic Size", "sizeGlassStats", false, "Does the size change from Shaped Glass impact stat calculations?"); sizeItemCount = ((BaseUnityPlugin)this).Config.Bind<float>("Dynamic Size", "sizeItemCount", 0f, "% of size added per item carried by the character. Ignores items that have no tier."); sizeCapEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Limitation", "sizeCapEnabled", true, "If true, the size of a character can't exceed the maximum amount allowed."); sizeCap = ((BaseUnityPlugin)this).Config.Bind<float>("Limitation", "sizeCap", 10f, "The maximum size allowed for all characters. Any sizes bigger than this will be set to this maximum instead."); sizeCapFormulas = ((BaseUnityPlugin)this).Config.Bind<bool>("Limitation", "sizeCapFormulas", true, "If true, the size limit also applies to stat calculations."); sizeTime = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeTranstionSpeed", 1f, "How fast the model resizes."); scaleInteractionDistance = ((BaseUnityPlugin)this).Config.Bind<bool>("Size Modifiers", "sizeInteractionDistance", true, "If true, the interaction distance increases with size."); sizeInteractionDistanceCoefficient = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "sizeInteractionDistanceCoefficient", 0.6f, "%"); sizeInteractionDistanceCapEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("Size Modifiers", "enableInteractionDistanceCap", false, "If true, enables interaction distance cap."); sizeInteractionDistanceCap = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "InteractionDistanceCapValue", 30f, ""); animationSpeedCoefficient = ((BaseUnityPlugin)this).Config.Bind<float>("Size Modifiers", "animationSpeedCoefficient", 1f, ""); scaleAnimationSpeed = ((BaseUnityPlugin)this).Config.Bind<bool>("Size Modifiers", "scaleAnimationSpeed", true, "If true, scale animation speed with size."); optionsEnableDisable = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "disable", false, "If true, disables the mod."); if (ModCompat.RiskOfOptionsEnabled) { ModCompat.AddOptionsSupport(); } CharacterMaster.OnBodyStart += (hook_OnBodyStart)delegate(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body) { orig.Invoke(self, body); UpdateSize_Delayed(0.1f, body); }; if (dynamicSize.Value) { if (continuousUpdate.Value) { CharacterBody.Update += (hook_Update)delegate(orig_Update orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { UpdateSize(self, (int)self.level, silent: true); } }; } else { if (sizeLeveling.Value) { CharacterBody.OnLevelUp += (hook_OnLevelUp)delegate(orig_OnLevelUp orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).gameObject)) { SizeMemory component = ((Component)self).gameObject.GetComponent<SizeMemory>(); if (Object.op_Implicit((Object)(object)component) && component.oldLevel != (int)self.level) { UpdateSize(self, (int)self.level); } } }; } if (sizeInventory.Value) { CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)delegate(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { UpdateSize(self); } }; } if (sizeLeveling.Value || sizeInventory.Value) { CharacterBody.RecalculateStats += (hook_RecalculateStats)delegate(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { UpdateSize(self, -1, silent: true); } }; } } } object obj = <>c.<>9__0_5; if (obj == null) { hook_OnDisable val = delegate(orig_OnDisable orig, CharacterBody self) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).gameObject) && sizeCamera.Value && (Object)(object)((Component)self).gameObject.GetComponent<SizeMemory>() != (Object)null && self.isPlayerControlled && ((NetworkBehaviour)self).localPlayerAuthority) { ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(((Component)self).gameObject.GetComponent<SizeMemory>().camera); } orig.Invoke(self); }; <>c.<>9__0_5 = val; obj = (object)val; } CharacterBody.OnDisable += (hook_OnDisable)obj; object obj2 = <>c.<>9__0_6; if (obj2 == null) { hook_OnBodyDestroyed val2 = delegate(orig_OnBodyDestroyed orig, CharacterMaster self, CharacterBody body) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)((Component)self).gameObject) && sizeCamera.Value && (Object)(object)((Component)body).gameObject.GetComponent<SizeMemory>() != (Object)null && body.isPlayerControlled && ((NetworkBehaviour)body).localPlayerAuthority) { ((Component)body).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(((Component)body).gameObject.GetComponent<SizeMemory>().camera); } orig.Invoke(self, body); }; <>c.<>9__0_6 = val2; obj2 = (object)val2; } CharacterMaster.OnBodyDestroyed += (hook_OnBodyDestroyed)obj2; } internal IEnumerator UpdateSize_Delayed(float time, CharacterBody body, int level = -1, bool silent = false) { yield return (object)new WaitForSeconds(time); if (Object.op_Implicit((Object)(object)body)) { UpdateSize(body, level, silent); } } public void UpdateSize(CharacterBody self, int level = -1, bool silent = false, bool disablesize = false) { //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Invalid comparison between Unknown and I4 //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Invalid comparison between Unknown and I4 //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Invalid comparison between Unknown and I4 //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Invalid comparison between Unknown and I4 //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0c1e: Unknown result type (might be due to invalid IL or missing references) //IL_0c20: Unknown result type (might be due to invalid IL or missing references) //IL_0c25: Unknown result type (might be due to invalid IL or missing references) //IL_0cba: Unknown result type (might be due to invalid IL or missing references) //IL_0cbf: Unknown result type (might be due to invalid IL or missing references) //IL_0cc5: Unknown result type (might be due to invalid IL or missing references) //IL_0cce: Unknown result type (might be due to invalid IL or missing references) //IL_0cd7: Unknown result type (might be due to invalid IL or missing references) //IL_0ce0: Unknown result type (might be due to invalid IL or missing references) //IL_0ce5: Unknown result type (might be due to invalid IL or missing references) //IL_0b2e: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0bda: Unknown result type (might be due to invalid IL or missing references) //IL_0be3: Unknown result type (might be due to invalid IL or missing references) //IL_0bec: Unknown result type (might be due to invalid IL or missing references) //IL_0bf5: Unknown result type (might be due to invalid IL or missing references) //IL_0bfa: Unknown result type (might be due to invalid IL or missing references) //IL_0bff: Unknown result type (might be due to invalid IL or missing references) //IL_0b53: Unknown result type (might be due to invalid IL or missing references) //IL_0b5a: Unknown result type (might be due to invalid IL or missing references) //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0bb5: Unknown result type (might be due to invalid IL or missing references) //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0bbc: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)((Component)self).GetComponent<CameraTargetParams>()) || !Object.op_Implicit((Object)(object)self.modelLocator) || !Object.op_Implicit((Object)(object)self.modelLocator.modelTransform) || !Object.op_Implicit((Object)(object)self.inventory) || !(((Object)self).name != "ArtifactShellBody") || !(((Object)self).name != "ArtifactShellBody(Clone)")) { return; } if (!Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent<SizeMemory>())) { SizeMemory sizeMemory = ((Component)self).gameObject.AddComponent<SizeMemory>(); sizeMemory.size = self.modelLocator.modelTransform.localScale; sizeMemory.scale = 1f; sizeMemory.camera = ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos.value; sizeMemory.oldLevel = 1; if (self.isPlayerControlled && Object.op_Implicit((Object)(object)((Component)self).GetComponent<Interactor>())) { sizeMemory.interactionDistance = ((Component)self).GetComponent<Interactor>().maxInteractionDistance; } } SizeMemory component = ((Component)self).gameObject.GetComponent<SizeMemory>(); float num = baseSize.Value; Vector3 size = component.size; float scale = component.scale; Vector3 camera = component.camera; if (self.isPlayerControlled && (int)self.teamComponent.teamIndex == 1) { num *= sizePlayer.Value; } else { if ((int)self.teamComponent.teamIndex == 2) { num *= sizeMonster.Value; } else if ((int)self.teamComponent.teamIndex == -1) { num *= sizeNeutral.Value; } else if ((int)self.teamComponent.teamIndex == 1) { num *= sizeAlly.Value; } if (self.isChampion) { num = ((!self.isBoss) ? (num * sizeChampion.Value) : (num * sizeChampionBoss.Value)); } else if (self.isBoss) { num *= sizeBoss.Value; } if (self.isElite) { num *= sizeElite.Value; } } int num2 = level; if (num2 < 1) { num2 = (int)self.level; } component.oldLevel = num2; if (dynamicSize.Value && sizeLeveling.Value && (float)num2 >= (float)sizeLevelingMinimum.Value) { num += sizeLevelingIncrement.Value * ((float)num2 - (float)sizeLevelingMinimum.Value); } if (dynamicSize.Value && sizeInventory.Value) { num += sizeItemCount.Value * (float)(self.inventory.GetTotalItemCountOfTier((ItemTier)0) + self.inventory.GetTotalItemCountOfTier((ItemTier)1) + self.inventory.GetTotalItemCountOfTier((ItemTier)2) + self.inventory.GetTotalItemCountOfTier((ItemTier)4) + self.inventory.GetTotalItemCountOfTier((ItemTier)3) + self.inventory.GetTotalItemCountOfTier((ItemTier)9) + self.inventory.GetTotalItemCountOfTier((ItemTier)6) + self.inventory.GetTotalItemCountOfTier((ItemTier)7) + self.inventory.GetTotalItemCountOfTier((ItemTier)8)); num += sizeTier1.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)0); num += sizeTier2.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)1); num += sizeTier3.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)2); num += sizeTierB.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)4); num += sizeTierL.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)3); num += sizeTier1Scrap.Value * (float)self.inventory.GetItemCount(ItemCatalog.FindItemIndex("ScrapWhite")); num += sizeTier2Scrap.Value * (float)self.inventory.GetItemCount(ItemCatalog.FindItemIndex("ScrapGreen")); num += sizeTier3Scrap.Value * (float)self.inventory.GetItemCount(ItemCatalog.FindItemIndex("ScrapRed")); num += sizeTierBScrap.Value * (float)self.inventory.GetItemCount(ItemCatalog.FindItemIndex("ScrapYellow")); num += sizeVoidTier1.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)6); num += sizeVoidTier2.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)7); num += sizeVoidTier3.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)8); num += sizeVoidTierB.Value * (float)self.inventory.GetTotalItemCountOfTier((ItemTier)9); if (sizeGlassStats.Value) { num *= Mathf.Pow(sizeGlass.Value, (float)self.inventory.GetItemCount(ItemCatalog.FindItemIndex("LunarDagger"))); } } if (sizeCapEnabled.Value && num > sizeCap.Value && sizeCapFormulas.Value) { num = sizeCap.Value; } bool flag = false; if (healthScaling.Value == 1) { self.baseMaxHealth /= scale * multiplierStrength.Value; self.baseMaxShield /= scale * multiplierStrength.Value; self.baseRegen /= scale * multiplierStrength.Value; self.baseMaxHealth *= num * multiplierStrength.Value; self.baseMaxShield *= num * multiplierStrength.Value; self.baseRegen *= num * multiplierStrength.Value; flag = true; } else if (healthScaling.Value == 2) { self.baseMaxHealth /= Mathf.Pow(scale, exponentStrength.Value); self.baseMaxShield /= Mathf.Pow(scale, exponentStrength.Value); self.baseRegen /= Mathf.Pow(scale, exponentStrength.Value); self.baseMaxHealth *= Mathf.Pow(num, exponentStrength.Value); self.baseMaxShield *= Mathf.Pow(num, exponentStrength.Value); self.baseRegen *= Mathf.Pow(num, exponentStrength.Value); flag = true; } if (damageScaling.Value == 1) { self.baseDamage /= scale * multiplierStrength.Value; self.baseDamage *= num * multiplierStrength.Value; flag = true; } else if (damageScaling.Value == 2) { self.baseDamage /= Mathf.Pow(scale, exponentStrength.Value); self.baseDamage *= Mathf.Pow(num, exponentStrength.Value); flag = true; } if (armourScaling.Value == 1) { self.baseArmor /= scale * multiplierStrength.Value; self.baseArmor *= num * multiplierStrength.Value; flag = true; } else if (armourScaling.Value == 2) { self.baseArmor /= Mathf.Pow(scale, exponentStrength.Value); self.baseArmor *= Mathf.Pow(num, exponentStrength.Value); flag = true; } if (speedScaling.Value == 1) { self.baseMoveSpeed /= scale; self.baseMoveSpeed *= num; flag = true; } else if (speedScaling.Value == 2) { self.baseMoveSpeed *= scale; self.baseMoveSpeed /= num; flag = true; } if (hasteScaling.Value == 1) { self.baseAttackSpeed *= scale; self.baseAttackSpeed /= num; flag = true; } else if (hasteScaling.Value == 2) { self.baseAttackSpeed /= scale; self.baseAttackSpeed *= num; flag = true; } if (jumpScaling.Value == 1) { self.baseJumpPower /= scale; self.baseJumpPower *= num; flag = true; } else if (jumpScaling.Value == 2) { self.baseJumpPower *= scale; self.baseJumpPower /= num; flag = true; } float num3 = num; if (sizeCapEnabled.Value && num > sizeCap.Value) { num = sizeCap.Value; } if (num < 0.001f) { num = 0.001f; } component.scale = num; if (!sizeGlassStats.Value) { num = num3 * Mathf.Pow(sizeGlass.Value, (float)self.inventory.GetItemCount(ItemCatalog.FindItemIndex("LunarDagger"))); if (sizeCapEnabled.Value && num > sizeCap.Value) { num = sizeCap.Value; } if (num < 0.001f) { num = 0.001f; } } if (disablesize || (disableInBazaar.Value && SceneInfo.instance.sceneDef.baseSceneName.Contains("bazaar")) || (hereticFailsafe.Value && (((Object)self).name == "HereticBody" || ((Object)self).name == "HereticBody(Clone)"))) { num = 1f; } if (self.isPlayerControlled && ((NetworkBehaviour)self).localPlayerAuthority) { if (sizeCamera.Value) { if (component.disableResize || optionsEnableDisable.Value) { ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(camera); } else if (fixCamera.Value) { Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(camera.x, camera.y + (num - 1f) * 2f * fixCamera_Sensitivity_Height.Value, camera.z + (0f - num + 1f) * 2f * fixCamera_Sensitivity_Width.Value); ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(val); } else { ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(camera.x * num, camera.y * num, camera.z * num)); } } else { ((Component)self).gameObject.GetComponent<CameraTargetParams>().cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(camera); } } if (self.isPlayerControlled && Object.op_Implicit((Object)(object)((Component)self).GetComponent<Interactor>())) { float num4 = component.interactionDistance * (num * sizeInteractionDistanceCoefficient.Value); if (num4 > component.interactionDistance && num4 <= sizeInteractionDistanceCap.Value) { ((Component)self).GetComponent<Interactor>().maxInteractionDistance = num4; } else { ((Component)self).GetComponent<Interactor>().maxInteractionDistance = component.interactionDistance; } } component.eh = num; component.currentScale = self.modelLocator.modelTransform.localScale; component.finalScale = new Vector3(size.x * num, size.y * num, size.z * num); if (flag && !silent) { self.RecalculateStats(); } } } public class SizeMemory : MonoBehaviour { public float scale; public float interactionDistance; public Vector3 camera; public int oldLevel; public bool disableResize; public Vector3 finalScale; public Vector3 currentScale; public float eh; public Transform modelTransform; public Vector3 size { get; set; } private void OnEnable() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if (SizeManager.scaleAnimationSpeed.Value) { BaseCharacterMain.UpdateAnimationParameters += new hook_UpdateAnimationParameters(BaseCharacterMain_UpdateAnimationParameters); } } private void BaseCharacterMain_UpdateAnimationParameters(orig_UpdateAnimationParameters orig, BaseCharacterMain self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && ((EntityState)self).characterBody.isPlayerControlled && Object.op_Implicit((Object)(object)self.modelAnimator)) { if (self.characterAnimParamAvailability.walkSpeed) { self.modelAnimator.SetFloat(AnimationParameters.walkSpeed, ((BaseState)self).moveSpeedStat / eh - 0.3f * SizeManager.animationSpeedCoefficient.Value); } if (self.characterAnimParamAvailability.mainRootPlaybackRate) { self.modelAnimator.SetFloat(AnimationParameters.mainRootPlaybackRate, ((BaseState)self).moveSpeedStat / eh - 0.3f * SizeManager.animationSpeedCoefficient.Value); } } } private void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown BaseCharacterMain.UpdateAnimationParameters -= new hook_UpdateAnimationParameters(BaseCharacterMain_UpdateAnimationParameters); } private void Start() { ModelLocator component = ((Component)this).GetComponent<ModelLocator>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform)) { modelTransform = component.modelTransform; } } private void Update() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)modelTransform)) { if (SizeManager.optionsEnableDisable.Value) { modelTransform.localScale = size; } else { modelTransform.localScale = Vector3.Lerp(currentScale, finalScale, Time.deltaTime * SizeManager.sizeTime.Value); } } } }