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 SuperViking v0.1.0
plugins/SuperViking.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using SuperViking.Patches; using SuperViking.Pose; using SuperViking.Powers; using SuperViking.Util; using UnityEngine; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: AssemblyCompany("SuperViking")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+a4bf277ff8a6a78e02568e6726e290accbc8ef33")] [assembly: AssemblyProduct("SuperViking")] [assembly: AssemblyTitle("SuperViking")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 SuperViking { public class AbilityWheel : MonoBehaviour { private sealed class Item { public Ability Ability; public string Label; public string Does; public bool Available; } private static readonly Item[] Items = new Item[6] { new Item { Ability = Ability.Punch, Label = "SUPER PUNCH", Does = "click to punch, hold to charge", Available = true }, new Item { Ability = Ability.Slam, Label = "GROUND SLAM", Does = "click to slam, hold to charge", Available = true }, new Item { Ability = Ability.Laser, Label = "LASER EYES", Does = "hold left click to burn", Available = true }, new Item { Ability = Ability.Throw, Label = "GRAB & THROW", Does = "click a creature, click again to throw", Available = true }, new Item { Ability = Ability.Combo, Label = "BLITZ COMBO", Does = "click a target: dash, flurry, big hit", Available = true }, new Item { Ability = Ability.Normal, Label = "NORMAL", Does = "left click is the game's own attack", Available = true } }; private const float DeadZone = 0.3f; private const float MouseScale = 0.12f; private bool _armed; private float _held; private Vector2 _pointer; private int _hover = -1; private static Texture2D s_disc; private static Texture2D s_wedge; private static Texture2D s_dot; private static GUIStyle s_label; private static GUIStyle s_small; private static GUIStyle s_hud; internal static bool IsOpen { get; private set; } internal static string LabelOf(Ability a) { for (int i = 0; i < Items.Length; i++) { if (Items[i].Ability == a) { return Items[i].Label; } } return a.ToString(); } private void OnDisable() { IsOpen = false; } private void OnDestroy() { IsOpen = false; if ((Object)(object)s_disc != (Object)null) { Object.Destroy((Object)(object)s_disc); } if ((Object)(object)s_wedge != (Object)null) { Object.Destroy((Object)(object)s_wedge); } if ((Object)(object)s_dot != (Object)null) { Object.Destroy((Object)(object)s_dot); } s_disc = (s_wedge = (s_dot = null)); s_label = (s_small = (s_hud = null)); } private void Update() { //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null || !PowerManager.SuperMode || ModConfig.WheelEnabled == null || !ModConfig.WheelEnabled.Value || ((Character)localPlayer).IsDead()) { Close(null, commit: false); _armed = false; return; } KeyCode value = ModConfig.WheelKey.Value; if (!IsOpen) { if (Input.GetKeyDown(value)) { _armed = Keybinds.Allowed(localPlayer) && MayOpen(localPlayer); _held = 0f; } if (!_armed) { return; } if (!Input.GetKey(value)) { _armed = false; return; } _held += Time.unscaledDeltaTime; if (!(_held < ModConfig.WheelHoldTime.Value)) { _armed = false; if (Keybinds.Allowed(localPlayer) && MayOpen(localPlayer)) { Open(); } } return; } if (Input.GetKeyDown((KeyCode)27)) { Close(localPlayer, commit: false); return; } Vector2 val = Vector2.zero; try { val = ZInput.GetMouseDelta(); } catch { } _pointer += val * 0.12f; if (((Vector2)(ref _pointer)).sqrMagnitude > 1f) { ((Vector2)(ref _pointer)).Normalize(); } if (((Vector2)(ref _pointer)).magnitude >= 0.3f) { float num = Mathf.Atan2(_pointer.x, _pointer.y) * 57.29578f; if (num < 0f) { num += 360f; } float num2 = 360f / (float)Items.Length; _hover = Mathf.RoundToInt(num / num2) % Items.Length; } else { _hover = -1; } if (!Input.GetKey(value)) { Close(localPlayer, commit: true); } } private static bool MayOpen(Player player) { if (Hud.InRadial() || ((Character)player).InPlaceMode()) { return false; } if (ModConfig.WheelOnlyWhenIdle != null && !ModConfig.WheelOnlyWhenIdle.Value) { return true; } if (player.GetDoodadController() != null) { return false; } GameObject hoverObject = ((Humanoid)player).GetHoverObject(); if (!((Object)(object)hoverObject == (Object)null)) { return hoverObject.GetComponentInParent<Interactable>() == null; } return true; } private void Open() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) IsOpen = true; _pointer = Vector2.zero; _hover = -1; } private void Close(Player player, bool commit) { if (!IsOpen) { return; } IsOpen = false; if (commit && !((Object)(object)player == (Object)null) && _hover >= 0 && _hover < Items.Length) { Item item = Items[_hover]; if (!item.Available) { ((Character)player).Message((MessageType)2, item.Label + ": " + item.Does, 0, (Sprite)null, false); return; } if (item.Ability == Ability.Laser && (ModConfig.LaserEnabled == null || !ModConfig.LaserEnabled.Value)) { ((Character)player).Message((MessageType)2, "LASER EYES is switched off ([Laser] Enabled)", 0, (Sprite)null, false); return; } if (item.Ability == Ability.Throw && (ModConfig.ThrowEnabled == null || !ModConfig.ThrowEnabled.Value)) { ((Character)player).Message((MessageType)2, "GRAB & THROW is switched off ([Throw] Enabled)", 0, (Sprite)null, false); return; } if (item.Ability == Ability.Combo && (ModConfig.ComboEnabled == null || !ModConfig.ComboEnabled.Value)) { ((Character)player).Message((MessageType)2, "BLITZ COMBO is switched off ([Combo] Enabled)", 0, (Sprite)null, false); return; } PowerManager.Selected = item.Ability; ((Character)player).Message((MessageType)2, item.Label, 0, (Sprite)null, false); } } private void OnGUI() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 if ((int)Event.current.type != 7 || (Object)(object)Player.m_localPlayer == (Object)null || !PowerManager.SuperMode || ModConfig.WheelEnabled == null || !ModConfig.WheelEnabled.Value) { return; } try { EnsureAssets(); if (IsOpen) { DrawWheel(); } else if (ModConfig.WheelShowSelected != null && ModConfig.WheelShowSelected.Value && Keybinds.Allowed(Player.m_localPlayer)) { DrawHud(); } } catch (Exception ex) { IsOpen = false; if (ModConfig.WheelEnabled != null) { ModConfig.WheelEnabled.Value = false; } ManualLogSource log = SuperVikingPlugin.Log; if (log != null) { log.LogError((object)("AbilityWheel: drawing failed, wheel switched off ([Wheel] Enabled). " + ex)); } } } private static void DrawHud() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0100: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) string text = "Left click: " + LabelOf(PowerManager.Selected) + " (hold " + ((object)ModConfig.WheelKey.Value/*cast due to .constrained prefix*/).ToString() + " for the wheel)"; float charge = AbilityCharge.Charge; if (AbilityCharge.Holding && charge > 0f) { text += ((charge >= 1f) ? " CHARGE: MAX" : (" CHARGE: " + Mathf.RoundToInt(charge * 100f) + "%")); } if (PlayerTime.Slowed) { text += " SUPER SPEED"; } string text2 = PowerManager.HudNote(); if (!string.IsNullOrEmpty(text2)) { text = text + " " + text2; } Rect val = default(Rect); ((Rect)(ref val))..ctor(14f, 104f, 900f, 22f); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.8f); GUI.Label(new Rect(((Rect)(ref val)).x + 1f, ((Rect)(ref val)).y + 1f, ((Rect)(ref val)).width, ((Rect)(ref val)).height), text, s_hud); GUI.color = new Color(1f, 0.86f, 0.35f, 1f); GUI.Label(val, text, s_hud); GUI.color = color; } private void DrawWheel() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp((float)Screen.height * 0.26f, 160f, 340f); Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor((float)Screen.width * 0.5f, (float)Screen.height * 0.5f); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(val.x - num, val.y - num, num * 2f, num * 2f); float num2 = 360f / (float)Items.Length; Color color = GUI.color; Matrix4x4 matrix = GUI.matrix; GUI.color = Color.white; GUI.DrawTexture(val2, (Texture)(object)s_disc); if (_hover >= 0) { GUIUtility.RotateAroundPivot((float)_hover * num2, val); GUI.color = (Items[_hover].Available ? new Color(1f, 0.78f, 0.2f, 0.85f) : new Color(0.6f, 0.6f, 0.6f, 0.5f)); GUI.DrawTexture(val2, (Texture)(object)s_wedge); GUI.matrix = matrix; } int num3 = Mathf.RoundToInt(Mathf.Clamp(num * 0.085f, 14f, 26f)); s_label.fontSize = num3; s_small.fontSize = Mathf.Max(11, Mathf.RoundToInt((float)num3 * 0.62f)); Ability selected = PowerManager.Selected; Vector2 val3 = default(Vector2); for (int i = 0; i < Items.Length; i++) { float num4 = (float)i * num2 * ((float)Math.PI / 180f); ((Vector2)(ref val3))..ctor(val.x + Mathf.Sin(num4) * num * 0.62f, val.y - Mathf.Cos(num4) * num * 0.62f); Item item = Items[i]; bool flag = i == _hover; Color val4 = (Color)((!item.Available) ? new Color(0.62f, 0.62f, 0.62f, 1f) : (flag ? Color.white : new Color(0.93f, 0.9f, 0.82f, 1f))); string text = ((item.Ability == selected) ? ("[ " + item.Label + " ]") : item.Label); Shadowed(new Rect(val3.x - 150f, val3.y - (float)num3, 300f, (float)num3 * 1.5f), text, s_label, val4); Shadowed(new Rect(val3.x - 150f, val3.y + (float)num3 * 0.45f, 300f, (float)num3 * 1.2f), item.Does, s_small, new Color(val4.r, val4.g, val4.b, 0.85f)); } Vector2 val5 = default(Vector2); ((Vector2)(ref val5))..ctor(val.x + _pointer.x * num * 0.42f, val.y - _pointer.y * num * 0.42f); GUI.color = Color.white; GUI.DrawTexture(new Rect(val5.x - 7f, val5.y - 7f, 14f, 14f), (Texture)(object)s_dot); string text2 = ((_hover < 0) ? "move the mouse, then let go" : (Items[_hover].Available ? "let go to choose" : "not available yet")); Shadowed(new Rect(val.x - 200f, val.y + num + 8f, 400f, 26f), text2, s_small, new Color(1f, 1f, 1f, 0.9f)); GUI.color = color; GUI.matrix = matrix; } private static void Shadowed(Rect r, string text, GUIStyle style, Color colour) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_005f: Unknown result type (might be due to invalid IL or missing references) GUI.color = new Color(0f, 0f, 0f, colour.a * 0.85f); GUI.Label(new Rect(((Rect)(ref r)).x + 1.5f, ((Rect)(ref r)).y + 1.5f, ((Rect)(ref r)).width, ((Rect)(ref r)).height), text, style); GUI.color = colour; GUI.Label(r, text, style); } private static void EnsureAssets() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)s_disc == (Object)null) { s_disc = MakeDisc(256); } if ((Object)(object)s_wedge == (Object)null) { s_wedge = MakeWedge(256, 360f / (float)Items.Length); } if ((Object)(object)s_dot == (Object)null) { s_dot = MakeDot(16); } if (s_label == null) { s_label = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontStyle = (FontStyle)1, wordWrap = false }; s_small = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, wordWrap = false }; s_hud = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)3, fontStyle = (FontStyle)1, fontSize = 14, wordWrap = false }; s_label.normal.textColor = Color.white; s_small.normal.textColor = Color.white; s_hud.normal.textColor = Color.white; } } private static Texture2D NewTexture(int size) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Expected O, but got Unknown Texture2D val = new Texture2D(size, size, (TextureFormat)4, false); ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)1; ((Object)val).hideFlags = (HideFlags)61; return val; } private static Texture2D MakeDisc(int size) { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) Texture2D val = NewTexture(size); Color32[] array = (Color32[])(object)new Color32[size * size]; float num = (float)size * 0.5f; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num2 = ((float)j + 0.5f - num) / num; float num3 = ((float)i + 0.5f - num) / num; float num4 = Mathf.Sqrt(num2 * num2 + num3 * num3); float num5 = Mathf.Clamp01((1f - num4) / 0.03f) * Mathf.Clamp01((num4 - 0.2f) / 0.03f); float num6 = Mathf.Clamp01(1f - Mathf.Abs(num4 - 0.985f) / 0.015f); byte b = (byte)Mathf.RoundToInt(Mathf.Lerp(14f, 200f, num6)); array[i * size + j] = new Color32(b, b, b, (byte)Mathf.RoundToInt(num5 * Mathf.Lerp(150f, 220f, num6))); } } val.SetPixels32(array); val.Apply(false, true); return val; } private static Texture2D MakeWedge(int size, float degrees) { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) Texture2D val = NewTexture(size); Color32[] array = (Color32[])(object)new Color32[size * size]; float num = (float)size * 0.5f; float num2 = degrees * 0.5f; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num3 = ((float)j + 0.5f - num) / num; float num4 = ((float)i + 0.5f - num) / num; float num5 = Mathf.Sqrt(num3 * num3 + num4 * num4); float num6 = Mathf.Abs(Mathf.Atan2(num3, num4) * 57.29578f); float num7 = Mathf.Clamp01((0.97f - num5) / 0.02f) * Mathf.Clamp01((num5 - 0.23f) / 0.02f); float num8 = Mathf.Clamp01((num2 - 1.5f - num6) / 1.5f); array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)Mathf.RoundToInt(num7 * num8 * 110f)); } } val.SetPixels32(array); val.Apply(false, true); return val; } private static Texture2D MakeDot(int size) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) Texture2D val = NewTexture(size); Color32[] array = (Color32[])(object)new Color32[size * size]; float num = (float)size * 0.5f; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num2 = ((float)j + 0.5f - num) / num; float num3 = ((float)i + 0.5f - num) / num; float num4 = Mathf.Sqrt(num2 * num2 + num3 * num3); array[i * size + j] = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, (byte)Mathf.RoundToInt(Mathf.Clamp01((1f - num4) / 0.25f) * 255f)); } } val.SetPixels32(array); val.Apply(false, true); return val; } } public enum CallAgain { Always, RingNotOnYou, RingDestroyedAtSea } public class CapeWind : MonoBehaviour { private const float ZoneRadius = 3f; private const float MinSpeed = 2f; private const float EaseTime = 0.15f; private const float CapeWeight = 46.666664f; private static bool _bound; private static bool _usable; private static Type _zoneType; private static FieldInfo _fMode; private static FieldInfo _fRadius; private static FieldInfo _fMain; private static FieldInfo _fTurbulence; private static FieldInfo _fAddition; private static object _sphereDirection; private GameObject _zoneObject; private Component _zone; private bool _failed; private float _strength; private FlightPower _flight; private const float BreezeLift = 0.25f; private float _writtenMain = -1f; private float _writtenTurbulence = -1f; private Vector3 _dir = Vector3.back; private void Update() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) Player localPlayer = Player.m_localPlayer; float num = ((ModConfig.CapeFlightWind != null) ? ModConfig.CapeFlightWind.Value : 0f); bool flag = (Object)(object)localPlayer != (Object)null && !((Character)localPlayer).IsDead() && PowerManager.SuperMode; bool flag2 = flag && !((Character)localPlayer).IsOnGround(); Vector3 val = Vector3.zero; float num2 = 0f; float num3 = 0f; if (flag) { Vector3 val2 = SuperSpeedBody.RealVelocity(localPlayer); num3 = ((Vector3)(ref val2)).magnitude; if (flag2 && num > 0.01f) { float num4 = ((ModConfig.CapeFlightWindFullSpeed != null) ? ModConfig.CapeFlightWindFullSpeed.Value : 22f); num4 = Mathf.Max(num4, 3f); num2 = Mathf.SmoothStep(0f, 1f, Mathf.InverseLerp(2f, num4, num3)); if (num2 > 0f && num3 > 0.01f) { float num5 = ((ModConfig.CapeFlightWindCarry != null) ? ModConfig.CapeFlightWindCarry.Value : 1f); val = (val2 / (0f - num3) * num + Vector3.up * (46.666664f * num5)) * num2; } } } float num6 = ((ModConfig.CapeHoverBreeze != null) ? ModConfig.CapeHoverBreeze.Value : 0f); bool flag3 = flag && num6 > 0.01f && num2 < 1f && Idle(localPlayer, flag2, num3); if (flag3) { val += Breeze(localPlayer, num6) * (1f - num2); } float magnitude = ((Vector3)(ref val)).magnitude; float num7 = 1f - Mathf.Exp((0f - PlayerTime.DeltaTime) / 0.15f); _strength = Mathf.Lerp(_strength, magnitude, num7); if (magnitude <= 0f && _strength < 0.5f) { _strength = 0f; } if ((Object)(object)localPlayer == (Object)null) { _strength = 0f; } if (_strength <= 0f) { if ((Object)(object)_zoneObject != (Object)null && _zoneObject.activeSelf) { _zoneObject.SetActive(false); } } else { if (!EnsureZone()) { return; } try { if (((Vector3)(ref val)).sqrMagnitude > 0.0001f) { _dir = Vector3.Slerp(_dir, ((Vector3)(ref val)).normalized, num7); } if (((Vector3)(ref _dir)).sqrMagnitude < 0.0001f) { _dir = Vector3.back; } ((Vector3)(ref _dir)).Normalize(); Vector3 val3 = ((Mathf.Abs(_dir.y) > 0.99f) ? Vector3.forward : Vector3.up); _zoneObject.transform.SetPositionAndRotation(((Component)localPlayer).transform.position + Vector3.up, Quaternion.LookRotation(_dir, val3)); if (Mathf.Abs(_strength - _writtenMain) > 0.25f) { _fMain.SetValue(_zone, _strength); _writtenMain = _strength; } float num8 = ((ModConfig.CapeFlightWindFlutter != null) ? Mathf.Clamp01(ModConfig.CapeFlightWindFlutter.Value) : 0.5f); if (flag3) { float num9 = ((ModConfig.CapeHoverBreezeFlutter != null) ? Mathf.Clamp01(ModConfig.CapeHoverBreezeFlutter.Value) : 0.8f); num8 = Mathf.Lerp(num9, num8, num2); } if (Mathf.Abs(num8 - _writtenTurbulence) > 0.001f) { _fTurbulence.SetValue(_zone, num8); _writtenTurbulence = num8; } if (!_zoneObject.activeSelf) { _zoneObject.SetActive(true); } } catch (Exception ex) { Fail("CapeWind: failed and switched itself off until the next reload (capes go without the flight wind). " + ex); } } } private bool Idle(Player player, bool airborne, float speed) { if (_flight == null) { _flight = PowerManager.Get<FlightPower>(); } if (_flight != null && _flight.IsAirborne) { return true; } if (airborne) { return false; } if (speed < 2f && ModConfig.CapeHoverBreezeOnGround != null) { return ModConfig.CapeHoverBreezeOnGround.Value; } return false; } private static Vector3 Breeze(Player player, float strength) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)player).transform.forward; val.y = 0f; val = ((((Vector3)(ref val)).sqrMagnitude > 0.0001f) ? ((Vector3)(ref val)).normalized : Vector3.forward); Vector3 val2 = Vector3.Cross(Vector3.up, val); Vector3 val3 = Vector3.zero; if ((ModConfig.CapeHoverBreezeFollowsWind == null || ModConfig.CapeHoverBreezeFollowsWind.Value) && (Object)(object)EnvMan.instance != (Object)null) { val3 = EnvMan.instance.GetWindDir(); val3.y = 0f; } Vector3 val4; if (((Vector3)(ref val3)).sqrMagnitude > 0.01f) { ((Vector3)(ref val3)).Normalize(); float num = Vector3.Dot(val3, val); if (num > 0f) { val3 -= 2f * num * val; } float num2 = Vector3.Dot(val3, val2); if (Mathf.Abs(num2) < 0.5f) { val4 = val3 + val2 * ((num2 >= 0f) ? 0.6f : (-0.6f)); val3 = ((Vector3)(ref val4)).normalized; } } else { val4 = val2 * 0.8f - val * 0.6f; val3 = ((Vector3)(ref val4)).normalized; } float now = PlayerTime.Now; float num3 = 16f * Mathf.Sin(now * 1.1f) + 7f * Mathf.Sin(now * 2.3f + 1.3f); float num4 = 1f + 0.28f * Mathf.Sin(now * 1.7f + 0.6f) + 0.14f * Mathf.Sin(now * 3.1f); val3 = Quaternion.AngleAxis(num3, Vector3.up) * val3; return val3 * (strength * num4) + Vector3.up * 11.666666f; } private void OnDestroy() { if ((Object)(object)_zoneObject != (Object)null) { Object.Destroy((Object)(object)_zoneObject); } _zoneObject = null; _zone = null; } private bool EnsureZone() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown if ((Object)(object)_zone != (Object)null && (Object)(object)_zoneObject != (Object)null) { return true; } if (_failed) { return false; } Bind(); if (!_usable) { Fail("CapeWind: the game's cloth library has no MagicaWindZone as expected — capes go without the flight wind."); return false; } try { _zoneObject = new GameObject("SuperVikingFlightWind"); _zoneObject.SetActive(false); _zoneObject.transform.SetParent(((Component)this).transform, false); _zone = _zoneObject.AddComponent(_zoneType); _fMode.SetValue(_zone, _sphereDirection); _fRadius.SetValue(_zone, 3f); _fAddition.SetValue(_zone, true); _fMain.SetValue(_zone, 0f); _writtenMain = 0f; _writtenTurbulence = -1f; ManualLogSource log = SuperVikingPlugin.Log; if (log != null) { log.LogInfo((object)"CapeWind: on — a wind zone of the game's cloth library rides on the player while he flies."); } return true; } catch (Exception ex) { Fail("CapeWind: could not create the flight wind — capes go without it. " + ex); return false; } } private void Fail(string message) { _failed = true; ManualLogSource log = SuperVikingPlugin.Log; if (log != null) { log.LogWarning((object)message); } if ((Object)(object)_zoneObject != (Object)null) { Object.Destroy((Object)(object)_zoneObject); } _zoneObject = null; _zone = null; _strength = 0f; } private static void Bind() { if (_bound) { return; } _bound = true; try { _zoneType = AccessTools.TypeByName("MagicaCloth2.MagicaWindZone") ?? Type.GetType("MagicaCloth2.MagicaWindZone, MagicaClothV2", throwOnError: false); if (!(_zoneType == null) && typeof(Component).IsAssignableFrom(_zoneType)) { _fMode = AccessTools.Field(_zoneType, "mode"); _fRadius = AccessTools.Field(_zoneType, "radius"); _fMain = AccessTools.Field(_zoneType, "main"); _fTurbulence = AccessTools.Field(_zoneType, "turbulence"); _fAddition = AccessTools.Field(_zoneType, "isAddition"); if (!(_fMode == null) && !(_fRadius == null) && !(_fMain == null) && !(_fTurbulence == null) && !(_fAddition == null) && _fMode.FieldType.IsEnum && !(_fRadius.FieldType != typeof(float)) && !(_fMain.FieldType != typeof(float)) && !(_fTurbulence.FieldType != typeof(float)) && !(_fAddition.FieldType != typeof(bool))) { _sphereDirection = Enum.Parse(_fMode.FieldType, "SphereDirection"); _usable = true; } } } catch (Exception) { _usable = false; } } } [DefaultExecutionOrder(1100)] public class CarryArms : MonoBehaviour { private Player _player; private Transform _lArm; private Transform _lFore; private Transform _lHand; private Transform _rArm; private Transform _rFore; private Transform _rHand; private ThrowPower _thrower; private ComboPower _combo; private bool _dead; private const float ElbowBack = -30f; private const float FistUp = 135f; private void LateUpdate() { if (_dead) { return; } try { Step(); } catch (Exception ex) { _dead = true; ManualLogSource log = SuperVikingPlugin.Log; if (log != null) { log.LogError((object)("CarryArms: failed and is off until the next reload (carrying and the combo still work, his arms just hang). " + ex)); } } } private void Step() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) if (!PowerManager.SuperMode) { return; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { return; } if (_thrower == null) { _thrower = PowerManager.Get<ThrowPower>(); } if (_combo == null) { _combo = PowerManager.Get<ComboPower>(); } float spread; if (_combo != null && _combo.Flurry(out var target, out var right, out var left)) { if (Bind(localPlayer)) { Punch(_rArm, _rFore, _rHand, target, right, localPlayer, 1f); Punch(_lArm, _lFore, _lHand, target, left, localPlayer, -1f); PoseLab.NoteExternalWrite(_lArm); } } else if (_thrower != null && _thrower.ArmsTarget(localPlayer, out target, out spread) && Bind(localPlayer)) { Vector3 val = ((Component)localPlayer).transform.right * spread; Aim(_lArm, _lFore, _lHand, target - val); Aim(_rArm, _rFore, _rHand, target + val); PoseLab.NoteExternalWrite(_lArm); } } private bool Bind(Player player) { if (player == _player && (Object)(object)_lArm != (Object)null && (Object)(object)_rArm != (Object)null) { return true; } _player = player; GameObject visual = ((Character)player).GetVisual(); Transform val = (((Object)(object)visual != (Object)null) ? visual.transform : null); if ((Object)(object)val == (Object)null) { return false; } _lArm = Utils.FindChild(val, "LeftArm", (IterativeSearchType)0); _lFore = Utils.FindChild(val, "LeftForeArm", (IterativeSearchType)0); _lHand = Utils.FindChild(val, "LeftHand", (IterativeSearchType)0); _rArm = Utils.FindChild(val, "RightArm", (IterativeSearchType)0); _rFore = Utils.FindChild(val, "RightForeArm", (IterativeSearchType)0); _rHand = Utils.FindChild(val, "RightHand", (IterativeSearchType)0); if ((Object)(object)_lArm != (Object)null && (Object)(object)_lFore != (Object)null && (Object)(object)_lHand != (Object)null && (Object)(object)_rArm != (Object)null && (Object)(object)_rFore != (Object)null) { return (Object)(object)_rHand != (Object)null; } return false; } private static void Aim(Transform upper, Transform fore, Transform hand, Vector3 target) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_004d: Unknown result type (might be due to invalid IL or missing references) Vector3 want = target - upper.position; if (!(((Vector3)(ref want)).sqrMagnitude < 0.0001f)) { ((Vector3)(ref want)).Normalize(); Turn(upper, fore.position - upper.position, want); Turn(fore, hand.position - fore.position, want); } } private static void Punch(Transform upper, Transform fore, Transform hand, Vector3 target, float stretch, Player player, float side) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = target - upper.position; if (!(((Vector3)(ref val)).sqrMagnitude < 0.0001f)) { Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(normalized.x, 0f, normalized.z); float magnitude = ((Vector3)(ref val2)).magnitude; Vector3 val3 = ((magnitude > 0.001f) ? (val2 / magnitude) : ((Component)player).transform.forward); Vector3 val4 = Vector3.Cross(Vector3.up, val3) * side; float num = Mathf.Atan2(magnitude, 0f - normalized.y) * 57.29578f; stretch = Mathf.Clamp01(stretch); float num2 = 1f - stretch; float num3 = stretch * stretch; Vector3 val5 = InPlane(val3, Mathf.Lerp(-30f, num, stretch)) + val4 * (0.28f * num2); Turn(upper, fore.position - upper.position, Vector3.Slerp(((Vector3)(ref val5)).normalized, normalized, num3)); Vector3 val6 = InPlane(val3, Mathf.Lerp(135f, num, stretch)) - val4 * (0.18f * num2); Turn(fore, hand.position - fore.position, Vector3.Slerp(((Vector3)(ref val6)).normalized, normalized, num3)); } } private static Vector3 InPlane(Vector3 ahead, float degrees) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) float num = degrees * ((float)Math.PI / 180f); return ahead * Mathf.Sin(num) - Vector3.up * Mathf.Cos(num); } private static void Turn(Transform bone, Vector3 along, Vector3 want) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) if (!(((Vector3)(ref along)).sqrMagnitude < 1E-06f) && !(((Vector3)(ref want)).sqrMagnitude < 1E-06f)) { bone.rotation = Quaternion.FromToRotation(((Vector3)(ref along)).normalized, ((Vector3)(ref want)).normalized) * bone.rotation; } } } public class PoseBoneConfig { public string Bone; public ConfigEntry<float> X; public ConfigEntry<float> Y; public ConfigEntry<float> Z; } public static class ModConfig { public static ConfigEntry<KeyCode> SuperModeKey; public static ConfigEntry<Protection> SuperProtection; public static ConfigEntry<bool> SuperModeRequireCtrl; public static ConfigEntry<bool> SuppressInputWhenConfigMenuOpen; public static ConfigEntry<bool> FlightEnabled; public static ConfigEntry<float> HoverSpeed; public static ConfigEntry<float> VerticalSpeed; public static ConfigEntry<float> LiftoffSpeed; public static ConfigEntry<float> CruiseStartSpeed; public static ConfigEntry<float> CruiseMaxSpeed; public static ConfigEntry<float> CruiseAccel; public static ConfigEntry<float> FastFlyMultiplier; public static ConfigEntry<float> CruisePitchFollow; public static ConfigEntry<float> CruiseBank; public static ConfigEntry<bool> BarrelRoll; public static ConfigEntry<float> BarrelRollTime; public static ConfigEntry<float> BarrelRollDodge; public static ConfigEntry<float> AutoRollTurnRate; public static ConfigEntry<float> DoubleTapWindow; public static ConfigEntry<float> TurnSpeed; public static ConfigEntry<bool> FreeLookInHover; public static ConfigEntry<bool> CalmFlightAnim; public static ConfigEntry<float> FlightAccelTime; public static ConfigEntry<float> FlightDecelTime; public static ConfigEntry<float> HoverBoost; public static ConfigEntry<float> HoverBoostRamp; public static ConfigEntry<bool> LookAround; public static ConfigEntry<KeyCode> LookAroundKey; public static ConfigEntry<bool> LookAroundReturn; public static ConfigEntry<float> HoverRampMax; public static ConfigEntry<float> HoverRampTime; public static ConfigEntry<float> HoverLean; public static ConfigEntry<float> PoseBlendTime; public static ConfigEntry<float> ExitGlideTime; public static ConfigEntry<float> SpeedFovKick; public static ConfigEntry<bool> SpeedTrail; public static ConfigEntry<float> SpeedTrailStartSpeed; public static ConfigEntry<bool> SpeedTrailHands; public static ConfigEntry<float> LiftDuration; public static ConfigEntry<bool> ChargedTakeoff; public static ConfigEntry<float> ChargeMaxTime; public static ConfigEntry<float> MaxLaunchHeight; public static ConfigEntry<float> LaunchSpeed; public static ConfigEntry<float> ChargeVibrate; public static ConfigEntry<float> TakeoffShockwaveAfter; public static ConfigEntry<bool> TakeoffShockwaveCrater; public static ConfigEntry<float> LaunchPoseHold; public static ConfigEntry<bool> ChargeEnabled; public static ConfigEntry<float> ChargeDelay; public static ConfigEntry<float> ChargeTime; public static ConfigEntry<float> ChargeShake; public static ConfigEntry<bool> PunchEnabled; public static ConfigEntry<KeyCode> PunchKey; public static ConfigEntry<float> PunchDamage; public static ConfigEntry<float> PunchRadius; public static ConfigEntry<float> PunchReach; public static ConfigEntry<float> PunchKnockback; public static ConfigEntry<bool> PunchLeftClick; public static ConfigEntry<bool> PunchEmpowerWeapons; public static ConfigEntry<float> PunchWorldMultiplier; public static ConfigEntry<float> PunchCooldown; public static ConfigEntry<float> PunchShake; public static ConfigEntry<string> PunchImpactEffects; public static ConfigEntry<float> PunchChargeMaxPower; public static ConfigEntry<bool> PunchDash; public static ConfigEntry<float> PunchDashRange; public static ConfigEntry<float> PunchDashSpeed; public static ConfigEntry<bool> SlamEnabled; public static ConfigEntry<float> SlamChargeCrater; public static ConfigEntry<float> SlamChargePower; public static ConfigEntry<float> SlamDiveSpeed; public static ConfigEntry<float> SlamMinDiveAngle; public static ConfigEntry<float> SlamLeapSpeed; public static ConfigEntry<float> SlamRadius; public static ConfigEntry<float> SlamDamage; public static ConfigEntry<float> SlamKnockback; public static ConfigEntry<bool> SlamDamageStructures; public static ConfigEntry<float> SlamRecoverTime; public static ConfigEntry<float> SlamCooldown; public static ConfigEntry<float> SlamShake; public static ConfigEntry<string> SlamImpactEffects; public static ConfigEntry<float> SlamMaxPower; public static ConfigEntry<bool> SlamCrash; public static ConfigEntry<float> SlamCrashMinSpeed; public static ConfigEntry<float> SlamCrashMinAngle; public static ConfigEntry<bool> SlamCraters; public static ConfigEntry<float> SlamCraterMinSpeed; public static ConfigEntry<float> SlamCraterFullSpeed; public static ConfigEntry<float> SlamCraterMaxDepth; public static ConfigEntry<float> SlamCraterMaxRadius; public static ConfigEntry<bool> SlamCraterNearBuildings; public static ConfigEntry<bool> LaserEnabled; public static ConfigEntry<float> LaserDps; public static ConfigEntry<float> LaserRange; public static ConfigEntry<float> LaserPush; public static ConfigEntry<bool> LaserDamageStructures; public static ConfigEntry<bool> LaserSlice; public static ConfigEntry<float> LaserSliceLifetime; public static ConfigEntry<string> LaserGoreEffects; public static ConfigEntry<string> LaserSliceEffects; public static ConfigEntry<bool> LaserDig; public static ConfigEntry<float> LaserDigRadius; public static ConfigEntry<float> LaserDigMaxRadius; public static ConfigEntry<float> LaserDigDepthPerSecond; public static ConfigEntry<bool> LaserDigNearBuildings; public static ConfigEntry<float> LaserBeamWidth; public static ConfigEntry<string> LaserImpactEffects; public static ConfigEntry<string> LaserSound; public static ConfigEntry<bool> EyesEnabled; public static ConfigEntry<float> EyesSize; public static ConfigEntry<float> EyesGlow; public static ConfigEntry<bool> CapeSyncWithPose; public static ConfigEntry<float> CapeFlightWind; public static ConfigEntry<float> CapeFlightWindFullSpeed; public static ConfigEntry<float> CapeFlightWindCarry; public static ConfigEntry<float> CapeFlightWindFlutter; public static ConfigEntry<float> CapeHoverBreeze; public static ConfigEntry<bool> CapeHoverBreezeFollowsWind; public static ConfigEntry<float> CapeHoverBreezeFlutter; public static ConfigEntry<bool> CapeHoverBreezeOnGround; public static ConfigEntry<bool> WheelEnabled; public static ConfigEntry<KeyCode> WheelKey; public static ConfigEntry<float> WheelHoldTime; public static ConfigEntry<bool> WheelOnlyWhenIdle; public static ConfigEntry<Ability> WheelSelected; public static ConfigEntry<bool> WheelShowSelected; public static ConfigEntry<bool> SuperSpeedEnabled; public static ConfigEntry<float> SuperSpeedWorld; public static ConfigEntry<float> SuperSpeedFade; public static ConfigEntry<float> SuperSpeedRunBoost; public static ConfigEntry<float> SuperSpeedFlightBoost; public static ConfigEntry<bool> SuperSpeedFreeStamina; public static ConfigEntry<bool> SuperSpeedLines; public static ConfigEntry<bool> ThrowEnabled; public static ConfigEntry<float> ThrowGrabRange; public static ConfigEntry<float> ThrowSpeed; public static ConfigEntry<float> ThrowChargeSpeed; public static ConfigEntry<float> ThrowDamage; public static ConfigEntry<bool> ThrowCraters; public static ConfigEntry<float> ThrowCraterScale; public static ConfigEntry<bool> ThrowDamageStructures; public static ConfigEntry<bool> ThrowBosses; public static ConfigEntry<bool> ThrowTamed; public static ConfigEntry<float> ThrowSpin; public static ConfigEntry<bool> ThrowProps; public static ConfigEntry<float> ThrowMaxPropSize; public static ConfigEntry<bool> ComboEnabled; public static ConfigEntry<float> ComboRange; public static ConfigEntry<int> ComboPunches; public static ConfigEntry<float> ComboPunchRate; public static ConfigEntry<bool> ComboGameAttacks; public static ConfigEntry<float> ComboDamage; public static ConfigEntry<float> ComboKnockback; public static ConfigEntry<float> ComboRadius; public static ConfigEntry<float> ComboBeat; public static ConfigEntry<bool> ComboDebris; public static ConfigEntry<float> ComboDashBoost; public static ConfigEntry<float> ComboCooldown; public static ConfigEntry<bool> LandingEnabled; public static ConfigEntry<float> LandingMinHeight; public static ConfigEntry<bool> LandingNoFallDamage; public static ConfigEntry<float> LandingMinSpeed; public static ConfigEntry<bool> LandingCrater; public static ConfigEntry<float> LandingCraterRadius; public static ConfigEntry<float> LandingCraterDepth; public static ConfigEntry<float> LandingHold; public static ConfigEntry<string> LandingEffects; public static ConfigEntry<float> LandingEffectScale; public static ConfigEntry<float> LandingShake; public static ConfigEntry<bool> JumpEnabled; public static ConfigEntry<float> JumpHeight; public static ConfigEntry<float> JumpForward; public static ConfigEntry<float> JumpTapTime; public static ConfigEntry<bool> JumpCrater; public static ConfigEntry<float> JumpCraterRadius; public static ConfigEntry<float> JumpCraterDepth; public static ConfigEntry<string> JumpEffects; public static ConfigEntry<float> JumpEffectScale; public static ConfigEntry<bool> TrinketEnabled; public static ConfigEntry<bool> TrinketOnly; public static ConfigEntry<string> TrinketName; public static ConfigEntry<string> TrinketDescription; public static ConfigEntry<bool> TrinketOceanDestroys; public static ConfigEntry<bool> SummonEnabled; public static ConfigEntry<string> SummonPhrase; public static ConfigEntry<bool> SummonAnyBiome; public static ConfigEntry<bool> SummonShoutOnly; public static ConfigEntry<CallAgain> SummonCallAgain; public static ConfigEntry<bool> SummonEditScript; public static ConfigEntry<bool> SummonDestruction; public static ConfigEntry<bool> SummonStartNow; public static ConfigEntry<int> DefaultsApplied; public static ConfigEntry<bool> LogFlightPhases; public static ConfigEntry<bool> LogPoseGeometry; public static ConfigEntry<bool> ShotEnabled; public static ConfigEntry<float> ShotDelay; public static ConfigEntry<int> ShotMaxPerSession; public static ConfigEntry<int> ShotKeep; public static ConfigEntry<bool> ShotEvents; public static ConfigEntry<bool> StudioEnabled; public static ConfigEntry<KeyCode> StudioToggleKey; public static ConfigEntry<bool> UseLegacyApplicator; public static ConfigEntry<bool> PreviewEnabled; public static ConfigEntry<bool> PoseLabEnabled; public static ConfigEntry<bool> DevTools; public static ConfigEntry<KeyCode> PoseLabDumpKey; public static ConfigEntry<bool> FlyHeadFollowsCamera; public static ConfigEntry<bool> PoseSway; public static ConfigEntry<float> PoseSwayAmount; public static List<PoseBoneConfig> PoseBones; private static ConfigFile _file; private static float _dirtyAt = -1f; private const float SaveDebounceSeconds = 1f; private const int DefaultsRevision = 4; public static void TickSave() { if (!(_dirtyAt < 0f) && !(Time.unscaledTime - _dirtyAt < 1f)) { FlushSave(); } } public static void FlushSave() { if (_dirtyAt < 0f || _file == null) { return; } _dirtyAt = -1f; try { _file.Save(); } catch (Exception arg) { ManualLogSource log = SuperVikingPlugin.Log; if (log != null) { log.LogError((object)$"ModConfig: .cfg save failed. {arg}"); } } } public static void Init(ConfigFile cfg) { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Expected O, but got Unknown //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Expected O, but got Unknown //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Expected O, but got Unknown //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Expected O, but got Unknown //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Expected O, but got Unknown //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Expected O, but got Unknown //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Expected O, but got Unknown //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0619: Expected O, but got Unknown //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Expected O, but got Unknown //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Expected O, but got Unknown //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Expected O, but got Unknown //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Expected O, but got Unknown //IL_0793: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Expected O, but got Unknown //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Expected O, but got Unknown //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Expected O, but got Unknown //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Expected O, but got Unknown //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Expected O, but got Unknown //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Expected O, but got Unknown //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Expected O, but got Unknown //IL_0951: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Expected O, but got Unknown //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Expected O, but got Unknown //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0a38: Expected O, but got Unknown //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Expected O, but got Unknown //IL_0a9e: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Expected O, but got Unknown //IL_0af5: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Expected O, but got Unknown //IL_0b2d: Unknown result type (might be due to invalid IL or missing references) //IL_0b37: Expected O, but got Unknown //IL_0b65: Unknown result type (might be due to invalid IL or missing references) //IL_0b6f: Expected O, but got Unknown //IL_0b9d: Unknown result type (might be due to invalid IL or missing references) //IL_0ba7: Expected O, but got Unknown //IL_0bf0: Unknown result type (might be due to invalid IL or missing references) //IL_0bfa: Expected O, but got Unknown //IL_0c28: Unknown result type (might be due to invalid IL or missing references) //IL_0c32: Expected O, but got Unknown //IL_0c7b: Unknown result type (might be due to invalid IL or missing references) //IL_0c85: Expected O, but got Unknown //IL_0cb3: Unknown result type (might be due to invalid IL or missing references) //IL_0cbd: Expected O, but got Unknown //IL_0ceb: Unknown result type (might be due to invalid IL or missing references) //IL_0cf5: Expected O, but got Unknown //IL_0d23: Unknown result type (might be due to invalid IL or missing references) //IL_0d2d: Expected O, but got Unknown //IL_0d5b: Unknown result type (might be due to invalid IL or missing references) //IL_0d65: Expected O, but got Unknown //IL_0d93: Unknown result type (might be due to invalid IL or missing references) //IL_0d9d: Expected O, but got Unknown //IL_0dcb: Unknown result type (might be due to invalid IL or missing references) //IL_0dd5: Expected O, but got Unknown //IL_0e03: Unknown result type (might be due to invalid IL or missing references) //IL_0e0d: Expected O, but got Unknown //IL_0e56: Unknown result type (might be due to invalid IL or missing references) //IL_0e60: Expected O, but got Unknown //IL_0e8e: Unknown result type (might be due to invalid IL or missing references) //IL_0e98: Expected O, but got Unknown //IL_0ec6: Unknown result type (might be due to invalid IL or missing references) //IL_0ed0: Expected O, but got Unknown //IL_0f1d: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Expected O, but got Unknown //IL_0f70: Unknown result type (might be due to invalid IL or missing references) //IL_0f7a: Expected O, but got Unknown //IL_0fa8: Unknown result type (might be due to invalid IL or missing references) //IL_0fb2: Expected O, but got Unknown //IL_0ffb: Unknown result type (might be due to invalid IL or missing references) //IL_1005: Expected O, but got Unknown //IL_1033: Unknown result type (might be due to invalid IL or missing references) //IL_103d: Expected O, but got Unknown //IL_106b: Unknown result type (might be due to invalid IL or missing references) //IL_1075: Expected O, but got Unknown //IL_10a3: Unknown result type (might be due to invalid IL or missing references) //IL_10ad: Expected O, but got Unknown //IL_1111: Unknown result type (might be due to invalid IL or missing references) //IL_111b: Expected O, but got Unknown //IL_1149: Unknown result type (might be due to invalid IL or missing references) //IL_1153: Expected O, but got Unknown //IL_1181: Unknown result type (might be due to invalid IL or missing references) //IL_118b: Expected O, but got Unknown //IL_11ef: Unknown result type (might be due to invalid IL or missing references) //IL_11f9: Expected O, but got Unknown //IL_1280: Unknown result type (might be due to invalid IL or missing references) //IL_128a: Expected O, but got Unknown //IL_12b8: Unknown result type (might be due to invalid IL or missing references) //IL_12c2: Expected O, but got Unknown //IL_12f0: Unknown result type (might be due to invalid IL or missing references) //IL_12fa: Expected O, but got Unknown //IL_1343: Unknown result type (might be due to invalid IL or missing references) //IL_134d: Expected O, but got Unknown //IL_13d4: Unknown result type (might be due to invalid IL or missing references) //IL_13de: Expected O, but got Unknown //IL_140c: Unknown result type (might be due to invalid IL or missing references) //IL_1416: Expected O, but got Unknown //IL_145f: Unknown result type (might be due to invalid IL or missing references) //IL_1469: Expected O, but got Unknown //IL_1497: Unknown result type (might be due to invalid IL or missing references) //IL_14a1: Expected O, but got Unknown //IL_14cf: Unknown result type (might be due to invalid IL or missing references) //IL_14d9: Expected O, but got Unknown //IL_1507: Unknown result type (might be due to invalid IL or missing references) //IL_1511: Expected O, but got Unknown //IL_153f: Unknown result type (might be due to invalid IL or missing references) //IL_1549: Expected O, but got Unknown //IL_1592: Unknown result type (might be due to invalid IL or missing references) //IL_159c: Expected O, but got Unknown //IL_161c: Unknown result type (might be due to invalid IL or missing references) //IL_1626: Expected O, but got Unknown //IL_16c0: Unknown result type (might be due to invalid IL or missing references) //IL_16ca: Expected O, but got Unknown //IL_16f8: Unknown result type (might be due to invalid IL or missing references) //IL_1702: Expected O, but got Unknown //IL_1730: Unknown result type (might be due to invalid IL or missing references) //IL_173a: Expected O, but got Unknown //IL_1768: Unknown result type (might be due to invalid IL or missing references) //IL_1772: Expected O, but got Unknown //IL_17f1: Unknown result type (might be due to invalid IL or missing references) //IL_17fb: Expected O, but got Unknown //IL_1829: Unknown result type (might be due to invalid IL or missing references) //IL_1833: Expected O, but got Unknown //IL_1861: Unknown result type (might be due to invalid IL or missing references) //IL_186b: Expected O, but got Unknown //IL_1899: Unknown result type (might be due to invalid IL or missing references) //IL_18a3: Expected O, but got Unknown //IL_18ec: Unknown result type (might be due to invalid IL or missing references) //IL_18f6: Expected O, but got Unknown //IL_1975: Unknown result type (might be due to invalid IL or missing references) //IL_197f: Expected O, but got Unknown //IL_19c8: Unknown result type (might be due to invalid IL or missing references) //IL_19d2: Expected O, but got Unknown //IL_1a1b: Unknown result type (might be due to invalid IL or missing references) //IL_1a25: Expected O, but got Unknown //IL_1a49: Unknown result type (might be due to invalid IL or missing references) //IL_1a53: Expected O, but got Unknown //IL_1a81: Unknown result type (might be due to invalid IL or missing references) //IL_1a8b: Expected O, but got Unknown //IL_1ad4: Unknown result type (might be due to invalid IL or missing references) //IL_1ade: Expected O, but got Unknown //IL_1b0c: Unknown result type (might be due to invalid IL or missing references) //IL_1b16: Expected O, but got Unknown //IL_1b44: Unknown result type (might be due to invalid IL or missing references) //IL_1b4e: Expected O, but got Unknown //IL_1b7c: Unknown result type (might be due to invalid IL or missing references) //IL_1b86: Expected O, but got Unknown //IL_1bcf: Unknown result type (might be due to invalid IL or missing references) //IL_1bd9: Expected O, but got Unknown //IL_1c07: Unknown result type (might be due to invalid IL or missing references) //IL_1c11: Expected O, but got Unknown //IL_1c5a: Unknown result type (might be due to invalid IL or missing references) //IL_1c64: Expected O, but got Unknown //IL_1cad: Unknown result type (might be due to invalid IL or missing references) //IL_1cb7: Expected O, but got Unknown //IL_1d00: Unknown result type (might be due to invalid IL or missing references) //IL_1d0a: Expected O, but got Unknown //IL_1d38: Unknown result type (might be due to invalid IL or missing references) //IL_1d42: Expected O, but got Unknown //IL_1d70: Unknown result type (might be due to invalid IL or missing references) //IL_1d7a: Expected O, but got Unknown //IL_1dc7: Unknown result type (might be due to invalid IL or missing references) //IL_1dd1: Expected O, but got Unknown //IL_1dff: Unknown result type (might be due to invalid IL or missing references) //IL_1e09: Expected O, but got Unknown //IL_1e52: Unknown result type (might be due to invalid IL or missing references) //IL_1e5c: Expected O, but got Unknown //IL_1e8a: Unknown result type (might be due to invalid IL or missing references) //IL_1e94: Expected O, but got Unknown //IL_1ec2: Unknown result type (might be due to invalid IL or missing references) //IL_1ecc: Expected O, but got Unknown //IL_1f15: Unknown result type (might be due to invalid IL or missing references) //IL_1f1f: Expected O, but got Unknown //IL_1f4d: Unknown result type (might be due to invalid IL or missing references) //IL_1f57: Expected O, but got Unknown //IL_1fa4: Unknown result type (might be due to invalid IL or missing references) //IL_1fae: Expected O, but got Unknown _file = cfg; SuperModeKey = cfg.Bind<KeyCode>("Activation", "ToggleKey", (KeyCode)112, "Key that switches the powers on and off without the ring. Does NOTHING unless [Trinket] Only is switched off - by default the ring is the only switch."); SuperModeRequireCtrl = cfg.Bind<bool>("Activation", "RequireCtrl", true, "Require holding Ctrl with the toggle key (default chord = Ctrl+P)."); SuperProtection = cfg.Bind<Protection>("Activation", "Protection", Protection.Invulnerable, "While your powers are on. Invulnerable (default) = nothing hurts you: no damage, no stagger, no knock-back, no burning or poison - and you cannot die. CannotDie = like the game's own god mode: you are hurt and knocked about, but your health never drops below 1. Off = you can be hurt and killed like anyone."); SuppressInputWhenConfigMenuOpen = cfg.Bind<bool>("Input", "SuppressInputWhenConfigMenuOpen", true, "While the F1 ConfigurationManager window is open, stop the game receiving input (clicking a slider would otherwise also swing your weapon, and would kill a frozen emote preview). Mirrors what the vanilla Escape menu does. NEVER causes fall damage. HOVER: you hang still - this is the posture to tune sliders in. SUPER-FLIGHT: you keep cruising straight ahead, unsteerable, until you close the menu - drop to Hover (double-tap S) BEFORE opening F1. Also silences the mod's own keys while open (Ctrl+P, F7): close the menu to use them."); FlightEnabled = cfg.Bind<bool>("Flight", "Enabled", true, "Master toggle for flight. When off, normal jumping returns."); HoverSpeed = cfg.Bind<float>("Flight", "HoverSpeed", 5f, new ConfigDescription("Drift speed (m/s) when nudging W/A/S/D while hovering.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 20f), Array.Empty<object>())); VerticalSpeed = cfg.Bind<float>("Flight", "VerticalSpeed", 5f, new ConfigDescription("Up/down speed (m/s): hold Jump to rise, Crouch to descend (hover).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 20f), Array.Empty<object>())); LiftoffSpeed = cfg.Bind<float>("Flight", "LiftoffSpeed", 4f, new ConfigDescription("Initial upward nudge (m/s) when you lift off into hover.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 15f), Array.Empty<object>())); CruiseStartSpeed = cfg.Bind<float>("SuperFlight", "StartSpeed", 8f, new ConfigDescription("Forward cruise speed (m/s) right after double-tapping W.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(2f, 40f), Array.Empty<object>())); CruiseMaxSpeed = cfg.Bind<float>("SuperFlight", "MaxSpeed", 22f, new ConfigDescription("Max forward cruise speed (m/s) when holding W. Kept slow for now.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 80f), Array.Empty<object>())); CruiseAccel = cfg.Bind<float>("SuperFlight", "Accel", 8f, new ConfigDescription("How fast cruise speed changes (m/s per second) while holding W (faster) or S (slower).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 40f), Array.Empty<object>())); FastFlyMultiplier = cfg.Bind<float>("SuperFlight", "FastFlyMultiplier", 3f, new ConfigDescription("Hold Run (Shift) while cruising to multiply the max speed by this. At 3 with the default 22 m/s cruise that is 66 m/s (what the owner flies with); at 5 it is 110 m/s — genuinely fast. Watch for zone streaming at the very top end (Valheim loads at most one zone per 0.1s).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); CruisePitchFollow = cfg.Bind<float>("SuperFlight", "PitchFollow", 1f, new ConfigDescription("How much the body points the way it is flying. 1 = fly straight up and he is vertical, head first; dive and he goes head-down. 0 = always level (the old look).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>())); CruiseBank = cfg.Bind<float>("SuperFlight", "Bank", 0.6f, new ConfigDescription("How hard the body rolls into a turn: degrees of bank per degree-per-second of turn, up to 60 degrees. 0 = never banks.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1.5f), Array.Empty<object>())); BarrelRoll = cfg.Bind<bool>("SuperFlight", "BarrelRoll", true, "Double-tap A or D in Super-Flight for a barrel roll to that side."); BarrelRollTime = cfg.Bind<float>("SuperFlight", "BarrelRollTime", 0.7f, new ConfigDescription("Seconds one barrel roll takes.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.3f, 2f), Array.Empty<object>())); BarrelRollDodge = cfg.Bind<float>("SuperFlight", "BarrelRollDodge", 6f, new ConfigDescription("Peak sideways speed (m/s) during a barrel roll, so it also side-steps. 0 = the roll is only for show.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 30f), Array.Empty<object>())); AutoRollTurnRate = cfg.Bind<float>("SuperFlight", "AutoRollTurnRate", 140f, new ConfigDescription("Throw him into a really hard turn (this many degrees per second or more, held for a moment) and he barrel-rolls through it without being asked. At most once every few seconds, and it is only for show - no side-step. 0 = never.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 360f), Array.Empty<object>())); DoubleTapWindow = cfg.Bind<float>("Flight", "DoubleTapWindow", 0.3f, new ConfigDescription("Max seconds between two presses to count as a double-tap.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 0.6f), Array.Empty<object>())); TurnSpeed = cfg.Bind<float>("Flight", "TurnSpeed", 360f, new ConfigDescription("How fast (deg/sec) the body turns to face travel / look direction.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(90f, 720f), Array.Empty<object>())); FreeLookInHover = cfg.Bind<bool>("Flight", "FreeLookInHover", true, "While hovering with no movement input, keep facing where you are and let the camera orbit freely — so you can swing round and look at your own pose. Off = the body turns to face wherever the camera looks (you can never get in front of yourself)."); FlightAccelTime = cfg.Bind<float>("Flight", "AccelTime", 0.35f, new ConfigDescription("Seconds to build up to full speed. Higher = heavier, more of a run-up. 0 = the old instant, boxy response.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 2f), Array.Empty<object>())); FlightDecelTime = cfg.Bind<float>("Flight", "DecelTime", 0.7f, new ConfigDescription("Seconds to coast back down when you let go. Higher = more glide. 0 = stop dead in the air.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3f), Array.Empty<object>())); HoverBoost = cfg.Bind<float>("Flight", "HoverBoost", 3f, new ConfigDescription("Hold Run (Shift) while hovering to multiply drift and climb speed by this.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); HoverBoostRamp = cfg.Bind<float>("Flight", "HoverBoostRamp", 1.2f, new ConfigDescription("With Shift held while hovering, keep holding a direction and the boosted drift builds on to this many times HoverBoost (over HoverRampTime seconds). 1.2 = up to 20% faster. 1 = Shift is one fixed speed, as it was. Hovering without Shift is not changed by this.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 2f), Array.Empty<object>())); LookAround = cfg.Bind<bool>("Flight", "LookAround", true, "Hold the look-around key while flying and the camera turns freely while he keeps going the way he was going. Works in hover and in Super-Flight."); LookAroundKey = cfg.Bind<KeyCode>("Flight", "LookAroundKey", (KeyCode)99, "Key to hold for looking around in flight. C is also the game's walk toggle; while you are in the air the mod keeps it from switching walk on and off."); LookAroundReturn = cfg.Bind<bool>("Flight", "LookAroundReturn", true, "On: letting go of the look-around key swings the camera back to the way you are flying. Off: the camera stays where you left it, and he turns to fly that way."); HoverRampMax = cfg.Bind<float>("Flight", "HoverRampMax", 2f, new ConfigDescription("Keep holding a direction while hovering and the drift builds up to this many times HoverSpeed. 1 = off. (Shift still gives its full boost at once.)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5f), Array.Empty<object>())); HoverRampTime = cfg.Bind<float>("Flight", "HoverRampTime", 3f, new ConfigDescription("Seconds of holding a direction for the hover drift to reach HoverRampMax. Let go and it winds back down three times as fast.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.5f, 10f), Array.Empty<object>())); HoverLean = cfg.Bind<float>("Flight", "HoverLean", 12f, new ConfigDescription("Degrees the body leans into the direction it is drifting while hovering (at full drift speed). 0 = stays bolt upright.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 35f), Array.Empty<object>())); PoseBlendTime = cfg.Bind<float>("Flight", "PoseBlendTime", 0.25f, new ConfigDescription("Seconds one flight pose takes to melt into the next (crouch, launch, hover, flight, landing). 0 = snap from pose to pose, as it used to.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>())); ExitGlideTime = cfg.Bind<float>("Flight", "ExitGlideTime", 0.6f, new ConfigDescription("Seconds to bleed off the speed you carry when flight ends IN MID-AIR (double-tap Space, Super Mode off). Valheim applies no air drag at all with no key held, so without this an exit at 110 m/s stays at 110 m/s for the whole fall — about 220 m of travel from 20 m up. 0 = keep the full uncapped fling. Landing on the ground still stops you outright; this only shapes the airborne carry.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3f), Array.Empty<object>())); SpeedFovKick = cfg.Bind<float>("Flight", "SpeedFovKick", 14f, new ConfigDescription("Extra camera field-of-view (degrees) at top speed, easing in with how fast you are actually going. Sells speed without any custom assets. 0 = off.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 40f), Array.Empty<object>())); SpeedTrail = cfg.Bind<bool>("Flight", "SpeedTrail", true, "Streaks off the hands and feet once you are moving fast. Uses a material harvested from effects already running in the game (the mod ships no assets) — if none is found it stays off and says so in the log rather than drawing a magenta stripe."); SpeedTrailStartSpeed = cfg.Bind<float>("Flight", "SpeedTrailStartSpeed", 12f, new ConfigDescription("Speed (m/s) the streaks start appearing at. They grow to about half strength at normal Super-Flight speed and full strength with Shift held.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), Array.Empty<object>())); SpeedTrailHands = cfg.Bind<bool>("Flight", "SpeedTrailHands", false, "In flight the streaks come off the hands as well as the feet. Off (default): the feet only."); CalmFlightAnim = cfg.Bind<bool>("Flight", "CalmFlightAnim", true, "While flying, tell the animator you are not moving on foot. Stops Valheim blending a walk/run cycle underneath your flight pose — which otherwise shifts the body about and plays FOOTSTEP SOUNDS in mid-air. Off = the old behaviour."); LiftDuration = cfg.Bind<float>("Flight", "LiftDuration", 0.35f, new ConfigDescription("Seconds of gentle rise when you lift off into hover.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>())); ChargedTakeoff = cfg.Bind<bool>("Takeoff", "Charged", true, "Hold Space to charge a launch (longer hold = higher), release to shoot up into hover. Off = instant lift."); ChargeMaxTime = cfg.Bind<float>("Takeoff", "ChargeMaxTime", 1.5f, new ConfigDescription("Seconds to hold Space for a full-power launch.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.3f, 4f), Array.Empty<object>())); MaxLaunchHeight = cfg.Bind<float>("Takeoff", "MaxHeight", 25f, new ConfigDescription("Height (m) you reach at full charge.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 60f), Array.Empty<object>())); LaunchSpeed = cfg.Bind<float>("Takeoff", "LaunchSpeed", 25f, new ConfigDescription("How fast (m/s) you shoot upward on release.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 60f), Array.Empty<object>())); ChargeVibrate = cfg.Bind<float>("Takeoff", "Vibrate", 0.06f, new ConfigDescription("Character vibration amplitude (m) while charging.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.3f), Array.Empty<object>())); LaunchPoseHold = cfg.Bind<float>("Takeoff", "LaunchPoseHold", 1f, new ConfigDescription("Minimum seconds the Launch pose stays up after takeoff, so it's actually visible (the physical rise can be near-instant).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3f), Array.Empty<object>())); TakeoffShockwaveAfter = cfg.Bind<float>("Takeoff", "ShockwaveAfter", 2f, new ConfigDescription("Hold Space this many seconds or more before letting go, and the takeoff leaves a shockwave at your feet - the same one a superhero landing makes ([Landing] Effects). 0 = never.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 10f), Array.Empty<object>())); TakeoffShockwaveCrater = cfg.Bind<bool>("Takeoff", "ShockwaveCrater", false, "That takeoff also leaves the landing's small dent in the ground. Never next to buildings."); ChargeEnabled = cfg.Bind<bool>("Charge", "Enabled", true, "Hold left click to charge the Super Punch or the Ground Slam, and let go to throw it: the longer the hold, the harder it hits, and he trembles while it builds. A quick click throws it at normal strength. Off = both fire the moment you click, as they did before, and cannot be charged."); ChargeDelay = cfg.Bind<float>("Charge", "Delay", 0.25f, new ConfigDescription("Seconds a hold must last before it starts charging (so a click is still just a click).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.05f, 1f), Array.Empty<object>())); ChargeTime = cfg.Bind<float>("Charge", "Time", 1.5f, new ConfigDescription("Seconds of charging to reach full power. Keep holding after that and it stays at full until you let go.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.3f, 6f), Array.Empty<object>())); ChargeShake = cfg.Bind<float>("Charge", "Shake", 0.05f, new ConfigDescription("How hard he trembles at full charge (metres). 0 = he holds still.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.3f), Array.Empty<object>())); PunchEnabled = cfg.Bind<bool>("Punch", "Enabled", true, "Master toggle for Super Punch."); PunchKey = cfg.Bind<KeyCode>("Punch", "Key", (KeyCode)118, "Key to throw a Super Punch (Super Mode must be on)."); PunchDamage = cfg.Bind<float>("Punch", "Damage", 150f, new ConfigDescription("Punch damage to creatures and buildings (generic + blunt). Trees and rocks take this times WorldMultiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 2000f), Array.Empty<object>())); PunchLeftClick = cfg.Bind<bool>("Punch", "LeftClick", true, "Left click throws the Super Punch: on the ground whenever you swing your FISTS (the game's own punch animation, with the super strike landing as it connects), and in the air on every click - while hovering, at the spot under the crosshair ([Punch] Dash). Hold the click to charge it ([Charge]). Off = only the Punch key."); PunchEmpowerWeapons = cfg.Bind<bool>("Punch", "EmpowerWeapons", false, "On: weapon swings carry the super strike as well, not just bare fists. Off (default) keeps an axe an axe."); PunchWorldMultiplier = cfg.Bind<float>("Punch", "WorldMultiplier", 10f, new ConfigDescription("Trees and rocks take Damage times this as chop / pickaxe damage. At the defaults that is 1500 - one punch fells any tree and breaks any rock.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 50f), Array.Empty<object>())); PunchCooldown = cfg.Bind<float>("Punch", "Cooldown", 0.3f, new ConfigDescription("Seconds between punches thrown with the key or in flight. (Ground punches follow the game's own punch timing.)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3f), Array.Empty<object>())); PunchShake = cfg.Bind<float>("Punch", "Shake", 0.25f, new ConfigDescription("Camera shake when a punch connects. 0 = none.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1.5f), Array.Empty<object>())); PunchImpactEffects = cfg.Bind<string>("Punch", "ImpactEffects", "sfx_sledge_hit,vfx_clubhit", "Vanilla effect prefabs spawned where a punch lands, comma-separated (names from the game's own files). Empty = none."); PunchRadius = cfg.Bind<float>("Punch", "Radius", 3f, new ConfigDescription("Radius (m) of the strike sphere in front of you.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); PunchReach = cfg.Bind<float>("Punch", "Reach", 2f, new ConfigDescription("How far (m) in front of the chest the strike sphere is centred.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 6f), Array.Empty<object>())); PunchKnockback = cfg.Bind<float>("Punch", "Knockback", 80f, new ConfigDescription("Push force applied to anything the punch hits (scaled by target mass).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 500f), Array.Empty<object>())); PunchChargeMaxPower = cfg.Bind<float>("Punch", "ChargeMaxPower", 3f, new ConfigDescription("A fully charged punch does this many times the damage and knockback, over a wider area. 1 = charging adds nothing.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>())); PunchDash = cfg.Bind<bool>("Punch", "Dash", true, "While hovering, left click a spot - on the ground, a creature, a tree, a rock - and he flies there and punches it. It hits whatever is around the spot; it does not dig. Off = the punch always lands right in front of him."); PunchDashRange = cfg.Bind<float>("Punch", "DashRange", 60f, new ConfigDescription("How far away (m) the spot you click may be. Further than this, he punches where he is.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 200f), Array.Empty<object>())); PunchDashSpeed = cfg.Bind<float>("Punch", "DashSpeed", 70f, new ConfigDescription("How fast (m/s) he flies to the spot.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(15f, 150f), Array.Empty<object>())); SlamEnabled = cfg.Bind<bool>("Slam", "Enabled", true, "Master toggle for the Ground Slam. To slam: choose GROUND SLAM on the ability wheel (hold E), then left click - hold to charge it. In the air he dives where you look; on the ground he hops up, then comes down. It has no key of its own."); SlamChargeCrater = cfg.Bind<float>("Slam", "ChargeCrater", 3f, new ConfigDescription("A fully charged slam digs a crater this many times as wide and as deep as the same slam uncharged (half a charge: twice). The game still stops digging at 8 m deep, and the crater stops at 48 m across. 1 = charging does not change the crater.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 4f), Array.Empty<object>())); SlamChargePower = cfg.Bind<float>("Slam", "ChargePower", 2f, new ConfigDescription("A fully charged slam does this many times the damage, over this many times the radius. 1 = charging does not change the hit.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 4f), Array.Empty<object>())); SlamDiveSpeed = cfg.Bind<float>("Slam", "DiveSpeed", 60f, new ConfigDescription("Top speed of the dive (m/s). A slower arrival hits softer and narrower.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(20f, 120f), Array.Empty<object>())); SlamMinDiveAngle = cfg.Bind<float>("Slam", "MinDiveAngle", 50f, new ConfigDescription("The dive is never shallower than this many degrees below level, however high you look. Look steeper and it follows you; look straight down for a slam on the spot.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(20f, 90f), Array.Empty<object>())); SlamLeapSpeed = cfg.Bind<float>("Slam", "LeapSpeed", 14f, new ConfigDescription("Upward speed (m/s) of the hop when you slam from the ground. 0 = no hop, stomp where you stand.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 30f), Array.Empty<object>())); SlamRadius = cfg.Bind<float>("Slam", "Radius", 8f, new ConfigDescription("Radius (m) of a full-speed impact.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(2f, 20f), Array.Empty<object>())); SlamDamage = cfg.Bind<float>("Slam", "Damage", 300f, new ConfigDescription("Damage of a full-speed impact (generic + blunt; chop/pickaxe scaled x4 so trees and rocks break too).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 3000f), Array.Empty<object>())); SlamKnockback = cfg.Bind<float>("Slam", "Knockback", 160f, new ConfigDescription("Push force applied to anything the slam hits, away from the impact.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 600f), Array.Empty<object>())); SlamDamageStructures = cfg.Bind<bool>("Slam", "DamageStructures", true, "On (default): the slam smashes buildings too - walls, roofs, stone, yours or anyone's. Off: built pieces are immune, so slamming next to your own base does not flatten it."); SlamRecoverTime = cfg.Bind<float>("Slam", "RecoverTime", 0.6f, new ConfigDescription("Seconds you stay planted after the impact. This is the beat the Slam-landing pose is held for.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 2f), Array.Empty<object>())); SlamCooldown = cfg.Bind<float>("Slam", "Cooldown", 0.5f, new ConfigDescription("Seconds after recovering before you can slam again.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 10f), Array.Empty<object>())); SlamShake = cfg.Bind<float>("Slam", "Shake", 0.7f, new ConfigDescription("Camera shake on impact. The number is roughly how many seconds it lasts. 0 = none.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 2f), Array.Empty<object>())); SlamImpactEffects = cfg.Bind<string>("Slam", "ImpactEffects", "fx_dragon_land,vfx_gdking_stomp", "Vanilla effect prefabs spawned at the impact point, comma-separated (names from the game's own files). Others that work: fx_goblinbrute_groundslam, vfx_troll_groundslam, vfx_lox_groundslam, vfx_RockDestroyed_large. Empty = none."); SlamMaxPower = cfg.Bind<float>("Slam", "MaxPower", 2f, new ConfigDescription("A dive keeps gathering speed the longer it falls, up to DiveSpeed times this, and the impact (size, damage, shake, effects) grows with it. 1 = every full dive hits the same.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 3f), Array.Empty<object>())); SlamCrash = cfg.Bind<bool>("Slam", "CrashSlam", true, "Flying fast and steeply into the ground in Super-Flight is a slam too, sized by how fast you were going. Off = hitting the ground just drops you back to a hover, as before."); SlamCrashMinSpeed = cfg.Bind<float>("Slam", "CrashMinSpeed", 18f, new ConfigDescription("Slowest speed (m/s) at which meeting the ground in Super-Flight counts as a slam.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 120f), Array.Empty<object>())); SlamCrashMinAngle = cfg.Bind<float>("Slam", "CrashMinAngle", 35f, new ConfigDescription("Shallowest dive (degrees below level) that counts as a slam. Shallower than this is a landing.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(10f, 85f), Array.Empty<object>())); SlamCraters = cfg.Bind<bool>("Slam", "Craters", true, "An impact blows a crater in the ground, sized by how fast you arrived. PERMANENT: the hole is saved into the world like one dug by hand - slam in a test world unless you want to keep it. Off = no digging."); SlamCraterMinSpeed = cfg.Bind<float>("Slam", "CraterMinSpeed", 25f, new ConfigDescription("Arrive slower than this (m/s) and the ground is left alone. A hop-and-stomp from standing lands at about 15, so it never digs.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(5f, 120f), Array.Empty<object>())); SlamCraterFullSpeed = cfg.Bind<float>("Slam", "CraterFullSpeed", 0f, new ConfigDescription("Arrive this fast (m/s) for the biggest crater. 0 = automatic: your top Super-Flight speed (MaxSpeed x FastFlyMultiplier). Anything in between scales.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>())); SlamCraterMaxDepth = cfg.Bind<float>("Slam", "CraterMaxDepth", 8f, new ConfigDescription("Depth (m) of the biggest crater. 8 is the game's own limit on digging below natural ground.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 8f), Array.Empty<object>())); SlamCraterMaxRadius = cfg.Bind<float>("Slam", "CraterMaxRadius", 8f, new ConfigDescription("Radius (m) of the biggest crater.",