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 BoatAdditions v1.4.5
BoatAdditions.dll
Decompiled 2 months 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.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BoatAdditions.Functions; using HarmonyLib; using ItemManager; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using PieceManager; using ServerSync; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Core.Tokens; using YamlDotNet.Helpers; using YamlDotNet.Serialization; using YamlDotNet.Serialization.Converters; using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NodeDeserializers; using YamlDotNet.Serialization.NodeTypeResolvers; using YamlDotNet.Serialization.ObjectFactories; using YamlDotNet.Serialization.ObjectGraphTraversalStrategies; using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.Schemas; using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeResolvers; using YamlDotNet.Serialization.Utilities; using YamlDotNet.Serialization.ValueDeserializers; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("blacks7ar")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.4.5")] [assembly: AssemblyInformationalVersion("1.0.0+fc3becea89c4301a659b4df269683f778b549739")] [assembly: AssemblyProduct("BoatAdditions")] [assembly: AssemblyTitle("BoatAdditions")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.5.0")] [module: UnverifiableCode] [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 BoatAdditions { [BepInPlugin("blacks7ar.BoatAdditions", "BoatAdditions", "1.4.5")] public class Plugin : BaseUnityPlugin { private const string modGUID = "blacks7ar.BoatAdditions"; public const string modName = "BoatAdditions"; public const string modAuthor = "blacks7ar"; public const string modVersion = "1.4.5"; private static readonly Harmony _harmony = new Harmony("blacks7ar.BoatAdditions"); private static readonly ConfigSync _configSync = new ConfigSync("blacks7ar.BoatAdditions") { DisplayName = "BoatAdditions", CurrentVersion = "1.4.5", MinimumRequiredVersion = "1.4.5" }; private static ConfigEntry<BoatAdditions.Functions.Toggle> _serverConfigLocked; public static ConfigEntry<KeyboardShortcut> _anchorKey; public static ConfigEntry<KeyboardShortcut> _confineTameKey; public static Plugin _Instance; public ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedConfig = true) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ConfigDescription val = new ConfigDescription(description.Description + (synchronizedConfig ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags); ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val); _configSync.AddConfigEntry<T>(val2).SynchronizedConfig = synchronizedConfig; return val2; } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0069: 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_0084: Expected O, but got Unknown //IL_00a4: 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_00bf: Expected O, but got Unknown _Instance = this; ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; Localizer.Load(); _serverConfigLocked = config("1- ServerSync", "Lock Configuration", BoatAdditions.Functions.Toggle.On, new ConfigDescription("If On, the configuration is locked and can be changed by server admins only.", (AcceptableValueBase)null, Array.Empty<object>())); _configSync.AddLockingConfigEntry<BoatAdditions.Functions.Toggle>(_serverConfigLocked); _anchorKey = config<KeyboardShortcut>("2- General", "Anchor Key", new KeyboardShortcut((KeyCode)102, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), new ConfigDescription("Hotkey combination to raise or drop anchors while hovering your mouse to the rudder", (AcceptableValueBase)null, Array.Empty<object>()), synchronizedConfig: false); _confineTameKey = config<KeyboardShortcut>("2- General", "Confine Key", new KeyboardShortcut((KeyCode)114, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), new ConfigDescription("Hotkey combination to put tame on the raft.", (AcceptableValueBase)null, Array.Empty<object>()), synchronizedConfig: false); ConfigSetup.Init(); SetupPrefabs.Init(); SetupPrefabs.Start(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmony.PatchAll(executingAssembly); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; ((BaseUnityPlugin)this).Config.Save(); } public void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } } } namespace BoatAdditions.Patches { [HarmonyPatch(typeof(AudioMan), "Awake")] public class AudioManPatch { [HarmonyPostfix] private static void Postfix(AudioMan __instance) { SetupPrefabs.AudioPatch(__instance); } } [HarmonyPatch(typeof(Character), "CustomFixedUpdate")] public class CharacterPatch { [HarmonyPostfix] private static void Postfix(Character __instance) { if (!((Object)(object)__instance == (Object)(object)Player.m_localPlayer) && !__instance.IsPlayer() && !__instance.IsBoss() && __instance.IsTamed() && !Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<Growup>()) && !((Object)(object)__instance == (Object)null) && Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<Tameable>())) { ((Component)__instance).GetComponent<Tameable>().m_commandable = true; } } } [HarmonyPatch(typeof(Container), "Awake")] public class ContainerPatch { private static void Postfix(Container __instance, ref Inventory ___m_inventory) { if ((Object)(object)__instance == (Object)null || ___m_inventory == null) { return; } ref int width = ref ___m_inventory.m_width; ref int height = ref ___m_inventory.m_height; string name = __instance.m_name; if (name == null) { return; } switch (name.Length) { case 20: switch (name[5]) { case 'o': if (name == "$bba_outrigger_skeid") { width = ConfigSetup._outriggerSkeidContainerWidth.Value; height = ConfigSetup._outriggerSkeidContainerHeight.Value; } break; case 's': if (name == "$bba_snekkja_storage") { width = ConfigSetup._snekkjaContainerWidth.Value; height = ConfigSetup._snekkjaContainerHeight.Value; } break; case 'l': if (name == "$bba_largeraft_cargo") { width = ConfigSetup._cargoRaftContainerWidth.Value; height = ConfigSetup._cargoRaftContainerHeight.Value; } break; case 'd': if (name == "$bba_drakker_storage") { width = ConfigSetup._drakkerContainerWidth.Value; height = ConfigSetup._drakkerContainerHeight.Value; } break; } break; case 28: if (name == "$bba_outrigger_karve_storage") { width = ConfigSetup._outriggerKarveContainerWidth.Value; height = ConfigSetup._outriggerKarveContainerHeight.Value; } break; case 18: if (name == "$bba_knarr_storage") { width = ConfigSetup._knarrContainerWidth.Value; height = ConfigSetup._knarrContainerHeight.Value; } break; case 21: if (name == "$bba_kvalsund_storage") { width = ConfigSetup._kvalsundContainerWidth.Value; height = ConfigSetup._kvalsundContainerHeight.Value; } break; } } } [HarmonyPatch] public class ShipControlsPatch { private static readonly int _isAnchored = StringExtensionMethods.GetStableHashCode("IsAnchored"); private static readonly int _isOccupied = StringExtensionMethods.GetStableHashCode("IsOccupied"); private static readonly float[] _offSets = new float[6] { -80f, 80f, -60f, 60f, -30f, 30f }; [HarmonyPostfix] [HarmonyPatch(typeof(ShipControlls), "Awake")] public static void Awake_Postfix(ShipControlls __instance) { if ((Object)(object)__instance == (Object)null || (Object)(object)__instance.m_ship == (Object)null || (Object)(object)__instance.m_nview == (Object)null || !__instance.m_nview.IsValid()) { return; } Rigidbody componentInParent = ((Component)__instance).gameObject.GetComponentInParent<Rigidbody>(); Piece componentInParent2 = ((Component)__instance).gameObject.GetComponentInParent<Piece>(); if ((Object)(object)componentInParent == (Object)null || (Object)(object)componentInParent2 == (Object)null || (!componentInParent2.m_name.Contains("$ship_long") && !componentInParent2.m_name.Contains("$ship_karve") && !componentInParent2.m_name.Contains("$ship_raft") && !componentInParent2.m_name.Contains("longship_ashlands") && !componentInParent2.m_name.StartsWith("$bba_"))) { return; } if (__instance.m_nview.GetZDO().GetBool(_isAnchored, false)) { componentInParent.constraints = (RigidbodyConstraints)10; } else { componentInParent.constraints = (RigidbodyConstraints)0; } if (componentInParent2.m_name == "$bba_cargoraft" || componentInParent2.m_name == "$bba_outrigger_skeid") { GameObject gameObject = ((Component)((Component)componentInParent2).gameObject.transform.Find("pen")).gameObject; if ((Object)(object)gameObject != (Object)null) { gameObject.SetActive(__instance.m_nview.GetZDO().GetBool(_isOccupied, false)); } } } [HarmonyPostfix] [HarmonyPatch(typeof(ShipControlls), "GetHoverText")] public static void GetHoverText_Postfix(ShipControlls __instance, ref string __result) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: 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_025f: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_0319: 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_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || (Object)(object)__instance.m_nview == (Object)null || !__instance.m_nview.IsValid()) { return; } Rigidbody componentInParent = ((Component)__instance).gameObject.GetComponentInParent<Rigidbody>(); Vector3 position = ((Component)__instance).transform.position; Piece componentInParent2 = ((Component)__instance).gameObject.GetComponentInParent<Piece>(); if ((Object)(object)componentInParent == (Object)null || (Object)(object)componentInParent2 == (Object)null || (!componentInParent2.m_name.Contains("$ship_long") && !componentInParent2.m_name.Contains("$ship_karve") && !componentInParent2.m_name.Contains("$ship_raft") && !componentInParent2.m_name.Contains("longship_ashlands") && !componentInParent2.m_name.StartsWith("$bba_"))) { return; } if (!__instance.m_nview.GetZDO().GetBool(_isAnchored, false)) { if (!__instance.InUseDistance((Humanoid)(object)Player.m_localPlayer)) { __result = Localization.instance.Localize("<color=grey>$piece_toofar</color>"); return; } __result += $"\n[<color=yellow><b>{Plugin._anchorKey.Value}</b></color>] Drop Anchors"; } else { if (!__instance.InUseDistance((Humanoid)(object)Player.m_localPlayer)) { __result = Localization.instance.Localize("<color=grey>$piece_toofar</color>"); return; } __result += $"\n[<color=yellow><b>{Plugin._anchorKey.Value}</b></color>] Raise Anchors"; } KeyboardShortcut value = Plugin._anchorKey.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { if (!__instance.m_nview.GetZDO().GetBool(_isAnchored, false)) { __instance.m_nview.GetZDO().Set(_isAnchored, true); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("vfx_Place_wood_pole"), position, Quaternion.identity); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_build_hammer_metal"), position, Quaternion.identity); componentInParent.constraints = (RigidbodyConstraints)10; ZDOMan.instance.ForceSendZDO(ZNetView.Everybody, __instance.m_nview.GetZDO().m_uid); } else { __instance.m_nview.GetZDO().Set(_isAnchored, false); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("vfx_Place_wood_pole"), position, Quaternion.identity); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_build_hammer_metal"), position, Quaternion.identity); componentInParent.constraints = (RigidbodyConstraints)0; ZDOMan.instance.ForceSendZDO(ZNetView.Everybody, __instance.m_nview.GetZDO().m_uid); } } if (componentInParent2.m_name == "$bba_cargoraft") { GameObject gameObject = ((Component)((Component)componentInParent2).gameObject.transform.Find("pen")).gameObject; if (!__instance.m_nview.GetZDO().GetBool(_isOccupied, false)) { if (!__instance.InUseDistance((Humanoid)(object)Player.m_localPlayer)) { return; } __result += $"\n[<color=yellow><b>{Plugin._confineTameKey.Value}</b></color>] Confine Tame"; } else { if (!__instance.InUseDistance((Humanoid)(object)Player.m_localPlayer)) { return; } __result += $"\n[<color=yellow><b>{Plugin._confineTameKey.Value}</b></color>] Release Tame"; } value = Plugin._confineTameKey.Value; if (!((KeyboardShortcut)(ref value)).IsDown()) { return; } if (!__instance.m_nview.GetZDO().GetBool(_isOccupied, false)) { __instance.m_nview.GetZDO().Set(_isOccupied, true); gameObject.SetActive(true); Transform slot = ((Component)componentInParent2).gameObject.transform.Find("slot"); Character nearbyTame = GetNearbyTame(Player.m_localPlayer); if ((Object)(object)nearbyTame == (Object)null) { ((Character)Player.m_localPlayer).Message((MessageType)2, "No following tame in range.", 0, (Sprite)null, false); __instance.m_nview.GetZDO().Set(_isOccupied, false); gameObject.SetActive(false); return; } string text = ((Object)((Component)nearbyTame).gameObject).name.Replace("(Clone)", ""); if ((text == "Lox" || text == "Moose") ? true : false) { ((Character)Player.m_localPlayer).Message((MessageType)2, "Following tame is too big for the cage!", 0, (Sprite)null, false); __instance.m_nview.GetZDO().Set(_isOccupied, false); gameObject.SetActive(false); } else { Confine(nearbyTame, slot); } } else { __instance.m_nview.GetZDO().Set(_isOccupied, false); gameObject.SetActive(false); } } else { if (!(componentInParent2.m_name == "$bba_outrigger_skeid")) { return; } GameObject gameObject2 = ((Component)((Component)componentInParent2).gameObject.transform.Find("pen")).gameObject; if (!__instance.m_nview.GetZDO().GetBool(_isOccupied, false)) { if (!__instance.InUseDistance((Humanoid)(object)Player.m_localPlayer)) { return; } __result += $"\n[<color=yellow><b>{Plugin._confineTameKey.Value}</b></color>] Confine Tame"; } else { if (!__instance.InUseDistance((Humanoid)(object)Player.m_localPlayer)) { return; } __result += $"\n[<color=yellow><b>{Plugin._confineTameKey.Value}</b></color>] Release Tame"; } value = Plugin._confineTameKey.Value; if (!((KeyboardShortcut)(ref value)).IsDown()) { return; } if (!__instance.m_nview.GetZDO().GetBool(_isOccupied, false)) { __instance.m_nview.GetZDO().Set(_isOccupied, true); gameObject2.SetActive(true); Transform slot2 = ((Component)componentInParent2).gameObject.transform.Find("slot"); List<Character> nearbyTames = GetNearbyTames(Player.m_localPlayer); if (nearbyTames.Count <= 0) { ((Character)Player.m_localPlayer).Message((MessageType)2, "No following tame in range.", 0, (Sprite)null, false); __instance.m_nview.GetZDO().Set(_isOccupied, false); gameObject2.SetActive(false); return; } List<Character> list = nearbyTames.Take(5).ToList(); Character val = ((IEnumerable<Character>)list).FirstOrDefault((Func<Character, bool>)((Character c) => ((Object)((Component)c).gameObject).name.Replace("(Clone)", "") == "Lox")); if ((Object)(object)val != (Object)null) { Confine(val, slot2); return; } Character val2 = ((IEnumerable<Character>)list).FirstOrDefault((Func<Character, bool>)((Character c) => ((Object)((Component)c).gameObject).name.Replace("(Clone)", "") == "Moose")); if ((Object)(object)val2 != (Object)null) { int num = list.IndexOf(val2); List<Character> list2 = list.Take(Math.Min(num + 1, 3)).ToList(); if (!list2.Contains(val2)) { list2.Add(val2); } Confine(list2, slot2); } else { Confine(list, slot2); } } else { __instance.m_nview.GetZDO().Set(_isOccupied, false); gameObject2.SetActive(false); } } } private static Character GetNearbyTame(Player player) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) List<Character> list = new List<Character>(); Character.GetCharactersInRange(((Component)player).transform.position, 64f, list); if (list.Count == 0) { return null; } return (from character in list where character.IsTamed() let component = ((Component)character).GetComponent<MonsterAI>() where Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.GetFollowTarget()) && (Object)(object)component.GetFollowTarget() == (Object)(object)((Component)player).gameObject select new List<Character> { character } into source select source.FirstOrDefault()).FirstOrDefault(); } private static List<Character> GetNearbyTames(Player player) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) List<Character> list = new List<Character>(); Character.GetCharactersInRange(((Component)player).transform.position, 64f, list); if (list.Count == 0) { return new List<Character>(); } List<Character> list2 = new List<Character>(); foreach (Character item in list) { if (item.IsTamed()) { MonsterAI component = ((Component)item).GetComponent<MonsterAI>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.GetFollowTarget()) && !((Object)(object)component.GetFollowTarget() != (Object)(object)((Component)player).gameObject)) { list2.Add(item); } } } return list2; } private static void Confine(Character character, Transform slot) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_002f: Unknown result type (might be due to invalid IL or missing references) ((Component)character).transform.position = slot.position; ((Component)character).transform.rotation = Quaternion.LookRotation(slot.forward, slot.up); character.SetLookDir(slot.forward, 0f); } private static void Confine(List<Character> characters, Transform slot) { //IL_001a: 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_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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0074: Unknown result type (might be due to invalid IL or missing references) int num = 0; foreach (Character character in characters) { Vector3 val = Quaternion.AngleAxis(_offSets[num], Vector3.up) * ((Component)character).transform.forward * 0.75f; ((Component)character).transform.position = slot.position + val; ((Component)character).transform.rotation = Quaternion.LookRotation(slot.forward, slot.up); character.SetLookDir(slot.forward, 0f); num++; } } } [HarmonyPatch] public class ShipPatch { [HarmonyPostfix] [HarmonyPatch(typeof(Ship), "Awake")] public static void Awake_Postfix(Ship __instance) { if ((Object)(object)__instance == (Object)null || !__instance.m_nview.IsValid()) { return; } string text = ((Component)__instance).gameObject.GetComponent<Piece>()?.m_name; if (text == null) { return; } switch (text.Length) { case 10: switch (text[5]) { case 'c': if (text == "$bba_canoe") { ShipStats.Canoe(__instance); } break; case 'k': if (text == "$bba_knarr") { ShipStats.Knarr(__instance); } break; } break; case 14: switch (text[5]) { case 'l': if (text == "$bba_largeraft") { ShipStats.CargoRaft(__instance); } break; case 'c': if (text == "$bba_cargoraft") { ShipStats.CargoRaft(__instance); } break; } break; case 20: switch (text[15]) { case 'k': if (text == "$bba_outrigger_karve") { ShipStats.OutriggerKarve(__instance); } break; case 's': if (text == "$bba_outrigger_skeid") { ShipStats.OutriggerSkeid(__instance); } break; } break; case 12: switch (text[5]) { case 's': if (text == "$bba_snekkja") { ShipStats.Snekkja(__instance); } break; case 'd': if (text == "$bba_drakker") { ShipStats.Drakker(__instance); } break; } break; case 13: if (text == "$bba_kvalsund") { ShipStats.Kvalsund(__instance); } break; } } [HarmonyPrefix] [HarmonyPatch(typeof(Ship), "RPC_Forward")] public static void RpcForward_Prefix(Ship __instance, long sender) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Invalid comparison between Unknown and I4 //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance == (Object)null) && !((Object)(object)((Component)__instance).gameObject == (Object)null) && !((Object)(object)__instance.m_nview == (Object)null) && __instance.m_nview.IsValid()) { Piece component = ((Component)__instance).gameObject.GetComponent<Piece>(); if (!((Object)(object)component == (Object)null) && !(component.m_name != "$bba_canoe") && (int)__instance.m_speed != 1) { __instance.m_speed = (Speed)0; } } } } [HarmonyPatch(typeof(ZNetScene), "Awake")] public class ZNetScenePatch { public static void Postfix(ZNetScene __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name != "start") { return; } foreach (GameObject prefab in __instance.m_prefabs) { switch (((Object)prefab).name) { case "BBA_Canoe": ShipStats.Canoe(prefab.GetComponent<Ship>()); break; case "BBA_Knarr": ShipStats.Knarr(prefab.GetComponent<Ship>()); break; case "BBA_LargeRaft": ShipStats.CargoRaft(prefab.GetComponent<Ship>()); break; case "BBA_OutriggerKarve": ShipStats.OutriggerKarve(prefab.GetComponent<Ship>()); break; case "BBA_OutriggerSkeid": ShipStats.OutriggerSkeid(prefab.GetComponent<Ship>()); break; case "BBA_Snekkja": ShipStats.Snekkja(prefab.GetComponent<Ship>()); break; case "$bba_drakker": ShipStats.Drakker(prefab.GetComponent<Ship>()); break; case "$bba_kvalsund": ShipStats.Kvalsund(prefab.GetComponent<Ship>()); break; case "$bba_cargoraft": ShipStats.CargoRaft(prefab.GetComponent<Ship>()); break; } } } } } namespace BoatAdditions.Functions { public class CargoLoad : MonoBehaviour { [Serializable] public class LoadData { public GameObject m_gameObject; public float m_minPercentage; } private static List<CargoLoad> m_instances = new List<CargoLoad>(); public Container m_container; public List<LoadData> m_loadVis = new List<LoadData>(); private ZNetView m_nview; public void Awake() { m_nview = ((Component)this).GetComponent<ZNetView>(); if (m_nview.GetZDO() == null) { ((Behaviour)this).enabled = false; return; } m_instances.Add(this); m_container = ((Component)this).gameObject.GetComponentInChildren<Container>(); SetupVisualization(); ((MonoBehaviour)this).InvokeRepeating("UpdateLoadVisualization", 0f, 3f); } public void OnDestroy() { m_instances.Remove(this); } public void UpdateLoadVisualization() { if ((Object)(object)m_container == (Object)null) { return; } float num = m_container.GetInventory().SlotsUsedPercentage(); foreach (LoadData loadVi in m_loadVis) { loadVi.m_gameObject.SetActive(num >= loadVi.m_minPercentage); } } public void SetupVisualization() { m_loadVis = new List<LoadData>(7) { new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_1")).gameObject, m_minPercentage = 1f }, new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_2")).gameObject, m_minPercentage = 10f }, new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_3")).gameObject, m_minPercentage = 20f }, new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_4")).gameObject, m_minPercentage = 40f }, new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_5")).gameObject, m_minPercentage = 60f }, new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_6")).gameObject, m_minPercentage = 80f }, new LoadData { m_gameObject = ((Component)((Component)this).gameObject.transform.Find("load/cargo_7")).gameObject, m_minPercentage = 95f } }; } } public static class ConfigSetup { public static ConfigEntry<float> _canoeWaterLevelOffset; public static ConfigEntry<float> _canoeForceDistance; public static ConfigEntry<float> _canoeForce; public static ConfigEntry<float> _canoeDamping; public static ConfigEntry<float> _canoeDampingSideway; public static ConfigEntry<float> _canoeDampingForward; public static ConfigEntry<float> _canoeAngularDamping; public static ConfigEntry<float> _canoeDisableLevel; public static ConfigEntry<float> _canoeRudderSpeed; public static ConfigEntry<float> _canoeStearForceOffset; public static ConfigEntry<float> _canoeStearForce; public static ConfigEntry<float> _canoeStearVelForceFactor; public static ConfigEntry<float> _canoeBackwardForce; public static ConfigEntry<float> _canoeRudderRotationMax; public static ConfigEntry<float> _canoeMinWaterImpactForce; public static ConfigEntry<float> _canoeMinWaterImpactInterval; public static ConfigEntry<float> _canoeWaterImpactDamage; public static ConfigEntry<float> _canoeUpsideDownDmgInterval; public static ConfigEntry<float> _canoeUpsideDownDmg; public static ConfigEntry<float> _canoeHealthPoints; public static ConfigEntry<int> _cargoRaftContainerWidth; public static ConfigEntry<int> _cargoRaftContainerHeight; public static ConfigEntry<float> _cargoRaftWaterLevelOffset; public static ConfigEntry<float> _cargoRaftForceDistance; public static ConfigEntry<float> _cargoRaftForce; public static ConfigEntry<float> _cargoRaftDamping; public static ConfigEntry<float> _cargoRaftDampingSideway; public static ConfigEntry<float> _cargoRaftDampingForward; public static ConfigEntry<float> _cargoRaftAngularDamping; public static ConfigEntry<float> _cargoRaftDisableLevel; public static ConfigEntry<float> _cargoRaftSailForceOffset; public static ConfigEntry<float> _cargoRaftSailForceFactor; public static ConfigEntry<float> _cargoRaftRudderSpeed; public static ConfigEntry<float> _cargoRaftStearForceOffset; public static ConfigEntry<float> _cargoRaftStearForce; public static ConfigEntry<float> _cargoRaftStearVelForceFactor; public static ConfigEntry<float> _cargoRaftBackwardForce; public static ConfigEntry<float> _cargoRaftRudderRotationMax; public static ConfigEntry<float> _cargoRaftMinWaterImpactForce; public static ConfigEntry<float> _cargoRaftMinWaterImpactInterval; public static ConfigEntry<float> _cargoRaftWaterImpactDamage; public static ConfigEntry<float> _cargoRaftUpsideDownDmgInterval; public static ConfigEntry<float> _cargoRaftUpsideDownDmg; public static ConfigEntry<float> _cargoRaftHealthPoints; public static ConfigEntry<int> _knarrContainerWidth; public static ConfigEntry<int> _knarrContainerHeight; public static ConfigEntry<float> _knarrWaterLevelOffset; public static ConfigEntry<float> _knarrForceDistance; public static ConfigEntry<float> _knarrForce; public static ConfigEntry<float> _knarrDamping; public static ConfigEntry<float> _knarrDampingSideway; public static ConfigEntry<float> _knarrDampingForward; public static ConfigEntry<float> _knarrAngularDamping; public static ConfigEntry<float> _knarrDisableLevel; public static ConfigEntry<float> _knarrSailForceOffset; public static ConfigEntry<float> _knarrSailForceFactor; public static ConfigEntry<float> _knarrRudderSpeed; public static ConfigEntry<float> _knarrStearForceOffset; public static ConfigEntry<float> _knarrStearForce; public static ConfigEntry<float> _knarrStearVelForceFactor; public static ConfigEntry<float> _knarrBackwardForce; public static ConfigEntry<float> _knarrRudderRotationMax; public static ConfigEntry<float> _knarrMinWaterImpactForce; public static ConfigEntry<float> _knarrMinWaterImpactInterval; public static ConfigEntry<float> _knarrWaterImpactDamage; public static ConfigEntry<float> _knarrUpsideDownDmgInterval; public static ConfigEntry<float> _knarrUpsideDownDmg; public static ConfigEntry<float> _knarrHealthPoints; public static ConfigEntry<int> _outriggerKarveContainerWidth; public static ConfigEntry<int> _outriggerKarveContainerHeight; public static ConfigEntry<float> _outriggerKarveWaterLevelOffset; public static ConfigEntry<float> _outriggerKarveForceDistance; public static ConfigEntry<float> _outriggerKarveForce; public static ConfigEntry<float> _outriggerKarveDamping; public static ConfigEntry<float> _outriggerKarveDampingSideway; public static ConfigEntry<float> _outriggerKarveDampingForward; public static ConfigEntry<float> _outriggerKarveAngularDamping; public static ConfigEntry<float> _outriggerKarveDisableLevel; public static ConfigEntry<float> _outriggerKarveSailForceOffset; public static ConfigEntry<float> _outriggerKarveSailForceFactor; public static ConfigEntry<float> _outriggerKarveRudderSpeed; public static ConfigEntry<float> _outriggerKarveStearForceOffset; public static ConfigEntry<float> _outriggerKarveStearForce; public static ConfigEntry<float> _outriggerKarveStearVelForceFactor; public static ConfigEntry<float> _outriggerKarveBackwardForce; public static ConfigEntry<float> _outriggerKarveRudderRotationMax; public static ConfigEntry<float> _outriggerKarveMinWaterImpactForce; public static ConfigEntry<float> _outriggerKarveMinWaterImpactInterval; public static ConfigEntry<float> _outriggerKarveWaterImpactDamage; public static ConfigEntry<float> _outriggerKarveUpsideDownDmgInterval; public static ConfigEntry<float> _outriggerKarveUpsideDownDmg; public static ConfigEntry<float> _outriggerKarveHealthPoints; public static ConfigEntry<int> _outriggerSkeidContainerWidth; public static ConfigEntry<int> _outriggerSkeidContainerHeight; public static ConfigEntry<float> _outriggerSkeidWaterLevelOffset; public static ConfigEntry<float> _outriggerSkeidForceDistance; public static ConfigEntry<float> _outriggerSkeidForce; public static ConfigEntry<float> _outriggerSkeidDamping; public static ConfigEntry<float> _outriggerSkeidDampingSideway; public static ConfigEntry<float> _outriggerSkeidDampingForward; public static ConfigEntry<float> _outriggerSkeidAngularDamping; public static ConfigEntry<float> _outriggerSkeidDisableLevel; public static ConfigEntry<float> _outriggerSkeidSailForceOffset; public static ConfigEntry<float> _outriggerSkeidSailForceFactor; public static ConfigEntry<float> _outriggerSkeidRudderSpeed; public static ConfigEntry<float> _outriggerSkeidStearForceOffset; public static ConfigEntry<float> _outriggerSkeidStearForce; public static ConfigEntry<float> _outriggerSkeidStearVelForceFactor; public static ConfigEntry<float> _outriggerSkeidBackwardForce; public static ConfigEntry<float> _outriggerSkeidRudderRotationMax; public static ConfigEntry<float> _outriggerSkeidMinWaterImpactForce; public static ConfigEntry<float> _outriggerSkeidMinWaterImpactInterval; public static ConfigEntry<float> _outriggerSkeidWaterImpactDamage; public static ConfigEntry<float> _outriggerSkeidUpsideDownDmgInterval; public static ConfigEntry<float> _outriggerSkeidUpsideDownDmg; public static ConfigEntry<float> _outriggerSkeidHealthPoints; public static ConfigEntry<int> _snekkjaContainerWidth; public static ConfigEntry<int> _snekkjaContainerHeight; public static ConfigEntry<float> _snekkjaWaterLevelOffset; public static ConfigEntry<float> _snekkjaForceDistance; public static ConfigEntry<float> _snekkjaForce; public static ConfigEntry<float> _snekkjaDamping; public static ConfigEntry<float> _snekkjaDampingSideway; public static ConfigEntry<float> _snekkjaDampingForward; public static ConfigEntry<float> _snekkjaAngularDamping; public static ConfigEntry<float> _snekkjaDisableLevel; public static ConfigEntry<float> _snekkjaSailForceOffset; public static ConfigEntry<float> _snekkjaSailForceFactor; public static ConfigEntry<float> _snekkjaRudderSpeed; public static ConfigEntry<float> _snekkjaStearForceOffset; public static ConfigEntry<float> _snekkjaStearForce; public static ConfigEntry<float> _snekkjaStearVelForceFactor; public static ConfigEntry<float> _snekkjaBackwardForce; public static ConfigEntry<float> _snekkjaRudderRotationMax; public static ConfigEntry<float> _snekkjaMinWaterImpactForce; public static ConfigEntry<float> _snekkjaMinWaterImpactInterval; public static ConfigEntry<float> _snekkjaWaterImpactDamage; public static ConfigEntry<float> _snekkjaUpsideDownDmgInterval; public static ConfigEntry<float> _snekkjaUpsideDownDmg; public static ConfigEntry<float> _snekkjaHealthPoints; public static ConfigEntry<int> _drakkerContainerWidth; public static ConfigEntry<int> _drakkerContainerHeight; public static ConfigEntry<float> _drakkerWaterLevelOffset; public static ConfigEntry<float> _drakkerForceDistance; public static ConfigEntry<float> _drakkerForce; public static ConfigEntry<float> _drakkerDamping; public static ConfigEntry<float> _drakkerDampingSideway; public static ConfigEntry<float> _drakkerDampingForward; public static ConfigEntry<float> _drakkerAngularDamping; public static ConfigEntry<float> _drakkerDisableLevel; public static ConfigEntry<float> _drakkerSailForceOffset; public static ConfigEntry<float> _drakkerSailForceFactor; public static ConfigEntry<float> _drakkerRudderSpeed; public static ConfigEntry<float> _drakkerStearForceOffset; public static ConfigEntry<float> _drakkerStearForce; public static ConfigEntry<float> _drakkerStearVelForceFactor; public static ConfigEntry<float> _drakkerBackwardForce; public static ConfigEntry<float> _drakkerRudderRotationMax; public static ConfigEntry<float> _drakkerMinWaterImpactForce; public static ConfigEntry<float> _drakkerMinWaterImpactInterval; public static ConfigEntry<float> _drakkerWaterImpactDamage; public static ConfigEntry<float> _drakkerUpsideDownDmgInterval; public static ConfigEntry<float> _drakkerUpsideDownDmg; public static ConfigEntry<float> _drakkerHealthPoints; public static ConfigEntry<int> _kvalsundContainerWidth; public static ConfigEntry<int> _kvalsundContainerHeight; public static ConfigEntry<float> _kvalsundWaterLevelOffset; public static ConfigEntry<float> _kvalsundForceDistance; public static ConfigEntry<float> _kvalsundForce; public static ConfigEntry<float> _kvalsundDamping; public static ConfigEntry<float> _kvalsundDampingSideway; public static ConfigEntry<float> _kvalsundDampingForward; public static ConfigEntry<float> _kvalsundAngularDamping; public static ConfigEntry<float> _kvalsundDisableLevel; public static ConfigEntry<float> _kvalsundSailForceOffset; public static ConfigEntry<float> _kvalsundSailForceFactor; public static ConfigEntry<float> _kvalsundRudderSpeed; public static ConfigEntry<float> _kvalsundStearForceOffset; public static ConfigEntry<float> _kvalsundStearForce; public static ConfigEntry<float> _kvalsundStearVelForceFactor; public static ConfigEntry<float> _kvalsundBackwardForce; public static ConfigEntry<float> _kvalsundRudderRotationMax; public static ConfigEntry<float> _kvalsundMinWaterImpactForce; public static ConfigEntry<float> _kvalsundMinWaterImpactInterval; public static ConfigEntry<float> _kvalsundWaterImpactDamage; public static ConfigEntry<float> _kvalsundUpsideDownDmgInterval; public static ConfigEntry<float> _kvalsundUpsideDownDmg; public static ConfigEntry<float> _kvalsundHealthPoints; private const string _waterLevelOffset = "Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper."; private const string _forceDistance = "The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes."; private const string _force = "The base upward buoyancy force applied when submerged. Controls how strongly the ship floats."; private const string _damping = "General damping applied to vertical motion to prevent oscillation or jitter when floating."; private const string _dampingSideway = "Reduces sideways drift by applying resistance proportional to lateral velocity."; private const string _dampingForward = "Reduces forward/backward drift when moving through water."; private const string _angularDamping = "Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation."; private const string _disableLevel = "Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water)."; private const string _sailForceOffset = "Vertical offset from the ship’s center where wind force is applied. Simulates the sail’s position above the hull."; private const string _sailForceFactor = "Multiplier for wind strength. Higher values make the sail catch more wind and accelerate faster."; private const string _rudderSpeed = "How quickly the rudder turns in response to player input."; private const string _stearForceOffset = "Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders)."; private const string _stearForce = "Strength of the lateral steering force. Controls how sharply the ship turns."; private const string _stearVelForceFactor = "Scales steering force based on current forward velocity—helps stabilize turning at different speeds."; private const string _backwardForce = "The reverse propulsion force when moving backward or slowing down."; private const string _rudderRotationMax = "Maximum angle the rudder can rotate to either side. Larger values mean tighter turns."; private const string _minWaterImpactForce = "Minimum collision force with water required to trigger splash effects or damage."; private const string _minWaterImpactInterval = "Minimum time between water impact events to avoid spamming effects."; private const string _waterImpactDamage = "Damage applied to the ship when hitting water too hard (e.g., falling from height)."; private const string _upsideDownDmgInterval = "Time interval between damage ticks when the ship is flipped upside down."; private const string _upsideDownDmg = "Amount of blunt damage applied each tick while upside down."; public static void Init() { Canoe(); Knarr(); OutriggerKarve(); OutriggerSkeid(); Snekkja(); Drakker(); Kvalsund(); CargoRaft(); } private static void CargoRaft() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown _cargoRaftContainerWidth = Plugin._Instance.config("CargoRaft", "Storage Width", 8, new ConfigDescription("CargoRaft's storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _cargoRaftContainerHeight = Plugin._Instance.config("CargoRaft", "Storage Height", 4, new ConfigDescription("CargoRaft's storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _cargoRaftWaterLevelOffset = Plugin._Instance.config("CargoRaft", "Water Level Offset", 1.5f, new ConfigDescription("Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftForceDistance = Plugin._Instance.config("CargoRaft", "Force Distance", 2f, new ConfigDescription("The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftForce = Plugin._Instance.config("CargoRaft", "Force", 0.9f, new ConfigDescription("The base upward buoyancy force applied when submerged. Controls how strongly the ship floats.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftDamping = Plugin._Instance.config("CargoRaft", "Damping", 0.05f, new ConfigDescription("General damping applied to vertical motion to prevent oscillation or jitter when floating.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftDampingSideway = Plugin._Instance.config("CargoRaft", "Damping Sideway", 0.1f, new ConfigDescription("Reduces sideways drift by applying resistance proportional to lateral velocity.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftDampingForward = Plugin._Instance.config("CargoRaft", "Damping Forward", 0.005f, new ConfigDescription("Reduces forward/backward drift when moving through water.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftAngularDamping = Plugin._Instance.config("CargoRaft", "Angular Damping", 0.05f, new ConfigDescription("Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftDisableLevel = Plugin._Instance.config("CargoRaft", "Disable Level", -0.5f, new ConfigDescription("Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water).", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftSailForceOffset = Plugin._Instance.config("CargoRaft", "Sail Force Offset", 0.5f, new ConfigDescription("Vertical offset from the ship’s center where wind force is applied. Simulates the sail’s position above the hull.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftSailForceFactor = Plugin._Instance.config("CargoRaft", "Sail Force Factor", 0.08f, new ConfigDescription("Multiplier for wind strength. Higher values make the sail catch more wind and accelerate faster.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftRudderSpeed = Plugin._Instance.config("CargoRaft", "Rudder Speed", 1f, new ConfigDescription("How quickly the rudder turns in response to player input.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftStearForceOffset = Plugin._Instance.config("CargoRaft", "Stear Force Offset", -2.5f, new ConfigDescription("Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders).", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftStearForce = Plugin._Instance.config("CargoRaft", "Stear Force", 0.35f, new ConfigDescription("Strength of the lateral steering force. Controls how sharply the ship turns.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftStearVelForceFactor = Plugin._Instance.config("CargoRaft", "Stear Vel Force Factor", 0.2f, new ConfigDescription("Scales steering force based on current forward velocity—helps stabilize turning at different speeds.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftBackwardForce = Plugin._Instance.config("CargoRaft", "Backward Force", 0.25f, new ConfigDescription("The reverse propulsion force when moving backward or slowing down.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftRudderRotationMax = Plugin._Instance.config("CargoRaft", "Rudder Rotation Max", 45f, new ConfigDescription("Maximum angle the rudder can rotate to either side. Larger values mean tighter turns.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftMinWaterImpactForce = Plugin._Instance.config("CargoRaft", "Min Water Impact Force", 3f, new ConfigDescription("Minimum collision force with water required to trigger splash effects or damage.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftMinWaterImpactInterval = Plugin._Instance.config("CargoRaft", "Min Water Impact Interval", 2f, new ConfigDescription("Minimum time between water impact events to avoid spamming effects.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftWaterImpactDamage = Plugin._Instance.config("CargoRaft", "Water Impact Damage", 10f, new ConfigDescription("Damage applied to the ship when hitting water too hard (e.g., falling from height).", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftUpsideDownDmgInterval = Plugin._Instance.config("CargoRaft", "Upside Down Dmg Interval", 1f, new ConfigDescription("Time interval between damage ticks when the ship is flipped upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftUpsideDownDmg = Plugin._Instance.config("CargoRaft", "Upside Down Dmg", 20f, new ConfigDescription("Amount of blunt damage applied each tick while upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _cargoRaftHealthPoints = Plugin._Instance.config("CargoRaft", "Health Points", 300f, new ConfigDescription(string.Empty, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>())); } private static void Kvalsund() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown _kvalsundContainerWidth = Plugin._Instance.config("Kvalsund", "Storage Width", 8, new ConfigDescription("Kvalsund's storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _kvalsundContainerHeight = Plugin._Instance.config("Kvalsund", "Storage Height", 4, new ConfigDescription("Kvalsund's storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _kvalsundWaterLevelOffset = Plugin._Instance.config("Kvalsund", "Water Level Offset", 2.1f, new ConfigDescription("Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundForceDistance = Plugin._Instance.config("Kvalsund", "Force Distance", 3f, new ConfigDescription("The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundForce = Plugin._Instance.config("Kvalsund", "Force", 2f, new ConfigDescription("The base upward buoyancy force applied when submerged. Controls how strongly the ship floats.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDamping = Plugin._Instance.config("Kvalsund", "Damping", 0.1f, new ConfigDescription("General damping applied to vertical motion to prevent oscillation or jitter when floating.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDampingSideway = Plugin._Instance.config("Kvalsund", "Damping Sideway", 0.5f, new ConfigDescription("Reduces sideways drift by applying resistance proportional to lateral velocity.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDampingForward = Plugin._Instance.config("Kvalsund", "Damping Forward", 0.002f, new ConfigDescription("Reduces forward/backward drift when moving through water.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundAngularDamping = Plugin._Instance.config("Kvalsund", "Angular Damping", 0.95f, new ConfigDescription("Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDisableLevel = Plugin._Instance.config("Kvalsund", "Disable Level", -0.5f, new ConfigDescription("Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water).", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundSailForceOffset = Plugin._Instance.config("Kvalsund", "Sail Force Offset", 2f, new ConfigDescription("Vertical offset from the ship’s center where wind force is applied. Simulates the sail’s position above the hull.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundSailForceFactor = Plugin._Instance.config("Kvalsund", "Sail Force Factor", 0.14f, new ConfigDescription("Multiplier for wind strength. Higher values make the sail catch more wind and accelerate faster.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundRudderSpeed = Plugin._Instance.config("Kvalsund", "Rudder Speed", 1.2f, new ConfigDescription("How quickly the rudder turns in response to player input.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundStearForceOffset = Plugin._Instance.config("Kvalsund", "Stear Force Offset", -22f, new ConfigDescription("Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders).", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundStearForce = Plugin._Instance.config("Kvalsund", "Stear Force", 1.75f, new ConfigDescription("Strength of the lateral steering force. Controls how sharply the ship turns.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundStearVelForceFactor = Plugin._Instance.config("Kvalsund", "Stear Vel Force Factor", 1.05f, new ConfigDescription("Scales steering force based on current forward velocity—helps stabilize turning at different speeds.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundBackwardForce = Plugin._Instance.config("Kvalsund", "Backward Force", 0.25f, new ConfigDescription("The reverse propulsion force when moving backward or slowing down.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundRudderRotationMax = Plugin._Instance.config("Kvalsund", "Rudder Rotation Max", 45f, new ConfigDescription("Maximum angle the rudder can rotate to either side. Larger values mean tighter turns.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundMinWaterImpactForce = Plugin._Instance.config("Kvalsund", "Min Water Impact Force", 5f, new ConfigDescription("Minimum collision force with water required to trigger splash effects or damage.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundMinWaterImpactInterval = Plugin._Instance.config("Kvalsund", "Min Water Impact Interval", 2f, new ConfigDescription("Minimum time between water impact events to avoid spamming effects.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundWaterImpactDamage = Plugin._Instance.config("Kvalsund", "Water Impact Damage", 10f, new ConfigDescription("Damage applied to the ship when hitting water too hard (e.g., falling from height).", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundUpsideDownDmgInterval = Plugin._Instance.config("Kvalsund", "Upside Down Dmg Interval", 1f, new ConfigDescription("Time interval between damage ticks when the ship is flipped upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundUpsideDownDmg = Plugin._Instance.config("Kvalsund", "Upside Down Dmg", 20f, new ConfigDescription("Amount of blunt damage applied each tick while upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundHealthPoints = Plugin._Instance.config("Kvalsund", "Health Points", 3000f, new ConfigDescription(string.Empty, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>())); } private static void Drakker() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown _drakkerContainerWidth = Plugin._Instance.config("Drakker", "Storage Width", 8, new ConfigDescription("Kvalsund's storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _drakkerContainerHeight = Plugin._Instance.config("Drakker", "Storage Height", 4, new ConfigDescription("Kvalsund's storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _drakkerWaterLevelOffset = Plugin._Instance.config("Drakker", "Water Level Offset", 2.1f, new ConfigDescription("Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerForceDistance = Plugin._Instance.config("Drakker", "Force Distance", 3f, new ConfigDescription("The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerForce = Plugin._Instance.config("Drakker", "Force", 1f, new ConfigDescription("The base upward buoyancy force applied when submerged. Controls how strongly the ship floats.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDamping = Plugin._Instance.config("Drakker", "Damping", 0.1f, new ConfigDescription("General damping applied to vertical motion to prevent oscillation or jitter when floating.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDampingSideway = Plugin._Instance.config("Drakker", "Damping Sideway", 0.5f, new ConfigDescription("Reduces sideways drift by applying resistance proportional to lateral velocity.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDampingForward = Plugin._Instance.config("Drakker", "Damping Forward", 0.002f, new ConfigDescription("Reduces forward/backward drift when moving through water.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerAngularDamping = Plugin._Instance.config("Drakker", "Angular Damping", 0.95f, new ConfigDescription("Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDisableLevel = Plugin._Instance.config("Drakker", "Disable Level", -0.5f, new ConfigDescription("Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water).", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerSailForceOffset = Plugin._Instance.config("Drakker", "Sail Force Offset", 2f, new ConfigDescription("Vertical offset from the ship’s center where wind force is applied. Simulates the sail’s position above the hull.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerSailForceFactor = Plugin._Instance.config("Drakker", "Sail Force Factor", 0.8f, new ConfigDescription("Multiplier for wind strength. Higher values make the sail catch more wind and accelerate faster.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerRudderSpeed = Plugin._Instance.config("Drakker", "Rudder Speed", 2f, new ConfigDescription("How quickly the rudder turns in response to player input.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerStearForceOffset = Plugin._Instance.config("Drakker", "Stear Force Offset", -22f, new ConfigDescription("Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders).", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerStearForce = Plugin._Instance.config("Drakker", "Stear Force", 1.75f, new ConfigDescription("Strength of the lateral steering force. Controls how sharply the ship turns.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerStearVelForceFactor = Plugin._Instance.config("Drakker", "Stear Vel Force Factor", 1.05f, new ConfigDescription("Scales steering force based on current forward velocity—helps stabilize turning at different speeds.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerBackwardForce = Plugin._Instance.config("Drakker", "Backward Force", 0.25f, new ConfigDescription("The reverse propulsion force when moving backward or slowing down.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerRudderRotationMax = Plugin._Instance.config("Drakker", "Rudder Rotation Max", 45f, new ConfigDescription("Maximum angle the rudder can rotate to either side. Larger values mean tighter turns.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerMinWaterImpactForce = Plugin._Instance.config("Drakker", "Min Water Impact Force", 5f, new ConfigDescription("Minimum collision force with water required to trigger splash effects or damage.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerMinWaterImpactInterval = Plugin._Instance.config("Drakker", "Min Water Impact Interval", 2f, new ConfigDescription("Minimum time between water impact events to avoid spamming effects.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerWaterImpactDamage = Plugin._Instance.config("Drakker", "Water Impact Damage", 10f, new ConfigDescription("Damage applied to the ship when hitting water too hard (e.g., falling from height).", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerUpsideDownDmgInterval = Plugin._Instance.config("Drakker", "Upside Down Dmg Interval", 1f, new ConfigDescription("Time interval between damage ticks when the ship is flipped upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerUpsideDownDmg = Plugin._Instance.config("Drakker", "Upside Down Dmg", 20f, new ConfigDescription("Amount of blunt damage applied each tick while upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _drakkerHealthPoints = Plugin._Instance.config("Drakker", "Health Points", 3000f, new ConfigDescription(string.Empty, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>())); } private static void Canoe() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Expected O, but got Unknown //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Expected O, but got Unknown //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Expected O, but got Unknown _canoeWaterLevelOffset = Plugin._Instance.config("Canoe", "Water Level Offset", 1.2f, new ConfigDescription("Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeForceDistance = Plugin._Instance.config("Canoe", "Force Distance", 3f, new ConfigDescription("The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeForce = Plugin._Instance.config("Canoe", "Force", 1f, new ConfigDescription("The base upward buoyancy force applied when submerged. Controls how strongly the ship floats.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeDamping = Plugin._Instance.config("Canoe", "Damping", 0.05f, new ConfigDescription("General damping applied to vertical motion to prevent oscillation or jitter when floating.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeDampingSideway = Plugin._Instance.config("Canoe", "Damping Sideway", 0.15f, new ConfigDescription("Reduces sideways drift by applying resistance proportional to lateral velocity.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeDampingForward = Plugin._Instance.config("Canoe", "Damping Forward", 0.001f, new ConfigDescription("Reduces forward/backward drift when moving through water.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeAngularDamping = Plugin._Instance.config("Canoe", "Angular Damping", 0.05f, new ConfigDescription("Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeDisableLevel = Plugin._Instance.config("Canoe", "Disable Level", -0.5f, new ConfigDescription("Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water).", (AcceptableValueBase)null, Array.Empty<object>())); _canoeRudderSpeed = Plugin._Instance.config("Canoe", "Rudder Speed", 1.6f, new ConfigDescription("How quickly the rudder turns in response to player input.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeStearForceOffset = Plugin._Instance.config("Canoe", "Steer Force Offset", -3f, new ConfigDescription("Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders).", (AcceptableValueBase)null, Array.Empty<object>())); _canoeStearForce = Plugin._Instance.config("Canoe", "Steer Force", 0.2f, new ConfigDescription("Strength of the lateral steering force. Controls how sharply the ship turns.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeStearVelForceFactor = Plugin._Instance.config("Canoe", "Steer Vel Force Factor", 0.18f, new ConfigDescription("Scales steering force based on current forward velocity—helps stabilize turning at different speeds.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeBackwardForce = Plugin._Instance.config("Canoe", "Backward Force", 0.2f, new ConfigDescription("The reverse propulsion force when moving backward or slowing down.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeRudderRotationMax = Plugin._Instance.config("Canoe", "Rudder Rotation Max", 45f, new ConfigDescription("Maximum angle the rudder can rotate to either side. Larger values mean tighter turns.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeMinWaterImpactForce = Plugin._Instance.config("Canoe", "Min Water Impact Force", 4f, new ConfigDescription("Minimum collision force with water required to trigger splash effects or damage.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeMinWaterImpactInterval = Plugin._Instance.config("Canoe", "Min Water Impact Interval", 2f, new ConfigDescription("Minimum time between water impact events to avoid spamming effects.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeWaterImpactDamage = Plugin._Instance.config("Canoe", "Water Impact Damage", 10f, new ConfigDescription("Damage applied to the ship when hitting water too hard (e.g., falling from height).", (AcceptableValueBase)null, Array.Empty<object>())); _canoeUpsideDownDmgInterval = Plugin._Instance.config("Canoe", "Upside Down Dmg Interval", 1f, new ConfigDescription("Time interval between damage ticks when the ship is flipped upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeUpsideDownDmg = Plugin._Instance.config("Canoe", "Upside Down Dmg", 20f, new ConfigDescription("Amount of blunt damage applied each tick while upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _canoeHealthPoints = Plugin._Instance.config("Canoe", "Health Points", 200f, new ConfigDescription(string.Empty, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>())); } private static void Knarr() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown _knarrContainerWidth = Plugin._Instance.config("Knarr", "Storage Width", 8, new ConfigDescription("Knarr's storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _knarrContainerHeight = Plugin._Instance.config("Knarr", "Storage Height", 4, new ConfigDescription("Knarr's storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _knarrWaterLevelOffset = Plugin._Instance.config("Knarr", "Water Level Offset", 1.8f, new ConfigDescription("Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrForceDistance = Plugin._Instance.config("Knarr", "Force Distance", 3f, new ConfigDescription("The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrForce = Plugin._Instance.config("Knarr", "Force", 1f, new ConfigDescription("The base upward buoyancy force applied when submerged. Controls how strongly the ship floats.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrDamping = Plugin._Instance.config("Knarr", "Damping", 0.1f, new ConfigDescription("General damping applied to vertical motion to prevent oscillation or jitter when floating.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrDampingSideway = Plugin._Instance.config("Knarr", "Damping Sideway", 0.5f, new ConfigDescription("Reduces sideways drift by applying resistance proportional to lateral velocity.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrDampingForward = Plugin._Instance.config("Knarr", "Damping Forward", 0.002f, new ConfigDescription("Reduces forward/backward drift when moving through water.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrAngularDamping = Plugin._Instance.config("Knarr", "Angular Damping", 0.95f, new ConfigDescription("Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrDisableLevel = Plugin._Instance.config("Knarr", "Disable Level", -0.5f, new ConfigDescription("Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water).", (AcceptableValueBase)null, Array.Empty<object>())); _knarrSailForceOffset = Plugin._Instance.config("Knarr", "Sail Force Offset", 2f, new ConfigDescription("Vertical offset from the ship’s center where wind force is applied. Simulates the sail’s position above the hull.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrSailForceFactor = Plugin._Instance.config("Knarr", "Sail Force Factor", 0.12f, new ConfigDescription("Multiplier for wind strength. Higher values make the sail catch more wind and accelerate faster.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrRudderSpeed = Plugin._Instance.config("Knarr", "Rudder Speed", 1f, new ConfigDescription("How quickly the rudder turns in response to player input.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrStearForceOffset = Plugin._Instance.config("Knarr", "Steer Force Offset", -22f, new ConfigDescription("Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders).", (AcceptableValueBase)null, Array.Empty<object>())); _knarrStearForce = Plugin._Instance.config("Knarr", "Steer Force", 1.5f, new ConfigDescription("Strength of the lateral steering force. Controls how sharply the ship turns.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrStearVelForceFactor = Plugin._Instance.config("Knarr", "Steer Vel Force Factor", 1.05f, new ConfigDescription("Scales steering force based on current forward velocity—helps stabilize turning at different speeds.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrBackwardForce = Plugin._Instance.config("Knarr", "Backward Force", 0.25f, new ConfigDescription("The reverse propulsion force when moving backward or slowing down.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrRudderRotationMax = Plugin._Instance.config("Knarr", "Rudder Rotation Max", 45f, new ConfigDescription("Maximum angle the rudder can rotate to either side. Larger values mean tighter turns.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrMinWaterImpactForce = Plugin._Instance.config("Knarr", "Min Water Impact Force", 5f, new ConfigDescription("Minimum collision force with water required to trigger splash effects or damage.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrMinWaterImpactInterval = Plugin._Instance.config("Knarr", "Min Water Impact Interval", 2f, new ConfigDescription("Minimum time between water impact events to avoid spamming effects.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrWaterImpactDamage = Plugin._Instance.config("Knarr", "Water Impact Damage", 10f, new ConfigDescription("Damage applied to the ship when hitting water too hard (e.g., falling from height).", (AcceptableValueBase)null, Array.Empty<object>())); _knarrUpsideDownDmgInterval = Plugin._Instance.config("Knarr", "Upside Down Dmg Interval", 1f, new ConfigDescription("Time interval between damage ticks when the ship is flipped upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrUpsideDownDmg = Plugin._Instance.config("Knarr", "Upside Down Dmg", 20f, new ConfigDescription("Amount of blunt damage applied each tick while upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _knarrHealthPoints = Plugin._Instance.config("Knarr", "Health Points", 2000f, new ConfigDescription(string.Empty, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>())); } private static void OutriggerKarve() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Expected O, but got Unknown //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown _outriggerKarveContainerWidth = Plugin._Instance.config("Outrigger Karve", "Storage Width", 4, new ConfigDescription("Outrigger Karve storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _outriggerKarveContainerHeight = Plugin._Instance.config("Outrigger Karve", "Storage Height", 3, new ConfigDescription("Outrigger Karve storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _outriggerKarveWaterLevelOffset = Plugin._Instance.config("Outrigger Karve", "Water Level Offset", 1.2f, new ConfigDescription("Vertical offset applied when comparing the ship’s center of mass to the water level. \nPositive values make the ship sit higher; negative values make it sink deeper.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveForceDistance = Plugin._Instance.config("Outrigger Karve", "Force Distance", 2f, new ConfigDescription("The distance over which buoyancy force scales. Larger values make the ship respond more gradually to water depth changes.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveForce = Plugin._Instance.config("OutriggerKarve", "Force", 1f, new ConfigDescription("The base upward buoyancy force applied when submerged. Controls how strongly the ship floats.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDamping = Plugin._Instance.config("Outrigger Karve", "Damping", 0.05f, new ConfigDescription("General damping applied to vertical motion to prevent oscillation or jitter when floating.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDampingSideway = Plugin._Instance.config("Outrigger Karve", "Damping Sideway", 0.15f, new ConfigDescription("Reduces sideways drift by applying resistance proportional to lateral velocity.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDampingForward = Plugin._Instance.config("Outrigger Karve", "Damping Forward", 0.001f, new ConfigDescription("Reduces forward/backward drift when moving through water.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveAngularDamping = Plugin._Instance.config("Outrigger Karve", "Angular Damping", 0.05f, new ConfigDescription("Slows down rotational motion (pitch, roll, yaw) to stabilize the ship’s orientation.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDisableLevel = Plugin._Instance.config("Outrigger Karve", "Disable Level", -0.5f, new ConfigDescription("Threshold depth below which buoyancy forces stop being applied (e.g., when the ship is out of water).", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveSailForceOffset = Plugin._Instance.config("Outrigger Karve", "Sail Force Offset", 1.3f, new ConfigDescription("Vertical offset from the ship’s center where wind force is applied. Simulates the sail’s position above the hull.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveSailForceFactor = Plugin._Instance.config("Outrigger Karve", "Sail Force Factor", 0.03f, new ConfigDescription("Multiplier for wind strength. Higher values make the sail catch more wind and accelerate faster.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveRudderSpeed = Plugin._Instance.config("Outrigger Karve", "Rudder Speed", 1.3f, new ConfigDescription("How quickly the rudder turns in response to player input.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveStearForceOffset = Plugin._Instance.config("Outrigger Karve", "Steer Force Offset", -6f, new ConfigDescription("Position along the ship’s forward axis where steering forces are applied. \nNegative values place it behind the center (typical for rudders).", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveStearForce = Plugin._Instance.config("Outrigger Karve", "Steer Force", 0.2f, new ConfigDescription("Strength of the lateral steering force. Controls how sharply the ship turns.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveStearVelForceFactor = Plugin._Instance.config("Outrigger Karve", "Steer Vel Force Factor", 0.18f, new ConfigDescription("Scales steering force based on current forward velocity—helps stabilize turning at different speeds.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveBackwardForce = Plugin._Instance.config("Outrigger Karve", "Backward Force", 0.2f, new ConfigDescription("The reverse propulsion force when moving backward or slowing down.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveRudderRotationMax = Plugin._Instance.config("Outrigger Karve", "Rudder Rotation Max", 45f, new ConfigDescription("Maximum angle the rudder can rotate to either side. Larger values mean tighter turns.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveMinWaterImpactForce = Plugin._Instance.config("Outrigger Karve", "Min Water Impact Force", 4f, new ConfigDescription("Minimum collision force with water required to trigger splash effects or damage.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveMinWaterImpactInterval = Plugin._Instance.config("Outrigger Karve", "Min Water Impact Interval", 2f, new ConfigDescription("Minimum time between water impact events to avoid spamming effects.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveWaterImpactDamage = Plugin._Instance.config("Outrigger Karve", "Water Impact Damage", 10f, new ConfigDescription("Damage applied to the ship when hitting water too hard (e.g., falling from height).", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveUpsideDownDmgInterval = Plugin._Instance.config("Outrigger Karve", "Upside Down Dmg Interval", 1f, new ConfigDescription("Time interval between damage ticks when the ship is flipped upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveUpsideDownDmg = Plugin._Instance.config("Outrigger Karve", "Upside Down Dmg", 20f, new ConfigDescription("Amount of blunt damage applied each tick while upside down.", (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveHealthPoints = Plugin._Instance.config("Outrigger Karve", "Health Points", 500f, new ConfigDescription(string.Empty, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), Array.Empty<object>())); } private static void OutriggerSkeid() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Expected O, but got Unknown //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Expected O, but got Unknown //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03cf: