Decompiled source of BoatAdditions v1.4.1
BoatAdditions.dll
Decompiled a month 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.1")] [assembly: AssemblyInformationalVersion("1.4.1")] [assembly: AssemblyProduct("BoatAdditions")] [assembly: AssemblyTitle("BoatAdditions")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BoatAdditions { [BepInPlugin("blacks7ar.BoatAdditions", "BoatAdditions", "1.4.1")] 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.1"; public const string modLink = "https://valheim.thunderstore.io/package/blacks7ar/BoatAdditions/"; private static readonly Harmony _harmony = new Harmony("blacks7ar.BoatAdditions"); private static readonly ConfigSync _configSync = new ConfigSync("blacks7ar.BoatAdditions") { DisplayName = "BoatAdditions", CurrentVersion = "1.4.1", MinimumRequiredVersion = "1.4.1" }; private static ConfigEntry<BoatAdditions.Functions.Toggle> _serverConfigLocked; public static ConfigEntry<KeyboardShortcut> _anchorKey; public static ConfigEntry<BoatAdditions.Functions.Toggle> _enableCustomSail; public static Plugin _Instance; public static Localization english; 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) _Instance = this; ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; Localizer.Load(); english = new Localization(); english.SetupLanguage("English"); _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 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("2- General", "Anchor Key", new KeyboardShortcut((KeyCode)102, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), "Hotkey combination to raise or drop anchors while hovering your mouse to the rudder"); _enableCustomSail = ((BaseUnityPlugin)this).Config.Bind<BoatAdditions.Functions.Toggle>("2- General", "Enable Custom Sail", BoatAdditions.Functions.Toggle.Off, "Enable/Disable my custom sail (blacks7ar logo).\n(NOTE: Needs a Logout to take effect.)"); ConfigSetup.Init(); SetupPrefabs.Init(); 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(Container), "Awake")] public class ContainerPatch { private static void Postfix(Container __instance, ref Inventory ___m_inventory) { if (!((Object)(object)__instance == (Object)null) && ___m_inventory != null) { ref int width = ref ___m_inventory.m_width; ref int height = ref ___m_inventory.m_height; switch (__instance.m_name) { case "$bba_outrigger_karve_storage": width = ConfigSetup._outriggerKarveContainerWidth.Value; height = ConfigSetup._outriggerKarveContainerHeight.Value; break; case "$bba_outrigger_skeid": width = ConfigSetup._outriggerSkeidContainerWidth.Value; height = ConfigSetup._outriggerSkeidContainerHeight.Value; break; case "$bba_snekkja_storage": width = ConfigSetup._snekkjaContainerWidth.Value; height = ConfigSetup._snekkjaContainerHeight.Value; break; case "$bba_largeraft_cargo": width = ConfigSetup._largeRaftContainerWidth.Value; height = ConfigSetup._largeRaftContainerHeight.Value; break; case "$bba_knarr_storage": width = ConfigSetup._knarrContainerWidth.Value; height = ConfigSetup._knarrContainerHeight.Value; break; } } } } [HarmonyPatch] public class ShipControlsPatch { private static readonly int _isAnchored = StringExtensionMethods.GetStableHashCode("IsAnchored"); [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_"))) { if (__instance.m_nview.GetZDO().GetBool(_isAnchored, false)) { componentInParent.constraints = (RigidbodyConstraints)10; } else { componentInParent.constraints = (RigidbodyConstraints)0; } } } [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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: 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>"); } __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>"); } __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); } } } } [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); Helper.CustomSail(((Component)__instance).gameObject); } break; } break; case 20: switch (text[15]) { case 'k': if (text == "$bba_outrigger_karve") { ShipStats.OutriggerKarve(__instance); Helper.CustomSail(((Component)__instance).gameObject); } break; case 's': if (text == "$bba_outrigger_skeid") { ShipStats.OutriggerSkeid(__instance); Helper.CustomSail(((Component)__instance).gameObject); } break; } break; case 12: switch (text[5]) { case 's': if (text == "$bba_snekkja") { ShipStats.Snekkja(__instance); Helper.CustomSail(((Component)__instance).gameObject); } break; case 'd': if (text == "$bba_drakker") { ShipStats.Drakker(__instance); } break; } break; case 14: if (text == "$bba_largeraft") { ShipStats.LargeRaft(__instance); } 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.LargeRaft(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; } } } } } namespace BoatAdditions.Functions { public class Anchor : MonoBehaviour, Hoverable { public Ship m_ship; public float m_maxUseRange = 10f; public ZNetView m_nview; public Rigidbody m_rigidBody; private static readonly int m_isAnchored = StringExtensionMethods.GetStableHashCode("IsAnchored"); public void Awake() { m_nview = ((Component)m_ship).GetComponent<ZNetView>(); m_rigidBody = ((Component)m_ship).GetComponent<Rigidbody>(); m_nview.Register<long>("UseAnchor", (Action<long, long>)RPC_UseAnchor); m_nview.Register<bool>("RequestAnchor", (Action<long, bool>)RPC_RequestAnchor); if (m_nview.IsValid()) { if (m_nview.GetZDO().GetBool(m_isAnchored, false)) { m_rigidBody.constraints = (RigidbodyConstraints)10; } else { m_rigidBody.constraints = (RigidbodyConstraints)0; } } } public bool UseItem(Humanoid user, ItemData item) { return false; } public string GetHoverText() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) KeyboardShortcut value = Plugin._anchorKey.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { m_nview.InvokeRPC("UseAnchor", new object[1] { ((ZDOID)(ref ((Character)Player.m_localPlayer).m_nview.GetZDO().m_uid)).UserID }); } if (!m_nview.GetZDO().GetBool(m_isAnchored, false)) { if (!InUseDistance((Humanoid)(object)Player.m_localPlayer)) { return ""; } return Localization.instance.Localize($"\n[<color=yellow><b>{Plugin._anchorKey.Value}</b></color>] $drop_anchors"); } if (!InUseDistance((Humanoid)(object)Player.m_localPlayer)) { return ""; } return Localization.instance.Localize($"\n[<color=yellow><b>{Plugin._anchorKey.Value}</b></color>] $raise_anchors"); } public string GetHoverName() { return ""; } public void RPC_UseAnchor(long sender, long playerID) { if (m_nview.IsOwner() && m_ship.IsPlayerInBoat(playerID)) { if (GetUser() == playerID || !HaveValidUser()) { m_nview.InvokeRPC(sender, "RequestAnchor", new object[1] { true }); } else { m_nview.InvokeRPC(sender, "RequestAnchor", new object[1] { false }); } } } public void RPC_RequestAnchor(long sender, bool granted) { //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)Player.m_localPlayer) && granted) { if (!m_nview.GetZDO().GetBool(m_isAnchored, false)) { m_nview.GetZDO().Set(m_isAnchored, true); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("vfx_Place_wood_pole"), ((Component)m_ship.m_shipControlls).transform.position, Quaternion.identity); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_build_hammer_metal"), ((Component)m_ship.m_shipControlls).transform.position, Quaternion.identity); m_rigidBody.constraints = (RigidbodyConstraints)10; } else { m_nview.GetZDO().Set(m_isAnchored, false); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("vfx_Place_wood_pole"), ((Component)m_ship.m_shipControlls).transform.position, Quaternion.identity); Object.Instantiate<GameObject>(ZNetScene.instance.GetPrefab("sfx_build_hammer_metal"), ((Component)m_ship.m_shipControlls).transform.position, Quaternion.identity); m_rigidBody.constraints = (RigidbodyConstraints)0; } } } public bool HaveValidUser() { long user = GetUser(); if (user != 0L) { return m_ship.IsPlayerInBoat(user); } return false; } public long GetUser() { if (m_nview.IsValid()) { return m_nview.GetZDO().GetLong(ZDOVars.s_user, 0L); } return 0L; } public bool InUseDistance(Humanoid human) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) return Vector3.Distance(((Component)human).transform.position, m_ship.m_shipControlls.m_attachPoint.position) < m_maxUseRange; } } 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> _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> _largeRaftContainerWidth; public static ConfigEntry<int> _largeRaftContainerHeight; public static ConfigEntry<float> _largeRaftWaterLevelOffset; public static ConfigEntry<float> _largeRaftForceDistance; public static ConfigEntry<float> _largeRaftForce; public static ConfigEntry<float> _largeRaftDamping; public static ConfigEntry<float> _largeRaftDampingSideway; public static ConfigEntry<float> _largeRaftDampingForward; public static ConfigEntry<float> _largeRaftAngularDamping; public static ConfigEntry<float> _largeRaftDisableLevel; public static ConfigEntry<float> _largeRaftSailForceOffset; public static ConfigEntry<float> _largeRaftSailForceFactor; public static ConfigEntry<float> _largeRaftRudderSpeed; public static ConfigEntry<float> _largeRaftStearForceOffset; public static ConfigEntry<float> _largeRaftStearForce; public static ConfigEntry<float> _largeRaftStearVelForceFactor; public static ConfigEntry<float> _largeRaftBackwardForce; public static ConfigEntry<float> _largeRaftRudderRotationMax; public static ConfigEntry<float> _largeRaftMinWaterImpactForce; public static ConfigEntry<float> _largeRaftMinWaterImpactInterval; public static ConfigEntry<float> _largeRaftWaterImpactDamage; public static ConfigEntry<float> _largeRaftUpsideDownDmgInterval; public static ConfigEntry<float> _largeRaftUpsideDownDmg; public static ConfigEntry<float> _largeRaftHealthPoints; 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; public static void Init() { Canoe(); Knarr(); LargeRaft(); OutriggerKarve(); OutriggerSkeid(); Snekkja(); Drakker(); Kvalsund(); } private static void Drakker() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_drakker"); _drakkerWaterLevelOffset = Plugin._Instance.config(group, "Water Level Offset", 2.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerForceDistance = Plugin._Instance.config(group, "Force Distance", 3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerForce = Plugin._Instance.config(group, "Force", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDamping = Plugin._Instance.config(group, "Damping", 0.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.002f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.95f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.4f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerStearForceOffset = Plugin._Instance.config(group, "Stear Force Offset", -22f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerStearForce = Plugin._Instance.config(group, "Stear Force", 1.75f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerStearVelForceFactor = Plugin._Instance.config(group, "Stear Vel Force Factor", 1.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.25f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _drakkerHealthPoints = Plugin._Instance.config(group, "Health Points", 3000f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); } private static void Kvalsund() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_kvalsund"); _kvalsundWaterLevelOffset = Plugin._Instance.config(group, "Water Level Offset", 2.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundForceDistance = Plugin._Instance.config(group, "Force Distance", 3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundForce = Plugin._Instance.config(group, "Force", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDamping = Plugin._Instance.config(group, "Damping", 0.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.002f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.95f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundStearForceOffset = Plugin._Instance.config(group, "Stear Force Offset", -22f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundStearForce = Plugin._Instance.config(group, "Stear Force", 1.75f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundStearVelForceFactor = Plugin._Instance.config(group, "Stear Vel Force Factor", 1.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.25f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _kvalsundHealthPoints = Plugin._Instance.config(group, "Health Points", 3000f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); } private static void Canoe() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Expected O, but got Unknown //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Expected O, but got Unknown //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_canoe"); _canoeWaterLevelOffset = Plugin._Instance.config(group, "Water Level Offset", 1.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeForceDistance = Plugin._Instance.config(group, "Force Distance", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeForce = Plugin._Instance.config(group, "Force", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeDamping = Plugin._Instance.config(group, "Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.15f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.001f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 1.8f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeStearForceOffset = Plugin._Instance.config(group, "Steer Force Offset", -3.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeStearForce = Plugin._Instance.config(group, "Steer Force", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeStearVelForceFactor = Plugin._Instance.config(group, "Steer Vel Force Factor", 0.18f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 4f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _canoeHealthPoints = Plugin._Instance.config(group, "Health Points", 200f, new ConfigDescription("Canoes health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); } private static void Knarr() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Expected O, but got Unknown //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_knarr"); _knarrContainerWidth = Plugin._Instance.config(group, "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(group, "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(group, "Water Level Offset", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrForceDistance = Plugin._Instance.config(group, "Force Distance", 3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrForce = Plugin._Instance.config(group, "Force", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrDamping = Plugin._Instance.config(group, "Damping", 0.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.002f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.95f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.12f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrStearForceOffset = Plugin._Instance.config(group, "Steer Force Offset", -22f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrStearForce = Plugin._Instance.config(group, "Steer Force", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrStearVelForceFactor = Plugin._Instance.config(group, "Steer Vel Force Factor", 1.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.35f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _knarrHealthPoints = Plugin._Instance.config(group, "Health Points", 2000f, new ConfigDescription("Knarrs health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); } private static void LargeRaft() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Expected O, but got Unknown //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_largeraft"); _largeRaftContainerWidth = Plugin._Instance.config(group, "Storage Width", 2, new ConfigDescription("Large Raft storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _largeRaftContainerHeight = Plugin._Instance.config(group, "Storage Height", 2, new ConfigDescription("Large Raft storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _largeRaftWaterLevelOffset = Plugin._Instance.config(group, "Water Level Offset", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftForceDistance = Plugin._Instance.config(group, "Force Distance", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftForce = Plugin._Instance.config(group, "Force", 0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftDamping = Plugin._Instance.config(group, "Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.005f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftStearForceOffset = Plugin._Instance.config(group, "Steer Force Offset", -2.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftStearForce = Plugin._Instance.config(group, "Steer Force", 0.3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftStearVelForceFactor = Plugin._Instance.config(group, "Steer Vel Force Factor", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _largeRaftHealthPoints = Plugin._Instance.config(group, "Health Points", 350f, new ConfigDescription("Large rafts health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); } private static void OutriggerKarve() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Expected O, but got Unknown //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_outrigger_karve"); _outriggerKarveContainerWidth = Plugin._Instance.config(group, "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(group, "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(group, "Water Level Offset", 1.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveForceDistance = Plugin._Instance.config(group, "Force Distance", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveForce = Plugin._Instance.config(group, "Force", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDamping = Plugin._Instance.config(group, "Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.15f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.001f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 1.3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.03f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveStearForceOffset = Plugin._Instance.config(group, "Steer Force Offset", -3.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveStearForce = Plugin._Instance.config(group, "Steer Force", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveStearVelForceFactor = Plugin._Instance.config(group, "Steer Vel Force Factor", 0.18f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 4f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerKarveHealthPoints = Plugin._Instance.config(group, "Health Points", 500f, new ConfigDescription("Outrigger karves health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); } private static void OutriggerSkeid() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Expected O, but got Unknown //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_outrigger_skeid"); _outriggerSkeidContainerWidth = Plugin._Instance.config(group, "Storage Width", 8, new ConfigDescription("Outrigger Skeid storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _outriggerSkeidContainerHeight = Plugin._Instance.config(group, "Storage Height", 4, new ConfigDescription("Outrigger Skeid storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _outriggerSkeidWaterLevelOffset = Plugin._Instance.config(group, "Water Level Offset", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidForceDistance = Plugin._Instance.config(group, "Force Distance", 3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidForce = Plugin._Instance.config(group, "Force", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidDamping = Plugin._Instance.config(group, "Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.15f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.001f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidStearForceOffset = Plugin._Instance.config(group, "Stear Force Offset", -8f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidStearForce = Plugin._Instance.config(group, "Stear Force", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidStearVelForceFactor = Plugin._Instance.config(group, "Stear Vel Force Factor", 0.8f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _outriggerSkeidHealthPoints = Plugin._Instance.config(group, "Health Points", 1000f, new ConfigDescription("Outrigger skeids health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); } private static void Snekkja() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Expected O, but got Unknown //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Expected O, but got Unknown //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown string group = Plugin.english.Localize("$bba_snekkja"); _snekkjaContainerWidth = Plugin._Instance.config(group, "Storage Width", 7, new ConfigDescription("Snekkja storage row size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 8), Array.Empty<object>())); _snekkjaContainerHeight = Plugin._Instance.config(group, "Storage Height", 4, new ConfigDescription("Snekkja storage column size.\n(NOTE: Need to restart the game to take effect)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 4), Array.Empty<object>())); _snekkjaWaterLevelOffset = Plugin._Instance.config(group, "Water Level Offset", 1.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaForceDistance = Plugin._Instance.config(group, "Force Distance", 3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaForce = Plugin._Instance.config(group, "Force", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaDamping = Plugin._Instance.config(group, "Damping", 0.05f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaDampingSideway = Plugin._Instance.config(group, "Damping Sideway", 0.15f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaDampingForward = Plugin._Instance.config(group, "Damping Forward", 0.001f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaAngularDamping = Plugin._Instance.config(group, "Angular Damping", 0.3f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaDisableLevel = Plugin._Instance.config(group, "Disable Level", -0.5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaSailForceOffset = Plugin._Instance.config(group, "Sail Force Offset", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaSailForceFactor = Plugin._Instance.config(group, "Sail Force Factor", 0.1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaRudderSpeed = Plugin._Instance.config(group, "Rudder Speed", 1.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaStearForceOffset = Plugin._Instance.config(group, "Stear Force Offset", -8f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaStearForce = Plugin._Instance.config(group, "Stear Force", 1.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaStearVelForceFactor = Plugin._Instance.config(group, "Stear Vel Force Factor", 0.8f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaBackwardForce = Plugin._Instance.config(group, "Backward Force", 0.2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaRudderRotationMax = Plugin._Instance.config(group, "Rudder Rotation Max", 45f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaMinWaterImpactForce = Plugin._Instance.config(group, "Min Water Impact Force", 5f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaMinWaterImpactInterval = Plugin._Instance.config(group, "Min Water Impact Interval", 2f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaWaterImpactDamage = Plugin._Instance.config(group, "Water Impact Damage", 10f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaUpsideDownDmgInterval = Plugin._Instance.config(group, "Upside Down Dmg Interval", 1f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaUpsideDownDmg = Plugin._Instance.config(group, "Upside Down Dmg", 20f, new ConfigDescription(string.Empty, (AcceptableValueBase)null, Array.Empty<object>())); _snekkjaHealthPoints = Plugin._Instance.config(group, "Health Points", 1500f, new ConfigDescription("Snekkjas health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); } } public static class Helper { public static void CustomSail(GameObject gameObject) { Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(true); foreach (Renderer val in componentsInChildren) { if ((Object)(object)val == (Object)null) { continue; } Material[] sharedMaterials = val.sharedMaterials; foreach (Material val2 in sharedMaterials) { if (!((Object)(object)val2 == (Object)null) && ((Object)val2).name == "bba_sail_white") { val.material = SetupPrefabs._boatBundle.LoadAsset<Material>((Plugin._enableCustomSail.Value == Toggle.On) ? "bba_sail_white" : "bba_sail"); } } } } } public static class SetupPrefabs { public static AssetBundle _boatBundle; private const string _category = "BoatAdditions"; public static void Init() { _boatBundle = PiecePrefabManager.RegisterAssetBundle("shipbundle"); BoatYard(); BoatItems(); Boats(); Others(); } private static void BoatYard() { BuildPiece buildPiece = new BuildPiece(_boatBundle, "BBA_Boatyard"); buildPiece.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece.Category.Set("BoatAdditions"); buildPiece.RequiredItems.Add("FineWood", 120, recover: true); buildPiece.RequiredItems.Add("Stone", 16, recover: true); buildPiece.RequiredItems.Add("Resin", 22, recover: true); buildPiece.RequiredItems.Add("DeerHide", 12, recover: true); buildPiece.RequiredItems.Add("Bronze", 16, recover: true); buildPiece.SpecialProperties = new SpecialProperties { AdminOnly = false, NoConfig = false }; ShaderReplacer.Replace(buildPiece.Prefab); } private static void Boats() { BuildPiece buildPiece = new BuildPiece(_boatBundle, "BBA_Canoe"); buildPiece.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece.Category.Set("BoatAdditions"); buildPiece.RequiredItems.Add("BBA_SmallHull", 1, recover: true); buildPiece.RequiredItems.Add("Wood", 4, recover: true); buildPiece.RequiredItems.Add("Resin", 10, recover: true); buildPiece.SpecialProperties = new SpecialProperties { AdminOnly = false, NoConfig = false }; ShaderReplacer.Replace(buildPiece.Prefab); BuildPiece buildPiece2 = new BuildPiece(_boatBundle, "BBA_Knarr"); buildPiece2.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece2.Category.Set("BoatAdditions"); buildPiece2.RequiredItems.Add("BBA_LargeHull", 1, recover: true); buildPiece2.RequiredItems.Add("BBA_Mast", 1, recover: true); buildPiece2.RequiredItems.Add("YggdrasilWood", 40, recover: true); buildPiece2.RequiredItems.Add("BlackMetal", 50, recover: true); buildPiece2.RequiredItems.Add("Resin", 70, recover: true); ShaderReplacer.Replace(buildPiece2.Prefab); Helper.CustomSail(buildPiece2.Prefab); BuildPiece buildPiece3 = new BuildPiece(_boatBundle, "BBA_LargeRaft"); buildPiece3.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece3.Category.Set("BoatAdditions"); buildPiece3.RequiredItems.Add("Wood", 40, recover: true); buildPiece3.RequiredItems.Add("LeatherScraps", 12, recover: true); buildPiece3.RequiredItems.Add("DeerHide", 6, recover: true); buildPiece3.RequiredItems.Add("Resin", 15, recover: true); ShaderReplacer.Replace(buildPiece3.Prefab); BuildPiece buildPiece4 = new BuildPiece(_boatBundle, "BBA_OutriggerKarve"); buildPiece4.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece4.Category.Set("BoatAdditions"); buildPiece4.RequiredItems.Add("BBA_SmallHull", 1, recover: true); buildPiece4.RequiredItems.Add("BBA_Mast", 1, recover: true); buildPiece4.RequiredItems.Add("Wood", 12, recover: true); buildPiece4.RequiredItems.Add("Copper", 8, recover: true); buildPiece4.RequiredItems.Add("Resin", 20, recover: true); ShaderReplacer.Replace(buildPiece4.Prefab); Helper.CustomSail(buildPiece4.Prefab); BuildPiece buildPiece5 = new BuildPiece(_boatBundle, "BBA_OutriggerSkeid"); buildPiece5.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece5.Category.Set("BoatAdditions"); buildPiece5.RequiredItems.Add("BBA_LargeHull", 1, recover: true); buildPiece5.RequiredItems.Add("BBA_Mast", 1, recover: true); buildPiece5.RequiredItems.Add("Wood", 40, recover: true); buildPiece5.RequiredItems.Add("Iron", 10, recover: true); buildPiece5.RequiredItems.Add("Resin", 30, recover: true); ShaderReplacer.Replace(buildPiece5.Prefab); Helper.CustomSail(buildPiece5.Prefab); BuildPiece buildPiece6 = new BuildPiece(_boatBundle, "BBA_Snekkja"); buildPiece6.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece6.Category.Set("BoatAdditions"); buildPiece6.RequiredItems.Add("BBA_LargeHull", 1, recover: true); buildPiece6.RequiredItems.Add("BBA_Mast", 1, recover: true); buildPiece6.RequiredItems.Add("DeerHide", 30, recover: true); buildPiece6.RequiredItems.Add("Iron", 10, recover: true); buildPiece6.RequiredItems.Add("Resin", 50, recover: true); ShaderReplacer.Replace(buildPiece6.Prefab); Helper.CustomSail(buildPiece6.Prefab); BuildPiece buildPiece7 = new BuildPiece(_boatBundle, "BBA_Kvalsund"); buildPiece7.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece7.Category.Set("BoatAdditions"); buildPiece7.RequiredItems.Add("BBA_SturdyHull", 1, recover: true); buildPiece7.RequiredItems.Add("BBA_Mast", 1, recover: true); buildPiece7.RequiredItems.Add("YggdrasilWood", 84, recover: true); buildPiece7.RequiredItems.Add("Iron", 60, recover: true); buildPiece7.RequiredItems.Add("JuteRed", 32, recover: true); ShaderReplacer.Replace(buildPiece7.Prefab); BuildPiece buildPiece8 = new BuildPiece(_boatBundle, "BBA_Drakker"); buildPiece8.Crafting.Set(PieceManager.CraftingTable.Workbench); buildPiece8.Category.Set("BoatAdditions"); buildPiece8.RequiredItems.Add("BBA_SturdyHull", 1, recover: true); buildPiece8.RequiredItems.Add("BBA_Mast", 1, recover: true); buildPiece8.RequiredItems.Add("BlackMetal", 92, recover: true); buildPiece8.RequiredItems.Add("Iron", 40, recover: true); buildPiece8.RequiredItems.Add("CeramicPlate", 36, recover: true); ShaderReplacer.Replace(buildPiece8.Prefab); Helper.CustomSail(buildPiece8.Prefab); } private static void BoatItems() { Item item = new Item(_boatBundle, "BBA_LargeHull"); item.Crafting.Add("BBA_Boatyard", 1); item.RequiredItems.Add("ElderBark", 60); item.RequiredItems.Add("FineWood", 60); item.RequiredItems.Add("Wood", 30); item.RequiredItems.Add("IronNails", 140); item.Configurable = Configurability.Recipe; ShaderReplacer.Replace(item.Prefab); Item item2 = new Item(_boatBundle, "BBA_Mast"); item2.Crafting.Add("BBA_Boatyard", 1); item2.RequiredItems.Add("DeerHide", 40); item2.RequiredItems.Add("LeatherScraps", 20); item2.RequiredItems.Add("RoundLog", 2); item2.RequiredItems.Add("Raspberry", 10); item2.Configurable = Configurability.Recipe; ShaderReplacer.Replace(item2.Prefab); Item item3 = new Item(_boatBundle, "BBA_SmallHull"); item3.Crafting.Add("BBA_Boatyard", 1); item3.RequiredItems.Add("FineWood", 30); item3.RequiredItems.Add("Wood", 15); item3.RequiredItems.Add("RoundLog", 4); item3.RequiredItems.Add("BronzeNails", 100); item3.Configurable = Configurability.Recipe; ShaderReplacer.Replace(item3.Prefab); Item item4 = new Item(_boatBundle, "BBA_SturdyHull"); item4.Crafting.Add("BBA_Boatyard", 1); item4.RequiredItems.Add("ElderBark", 76); item4.RequiredItems.Add("YggdrasilWood", 62); item4.RequiredItems.Add("FineWood", 48); item4.RequiredItems.Add("IronNails", 220); item4.Configurable = Configurability.Recipe; ShaderReplacer.Replace(item4.Prefab); } private static void Others() { PrefabManager.RegisterPrefab(_boatBundle, "BBA_CargoCrate"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_build_hammer_wood"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_chest_close"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_chest_open"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_gui_craftitem_workbench"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_gui_craftitem_workbench_end"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_gui_repairitem_workbench"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_ship_destroyed"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_ship_impact"); PrefabManager.RegisterPrefab(_boatBundle, "bba_sfx_ship_waterimpact"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_clubhit"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Damaged_Karve"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Damaged_Raft"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Damaged_VikingShip"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Destroyed_Karve"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Destroyed_Raft"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Destroyed_VikingShip"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Place_charcoalkiln"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Place_Karve"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Place_Raft"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Place_VikingShip"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_Place_workbench"); PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_SawDust"); ShaderReplacer.Replace(PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_WaterImpact_Karve")); ShaderReplacer.Replace(PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_WaterImpact_Raft")); ShaderReplacer.Replace(PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_WaterImpact_VikingShip")); ShaderReplacer.Replace(PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_watersplash_karve")); ShaderReplacer.Replace(PrefabManager.RegisterPrefab(_boatBundle, "bba_vfx_watersplash_longship")); } } public static class ShaderReplacer { private static readonly List<GameObject> GOToSwap; static ShaderReplacer() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown GOToSwap = new List<GameObject>(); new Harmony("blacks7ar.utilities.ShaderReplacer").Patch((MethodBase)AccessTools.DeclaredMethod(typeof(FejdStartup), "Awake", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(ShaderReplacer), "ReplaceShaderPatch", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } public static void Replace(GameObject gameObject) { GOToSwap.Add(gameObject); } [HarmonyPriority(700)] private static void Replac