Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of TeleportationMeads v1.2.8
TeleportationMeads.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.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 BepInEx.Logging; using HarmonyLib; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using ServerSync; using TMPro; using TeleportationMeads.Functions; using TeleportationMeads.Patches; using TeleportationMeads.Utils; using UnityEngine; 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.2.8")] [assembly: AssemblyInformationalVersion("1.0.0+5efa49a659a0b25e98de4ad9724651b1226f4823")] [assembly: AssemblyProduct("TeleportationMeads")] [assembly: AssemblyTitle("TeleportationMeads")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.8.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 TeleportationMeads { [BepInPlugin("blacks7ar.TeleportationMeads", "TeleportationMeads", "1.2.8")] public class Plugin : BaseUnityPlugin { private const string modGUID = "blacks7ar.TeleportationMeads"; public const string modName = "TeleportationMeads"; public const string modAuthor = "blacks7ar"; public const string modVersion = "1.2.8"; public const string modLink = "https://valheim.thunderstore.io/package/blacks7ar/TeleportationMeads/"; private static readonly Harmony _harmony = new Harmony("blacks7ar.TeleportationMeads"); private static readonly ConfigSync _configSync = new ConfigSync("blacks7ar.TeleportationMeads") { DisplayName = "TeleportationMeads", CurrentVersion = "1.2.8", MinimumRequiredVersion = "1.2.8" }; private static ConfigEntry<Toggle> _serverConfigLocked; public static ConfigEntry<float> _huginsMeadCD; public static ConfigEntry<float> _haldorsMeadCD; public static ConfigEntry<float> _odinsMeadCD; public static ConfigEntry<float> _knarrsMeadCD; public static ConfigEntry<float> _herculesMeadCD; public static ConfigEntry<float> _herculesMeadEffectDuration; public static ConfigEntry<float> _dvergersMeadCD; public static ConfigEntry<float> _hildirsMeadCD; public static Vector3 _savedPosition; public static Vector3 _spawnPoint; public static Vector3 _startPoint; public static Vector3 _traderPoint; public static Vector3 _hildirPoint; public static bool _portalActivated; public static bool _haldorsMeadUsed; public static bool _odinsMeadUsed; public static bool _huginsMeadUsed; public static bool _dvergersMeadUsed; public static bool _hildirsMeadUsed; public static bool _countBegan; public static Plugin _Instance; public static readonly Dictionary<GameObject, GameObject> ToBeFermented = new Dictionary<GameObject, GameObject>(); public static readonly Dictionary<GameObject, GameObject> ToBeFermented2 = new Dictionary<GameObject, GameObject>(); public ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedConfig = true) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ConfigDescription val = new ConfigDescription(description.Description + (synchronizedConfig ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags); ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val); _configSync.AddConfigEntry<T>(val2).SynchronizedConfig = synchronizedConfig; return val2; } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown _Instance = this; ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; Localizer.Load(); _serverConfigLocked = config("1- ServerSync", "Lock Configuration", 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<Toggle>(_serverConfigLocked); PrefabSetup.Init(); string group = "Haldors Mead"; _haldorsMeadCD = config(group, "Haldors Mead Cooldown", 60f, new ConfigDescription("Haldor's mead cooldown duration in seconds. (Recommended: 60)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); string group2 = "Odins Mead"; _odinsMeadCD = config(group2, "Odins Mead Cooldown", 120f, new ConfigDescription("Odin's mead cooldown duration in seconds. (Recommended: 120)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); string group3 = "Knarrs Mead"; _knarrsMeadCD = config(group3, "Knarrs Mead Cooldown", 60f, new ConfigDescription("Knarr's mead cooldown duration in seconds. (Recommended: 60)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); string group4 = "Hugins Mead"; _huginsMeadCD = config(group4, "Hugins Mead Cooldown", 120f, new ConfigDescription("Hugin's Mead cooldown duration in seconds. (Recommended: 120)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); string group5 = "Hercules Mead"; _herculesMeadCD = config(group5, "Hercules Mead Cooldown", 420f, new ConfigDescription("Hercules mead cooldown duration in seconds. (Recommended: 420)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); _herculesMeadEffectDuration = config(group5, "Herculean Buff Duration", 300f, new ConfigDescription("Herculean Buff duration in seconds. (Recommended: 300)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); string group6 = "Dvergers Mead"; _dvergersMeadCD = config(group6, "Dvergers Mead Cooldown", 120f, new ConfigDescription("Dvergers mead cooldown duration in seconds. (Recommended: 120)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); string group7 = "Hildirs Mead"; _hildirsMeadCD = config(group7, "Hildirs Mead Cooldown", 120f, new ConfigDescription("Hildirs mead cooldown duration in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 420f), Array.Empty<object>())); ToBeFermented.Add(PrefabSetup._haldorMeadBase, PrefabSetup._haldorMead); ToBeFermented2.Add(PrefabSetup._odinMeadBase, PrefabSetup._odinMead); ToBeFermented.Add(PrefabSetup._knarrMeadBase, PrefabSetup._knarrMead); ToBeFermented.Add(PrefabSetup._huginMeadBase, PrefabSetup._huginMead); ToBeFermented.Add(PrefabSetup._herculesMeadBase, PrefabSetup._herculesMead); ToBeFermented2.Add(PrefabSetup._dvergrMeadBase, PrefabSetup._dvergrMead); ToBeFermented2.Add(PrefabSetup._hildirsMeadBase, PrefabSetup._hildirsMead); ConfigSetup.Init(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmony.PatchAll(executingAssembly); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; ((BaseUnityPlugin)this).Config.Save(); } private void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } } } namespace TeleportationMeads.Utils { internal static class Helper { public static SE_Stats CreateStatusEffects(string effectName, string m_name, Sprite icon) { SE_Stats obj = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj).name = effectName; ((StatusEffect)obj).m_name = m_name; ((StatusEffect)obj).m_tooltip = m_name; ((StatusEffect)obj).m_icon = icon; return obj; } public static SE_Stats CreateHerculeanBuff(string effectName, string m_name, Sprite icon) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) SE_Stats obj = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj).name = effectName; ((StatusEffect)obj).m_name = m_name; ((StatusEffect)obj).m_tooltip = m_name; ((StatusEffect)obj).m_icon = icon; ((StatusEffect)obj).m_startMessageType = (MessageType)2; ((StatusEffect)obj).m_startMessage = "<size=28><color=red>Herculean Buff</color> started, your Max Carry Weight is now Doubled.</size>"; ((StatusEffect)obj).m_stopMessageType = (MessageType)2; ((StatusEffect)obj).m_stopMessage = "<size=28><color=red>Herculean Buff</color> ended, your Max Carry Weight is now back to normal.</size>"; return obj; } public static void AddGameObject(this ZNetScene zNetScene, GameObject gameObject, bool overWrite = true) { GameObject prefab; if ((Object)(object)(prefab = zNetScene.GetPrefab(((Object)gameObject).name)) != (Object)null) { if (!overWrite) { return; } zNetScene.m_prefabs.Remove(prefab); zNetScene.m_namedPrefabs.Remove(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name)); } zNetScene.m_prefabs.Add(gameObject); zNetScene.m_namedPrefabs.Add(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name), gameObject); } public static void AddGameObject(this ObjectDB objectDB, GameObject gameObject, bool overWrite = true) { GameObject itemPrefab; if ((Object)(object)(itemPrefab = objectDB.GetItemPrefab(((Object)gameObject).name)) != (Object)null) { if (!overWrite) { return; } objectDB.m_items.Remove(itemPrefab); objectDB.m_itemByHash.Remove(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name)); } objectDB.m_items.Add(gameObject); objectDB.m_itemByHash.Add(StringExtensionMethods.GetStableHashCode(((Object)gameObject).name), gameObject); } public static void AddRecipe(this ObjectDB objectDB, Recipe recipe, bool overWrite = true) { if (objectDB.m_recipes.Contains(recipe)) { if (!overWrite) { return; } objectDB.m_recipes.Remove(recipe); } objectDB.m_recipes.Add(recipe); } public static bool ObjectDBAwake() { if ((Object)(object)ObjectDB.instance != (Object)null && ObjectDB.instance.m_items.Count != 0) { return (Object)(object)ObjectDB.instance.GetItemPrefab("Wood") != (Object)null; } return false; } public static bool ZNetSceneAwake() { if ((Object)(object)ZNetScene.instance != (Object)null && ZNetScene.instance.m_prefabs.Count != 0) { return (Object)(object)ZNetScene.instance.GetPrefab("piece_workbench") != (Object)null; } return false; } } public static class Logging { private static readonly ManualLogSource TMLogger = Logger.CreateLogSource("TeleportationMeads"); public static void LogDebug(string debug) { TMLogger.LogDebug((object)debug); } public static void LogInfo(string info) { TMLogger.LogInfo((object)info); } public static void LogWarning(string warning) { TMLogger.LogWarning((object)warning); } public static void LogError(string error) { TMLogger.LogError((object)error); } } public enum Toggle { On = 1, Off = 0 } } namespace TeleportationMeads.Patches { public static class PrefabSetup { private static AssetBundle _meadBundle; public static GameObject _dvergrMead; public static GameObject _dvergrMeadBase; public static GameObject _haldorMead; public static GameObject _haldorMeadBase; public static GameObject _herculesMead; public static GameObject _herculesMeadBase; public static GameObject _huginMead; public static GameObject _huginMeadBase; public static GameObject _knarrMead; public static GameObject _knarrMeadBase; public static GameObject _odinMead; public static GameObject _odinMeadBase; public static Sprite _herculesIcon; public static GameObject _hildirsMead; public static GameObject _hildirsMeadBase; public static void Init() { _meadBundle = GetAssetBundleFromResources("meadbundle"); _dvergrMead = _meadBundle.LoadAsset<GameObject>("BTM_DvergrMead"); _dvergrMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_DvergrMeadBase"); _haldorMead = _meadBundle.LoadAsset<GameObject>("BTM_HaldorMead"); _haldorMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_HaldorMeadBase"); _herculesMead = _meadBundle.LoadAsset<GameObject>("BTM_HerculesMead"); _herculesMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_HerculesMeadBase"); _herculesIcon = _herculesMead.GetComponent<ItemDrop>().m_itemData.GetIcon(); _huginMead = _meadBundle.LoadAsset<GameObject>("BTM_HuginMead"); _huginMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_HuginMeadBase"); _knarrMead = _meadBundle.LoadAsset<GameObject>("BTM_KnarrMead"); _knarrMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_KnarrMeadBase"); _odinMead = _meadBundle.LoadAsset<GameObject>("BTM_OdinMead"); _odinMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_OdinMeadBase"); _hildirsMead = _meadBundle.LoadAsset<GameObject>("BTM_HildirsMead"); _hildirsMeadBase = _meadBundle.LoadAsset<GameObject>("BTM_HildirsMeadBase"); } private static AssetBundle GetAssetBundleFromResources(string filename) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string name = Enumerable.Single(executingAssembly.GetManifestResourceNames(), (string x) => x.EndsWith(filename)); using Stream stream = executingAssembly.GetManifestResourceStream(name); return AssetBundle.LoadFromStream(stream); } } public static class RegisterPrefabsToObjectDB { private static ObjectDB _objectDB => ObjectDB.instance; public static void Init() { if (Helper.ObjectDBAwake()) { DvergrMead(); HaldorMead(); HerculesMead(); HuginMead(); KnarrMead(); OdinsMead(); MeadBase(); HildirsMead(); } } private static void DvergrMead() { _objectDB.AddGameObject(PrefabSetup._dvergrMead); RegisterStatusEffects(PrefabSetup._dvergrMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void HaldorMead() { _objectDB.AddGameObject(PrefabSetup._haldorMead); RegisterStatusEffects(PrefabSetup._haldorMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void HerculesMead() { _objectDB.AddGameObject(PrefabSetup._herculesMead); RegisterStatusEffects(PrefabSetup._herculesMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void HuginMead() { _objectDB.AddGameObject(PrefabSetup._huginMead); RegisterStatusEffects(PrefabSetup._huginMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void KnarrMead() { _objectDB.AddGameObject(PrefabSetup._knarrMead); RegisterStatusEffects(PrefabSetup._knarrMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void OdinsMead() { _objectDB.AddGameObject(PrefabSetup._odinMead); RegisterStatusEffects(PrefabSetup._odinMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void HildirsMead() { _objectDB.AddGameObject(PrefabSetup._hildirsMead); RegisterStatusEffects(PrefabSetup._hildirsMead.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect); } private static void MeadBase() { _objectDB.AddGameObject(PrefabSetup._dvergrMeadBase); _objectDB.AddGameObject(PrefabSetup._haldorMeadBase); _objectDB.AddGameObject(PrefabSetup._herculesMeadBase); _objectDB.AddGameObject(PrefabSetup._huginMeadBase); _objectDB.AddGameObject(PrefabSetup._knarrMeadBase); _objectDB.AddGameObject(PrefabSetup._odinMeadBase); _objectDB.AddGameObject(PrefabSetup._hildirsMeadBase); } private static void RegisterStatusEffects(StatusEffect statusEffect) { if (statusEffect != null && !Object.op_Implicit((Object)(object)_objectDB.GetStatusEffect(StringExtensionMethods.GetStableHashCode(((Object)statusEffect).name)))) { _objectDB.m_StatusEffects.Add(statusEffect); } } } public static class RegisterPrefabsToZNetScene { private static ZNetScene _zNetScene => ZNetScene.instance; public static void Init() { if (Helper.ZNetSceneAwake()) { _zNetScene.AddGameObject(PrefabSetup._dvergrMead); _zNetScene.AddGameObject(PrefabSetup._dvergrMeadBase); _zNetScene.AddGameObject(PrefabSetup._haldorMead); _zNetScene.AddGameObject(PrefabSetup._haldorMeadBase); _zNetScene.AddGameObject(PrefabSetup._herculesMead); _zNetScene.AddGameObject(PrefabSetup._herculesMeadBase); _zNetScene.AddGameObject(PrefabSetup._huginMead); _zNetScene.AddGameObject(PrefabSetup._huginMeadBase); _zNetScene.AddGameObject(PrefabSetup._knarrMead); _zNetScene.AddGameObject(PrefabSetup._knarrMeadBase); _zNetScene.AddGameObject(PrefabSetup._odinMead); _zNetScene.AddGameObject(PrefabSetup._odinMeadBase); _zNetScene.AddGameObject(PrefabSetup._hildirsMead); _zNetScene.AddGameObject(PrefabSetup._hildirsMeadBase); } } } public static class RegisterRecipesToObjectDB { private static ZNetScene _zNetScene => ZNetScene.instance; private static ObjectDB _objectDB => ObjectDB.instance; public static void Init() { if (Helper.ObjectDBAwake() && Helper.ZNetSceneAwake()) { DvergrMeadBase(); HaldorMeadBase(); HerculesMeadBase(); HuginMeadBase(); KnarrMeadBase(); OdinMeadBase(); HildirsMeadBase(); } } private static void DvergrMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_DvergrMeadBase"; val.m_item = PrefabSetup._dvergrMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._dvergrMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._dvergrMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._dvergrMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._dvergrMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._dvergrMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } private static void HaldorMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_HaldorMeadBase"; val.m_item = PrefabSetup._haldorMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._haldorMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._haldorMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._haldorMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._haldorMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._haldorMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } private static void HerculesMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_HerculesMeadBase"; val.m_item = PrefabSetup._herculesMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._herculesMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._herculesMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._herculesMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._herculesMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._herculesMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } private static void HuginMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_HuginMeadBase"; val.m_item = PrefabSetup._huginMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._huginMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._huginMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._huginMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._huginMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._huginMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } private static void KnarrMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_KnarrMeadBase"; val.m_item = PrefabSetup._knarrMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._knarrMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._knarrMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._knarrMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._knarrMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._knarrMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } private static void OdinMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_OdinMeadBase"; val.m_item = PrefabSetup._odinMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._odinsMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._odinsMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._odinsMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._odinsMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._odinsMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } private static void HildirsMeadBase() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown Recipe val = ScriptableObject.CreateInstance<Recipe>(); ((Object)val).name = "Recipe_BTM_HildirsMeadBase"; val.m_item = PrefabSetup._hildirsMeadBase.GetComponent<ItemDrop>(); val.m_amount = 1; val.m_enabled = ConfigSetup._hildirsMeadBaseEnable.Value; val.m_qualityResultAmountMultiplier = 1f; val.m_craftingStation = _zNetScene.GetPrefab("piece_MeadCauldron").GetComponent<CraftingStation>(); val.m_repairStation = null; val.m_minStationLevel = 1; val.m_requireOnlyOneIngredient = false; string[] array = ConfigSetup._hildirsMeadBaseMat1.Value.Split(':', ' '); string[] array2 = ConfigSetup._hildirsMeadBaseMat2.Value.Split(':', ' '); string[] array3 = ConfigSetup._hildirsMeadBaseMat3.Value.Split(':', ' '); string[] array4 = ConfigSetup._hildirsMeadBaseMat4.Value.Split(':', ' '); val.m_resources = (Requirement[])(object)new Requirement[4] { new Requirement { m_resItem = _objectDB.GetItemPrefab(array[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array2[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array2[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array3[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array3[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true }, new Requirement { m_resItem = _objectDB.GetItemPrefab(array4[0]).GetComponent<ItemDrop>(), m_amount = int.Parse(array4[1]), m_extraAmountOnlyOneIngredient = 0, m_amountPerLevel = 0, m_recover = true } }; _objectDB.AddRecipe(val); } } [HarmonyPatch(typeof(Game), "Update")] public class GamePatch { public static void Postfix(ref Game __instance) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (Plugin._haldorsMeadUsed || Plugin._odinsMeadUsed || Plugin._huginsMeadUsed || Plugin._dvergersMeadUsed || Plugin._hildirsMeadUsed) { Plugin._spawnPoint = ((PlayerProfile)Traverse.Create((object)__instance).Field("m_playerProfile").GetValue()).GetCustomSpawnPoint(); Plugin._spawnPoint.y += 0.5f; if (!Plugin._portalActivated) { Plugin._portalActivated = true; } } } } [HarmonyPatch] public class ObjectDBPatch { [HarmonyPriority(700)] [HarmonyPostfix] [HarmonyPatch(typeof(ObjectDB), "Awake")] public static void Awake_Postfix(ObjectDB __instance) { __instance.m_StatusEffects.Add((StatusEffect)(object)Helper.CreateStatusEffects("blacks7ar_tpmeads_cd", "TP Cooldown", Enumerable.LastOrDefault((IEnumerable<Sprite>)Resources.FindObjectsOfTypeAll<Sprite>(), (Func<Sprite, bool>)((Sprite x) => ((Object)x).name == "portal")))); __instance.m_StatusEffects.Add((StatusEffect)(object)Helper.CreateStatusEffects("blacks7ar_herculesmead_cd", "Cooldown", PrefabSetup._herculesIcon)); __instance.m_StatusEffects.Add((StatusEffect)(object)Helper.CreateHerculeanBuff("blacks7ar_herculeanbuff_duration", "Herculean Buff", Enumerable.LastOrDefault((IEnumerable<Sprite>)Resources.FindObjectsOfTypeAll<Sprite>(), (Func<Sprite, bool>)((Sprite x) => ((Object)x).name == "bronzehead_01")))); RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateRegisters(); } [HarmonyPriority(700)] [HarmonyPostfix] [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static void CopyOtherDB_Postfix(ObjectDB __instance) { RegisterPrefabsToObjectDB.Init(); RegisterRecipesToObjectDB.Init(); __instance.UpdateRegisters(); } } [HarmonyPatch] public class PlayerPatch { [HarmonyPrefix] [HarmonyPatch(typeof(Player), "ConsumeItem")] private static bool ConsumeItem_Prefix(ItemData item, ref Player __instance) { //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c6: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_094a: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_095f: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_0975: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Unknown result type (might be due to invalid IL or missing references) //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_099b: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Unknown result type (might be due to invalid IL or missing references) //IL_09a4: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_09b2: Unknown result type (might be due to invalid IL or missing references) //IL_09b7: Unknown result type (might be due to invalid IL or missing references) //IL_09dc: Unknown result type (might be due to invalid IL or missing references) //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) switch (((Object)item.m_dropPrefab).name) { case "BTM_DvergrMead": { if (!((Humanoid)__instance).IsTeleportable() || ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You can't teleport right now.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect6 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd")); Plugin._dvergersMeadCD.SettingChanged += delegate { statusEffect6.m_ttl = Plugin._dvergersMeadCD.Value; }; statusEffect6.m_ttl = Plugin._dvergersMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect6, false, 0, 0f); Dictionary<Vector3, string> dictionary2 = new Dictionary<Vector3, string>(); LocationInstance val2 = default(LocationInstance); if (ZoneSystem.instance.FindClosestLocation("Vendor_BlackForest", Vector3.zero, ref val2)) { dictionary2[val2.m_position] = val2.m_location.m_prefabName; Plugin._traderPoint = val2.m_position + Vector3.up; Transform transform2 = ((Component)__instance).transform; Vector3 position4 = transform2.position; Plugin._savedPosition = new Vector3(position4.x, position4.y, position4.z); Plugin._dvergersMeadUsed = true; Plugin._huginsMeadUsed = false; Plugin._haldorsMeadUsed = false; Plugin._odinsMeadUsed = false; Plugin._hildirsMeadUsed = false; ((Character)__instance).TeleportTo(Plugin._traderPoint, transform2.rotation, true); } else { Logging.LogInfo("Trader not found, try again later.."); } break; } case "BTM_HuginMead": { if (!((Humanoid)__instance).IsTeleportable() || ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You can't teleport right now.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect2 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd")); Plugin._huginsMeadCD.SettingChanged += delegate { statusEffect2.m_ttl = Plugin._huginsMeadCD.Value; }; statusEffect2.m_ttl = Plugin._huginsMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect2, false, 0, 0f); Game instance3 = Game.instance; Vector3 val3 = default(Vector3); if (ZoneSystem.instance.GetLocationIcon(instance3.m_StartLocation, ref val3)) { Plugin._startPoint = val3 + Vector3.up * 2f; Transform transform3 = ((Component)__instance).transform; Vector3 position5 = transform3.position; Plugin._savedPosition = new Vector3(position5.x, position5.y, position5.z); Plugin._huginsMeadUsed = true; Plugin._haldorsMeadUsed = false; Plugin._odinsMeadUsed = false; Plugin._dvergersMeadUsed = false; Plugin._hildirsMeadUsed = false; ((Character)__instance).TeleportTo(Plugin._startPoint, transform3.rotation, true); } break; } case "BTM_HaldorMead": { if (!((Humanoid)__instance).IsTeleportable() || ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You can't teleport right now.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect5 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd")); Plugin._haldorsMeadCD.SettingChanged += delegate { statusEffect5.m_ttl = Plugin._haldorsMeadCD.Value; }; statusEffect5.m_ttl = Plugin._haldorsMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect5, false, 0, 0f); Game instance2 = Game.instance; Vector3 position3 = ((Component)__instance).transform.position; Plugin._savedPosition = new Vector3(position3.x, position3.y, position3.z); Plugin._haldorsMeadUsed = true; Plugin._odinsMeadUsed = false; Plugin._dvergersMeadUsed = false; Plugin._huginsMeadUsed = false; Plugin._hildirsMeadUsed = false; if (Plugin._portalActivated) { ((Character)__instance).TeleportTo(Plugin._spawnPoint, ((Component)__instance).transform.rotation, true); break; } Plugin._spawnPoint = ((PlayerProfile)Traverse.Create((object)instance2).Field("m_playerProfile").GetValue()).GetCustomSpawnPoint(); Plugin._spawnPoint.y += 0.5f; ((Character)__instance).TeleportTo(Plugin._spawnPoint, ((Component)__instance).transform.rotation, true); break; } case "BTM_OdinMead": { if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You can't teleport right now.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect4 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd")); Plugin._odinsMeadCD.SettingChanged += delegate { statusEffect4.m_ttl = Plugin._odinsMeadCD.Value; }; statusEffect4.m_ttl = Plugin._odinsMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect4, false, 0, 0f); Game instance = Game.instance; Vector3 position2 = ((Component)__instance).transform.position; Plugin._savedPosition = new Vector3(position2.x, position2.y, position2.z); Plugin._odinsMeadUsed = true; Plugin._haldorsMeadUsed = false; Plugin._dvergersMeadUsed = false; Plugin._huginsMeadUsed = false; Plugin._hildirsMeadUsed = false; if (Plugin._portalActivated) { ((Character)__instance).TeleportTo(Plugin._spawnPoint, ((Component)__instance).transform.rotation, true); break; } Plugin._spawnPoint = ((PlayerProfile)Traverse.Create((object)instance).Field("m_playerProfile").GetValue()).GetCustomSpawnPoint(); Plugin._spawnPoint.y += 0.5f; ((Character)__instance).TeleportTo(Plugin._spawnPoint, ((Component)__instance).transform.rotation, true); break; } case "BTM_KnarrMead": { if (!Plugin._portalActivated) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You don't have a previous saved location to go back to.</size>", 0, (Sprite)null, false); return false; } if (!((Humanoid)__instance).IsTeleportable() || ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You can't teleport right now.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect7 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd")); Plugin._knarrsMeadCD.SettingChanged += delegate { statusEffect7.m_ttl = Plugin._knarrsMeadCD.Value; }; statusEffect7.m_ttl = Plugin._knarrsMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect7, false, 0, 0f); ((Character)__instance).TeleportTo(Plugin._savedPosition, ((Component)__instance).transform.rotation, true); break; } case "BTM_HerculesMead": { if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_herculesmead_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>Can't be use right now.</size>", 0, (Sprite)null, false); return false; } if (((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_herculeanbuff_duration"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>Herculean Buff is still in effect, try again later.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_herculesmead_cd")); Plugin._herculesMeadCD.SettingChanged += delegate { statusEffect.m_ttl = Plugin._herculesMeadCD.Value; }; statusEffect.m_ttl = Plugin._herculesMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect, false, 0, 0f); StatusEffect statusEffect8 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_herculeanbuff_duration")); Plugin._herculesMeadEffectDuration.SettingChanged += delegate { statusEffect8.m_ttl = Plugin._herculesMeadEffectDuration.Value; }; statusEffect8.m_ttl = Plugin._herculesMeadEffectDuration.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect8, false, 0, 0f); Player obj = __instance; obj.m_maxCarryWeight *= 2f; Plugin._countBegan = true; break; } case "BTM_HildirsMead": { if (!((Humanoid)__instance).IsTeleportable() || ((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd"))) { MessageHud.instance.ShowMessage((MessageType)2, "<size=28>You can't teleport right now.</size>", 0, (Sprite)null, false); return false; } StatusEffect statusEffect3 = ObjectDB.instance.GetStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_tpmeads_cd")); Plugin._hildirsMeadCD.SettingChanged += delegate { statusEffect3.m_ttl = Plugin._hildirsMeadCD.Value; }; statusEffect3.m_ttl = Plugin._hildirsMeadCD.Value; ((Character)__instance).GetSEMan().AddStatusEffect(statusEffect3, false, 0, 0f); Dictionary<Vector3, string> dictionary = new Dictionary<Vector3, string>(); LocationInstance val = default(LocationInstance); if (ZoneSystem.instance.FindClosestLocation("Hildir_camp", Vector3.zero, ref val)) { dictionary[val.m_position] = val.m_location.m_prefabName; Plugin._hildirPoint = val.m_position + Vector3.up; Transform transform = ((Component)__instance).transform; Vector3 position = transform.position; Plugin._savedPosition = new Vector3(position.x, position.y, position.z); Plugin._dvergersMeadUsed = false; Plugin._huginsMeadUsed = false; Plugin._haldorsMeadUsed = false; Plugin._odinsMeadUsed = false; Plugin._hildirsMeadUsed = true; ((Character)__instance).TeleportTo(Plugin._hildirPoint, transform.rotation, true); } else { Logging.LogInfo("Hildirs Camp not found, try again later.."); } break; } } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "FixedUpdate")] public static void FixedUpdate_Postfix(ref Player __instance) { if (!((Character)__instance).GetSEMan().HaveStatusEffect(StringExtensionMethods.GetStableHashCode("blacks7ar_herculeanbuff_duration")) && Plugin._countBegan) { Player obj = __instance; obj.m_maxCarryWeight /= 2f; Plugin._countBegan = false; } } } [HarmonyPatch(typeof(ZNetScene), "Awake")] public class ZNetScenePatch { public static void Postfix(ZNetScene __instance) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown if ((Object)(object)__instance == (Object)null) { return; } List<GameObject> prefabs = __instance.m_prefabs; if (prefabs == null || prefabs.Count <= 0) { return; } RegisterPrefabsToZNetScene.Init(); Fermenter component = __instance.GetPrefab("fermenter").GetComponent<Fermenter>(); foreach (KeyValuePair<GameObject, GameObject> item in Plugin.ToBeFermented) { component.m_conversion.Add(new ItemConversion { m_producedItems = 10, m_from = __instance.GetPrefab(((Object)item.Key).name).GetComponent<ItemDrop>(), m_to = __instance.GetPrefab(((Object)item.Value).name).GetComponent<ItemDrop>() }); } foreach (KeyValuePair<GameObject, GameObject> item2 in Plugin.ToBeFermented2) { component.m_conversion.Add(new ItemConversion { m_producedItems = 1, m_from = __instance.GetPrefab(((Object)item2.Key).name).GetComponent<ItemDrop>(), m_to = __instance.GetPrefab(((Object)item2.Value).name).GetComponent<ItemDrop>() }); } } } } namespace TeleportationMeads.Functions { public static class ConfigSetup { public static ConfigEntry<bool> _dvergrMeadBaseEnable; public static ConfigEntry<string> _dvergrMeadBaseMat1; public static ConfigEntry<string> _dvergrMeadBaseMat2; public static ConfigEntry<string> _dvergrMeadBaseMat3; public static ConfigEntry<string> _dvergrMeadBaseMat4; public static ConfigEntry<bool> _haldorMeadBaseEnable; public static ConfigEntry<string> _haldorMeadBaseMat1; public static ConfigEntry<string> _haldorMeadBaseMat2; public static ConfigEntry<string> _haldorMeadBaseMat3; public static ConfigEntry<string> _haldorMeadBaseMat4; public static ConfigEntry<bool> _herculesMeadBaseEnable; public static ConfigEntry<string> _herculesMeadBaseMat1; public static ConfigEntry<string> _herculesMeadBaseMat2; public static ConfigEntry<string> _herculesMeadBaseMat3; public static ConfigEntry<string> _herculesMeadBaseMat4; public static ConfigEntry<bool> _huginMeadBaseEnable; public static ConfigEntry<string> _huginMeadBaseMat1; public static ConfigEntry<string> _huginMeadBaseMat2; public static ConfigEntry<string> _huginMeadBaseMat3; public static ConfigEntry<string> _huginMeadBaseMat4; public static ConfigEntry<bool> _knarrMeadBaseEnable; public static ConfigEntry<string> _knarrMeadBaseMat1; public static ConfigEntry<string> _knarrMeadBaseMat2; public static ConfigEntry<string> _knarrMeadBaseMat3; public static ConfigEntry<string> _knarrMeadBaseMat4; public static ConfigEntry<bool> _odinsMeadBaseEnable; public static ConfigEntry<string> _odinsMeadBaseMat1; public static ConfigEntry<string> _odinsMeadBaseMat2; public static ConfigEntry<string> _odinsMeadBaseMat3; public static ConfigEntry<string> _odinsMeadBaseMat4; public static ConfigEntry<bool> _hildirsMeadBaseEnable; public static ConfigEntry<string> _hildirsMeadBaseMat1; public static ConfigEntry<string> _hildirsMeadBaseMat2; public static ConfigEntry<string> _hildirsMeadBaseMat3; public static ConfigEntry<string> _hildirsMeadBaseMat4; public static void Init() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Expected O, but got Unknown //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Expected O, but got Unknown //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Expected O, but got Unknown //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Expected O, but got Unknown //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Expected O, but got Unknown //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Expected O, but got Unknown //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Expected O, but got Unknown //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Expected O, but got Unknown //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Expected O, but got Unknown //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Expected O, but got Unknown //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Expected O, but got Unknown //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Expected O, but got Unknown //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Expected O, but got Unknown //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Expected O, but got Unknown //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Expected O, but got Unknown //IL_05f1: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Expected O, but got Unknown string group = "Mead Base- Dvergrs Mead"; _dvergrMeadBaseEnable = Plugin._Instance.config(group, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _dvergrMeadBaseMat1 = Plugin._Instance.config(group, "Required Material 1", "BTM_HaldorMead:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _dvergrMeadBaseMat2 = Plugin._Instance.config(group, "Required Material 2", "SurtlingCore:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _dvergrMeadBaseMat3 = Plugin._Instance.config(group, "Required Material 3", "AncientSeed:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _dvergrMeadBaseMat4 = Plugin._Instance.config(group, "Required Material 4", "GreydwarfEye:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group2 = "Mead Base- Haldors Mead"; _haldorMeadBaseEnable = Plugin._Instance.config(group2, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _haldorMeadBaseMat1 = Plugin._Instance.config(group2, "Required Material 1", "SurtlingCore:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _haldorMeadBaseMat2 = Plugin._Instance.config(group2, "Required Material 2", "GreydwarfEye:20", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _haldorMeadBaseMat3 = Plugin._Instance.config(group2, "Required Material 3", "AncientSeed:2", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _haldorMeadBaseMat4 = Plugin._Instance.config(group2, "Required Material 4", "BeechSeeds:20", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group3 = "Mead Base- Hercules Mead"; _herculesMeadBaseEnable = Plugin._Instance.config(group3, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _herculesMeadBaseMat1 = Plugin._Instance.config(group3, "Required Material 1", "SurtlingCore:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _herculesMeadBaseMat2 = Plugin._Instance.config(group3, "Required Material 2", "CopperOre:2", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _herculesMeadBaseMat3 = Plugin._Instance.config(group3, "Required Material 3", "AncientSeed:2", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _herculesMeadBaseMat4 = Plugin._Instance.config(group3, "Required Material 4", "GreydwarfEye:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group4 = "Mead Base- Hugins Mead"; _huginMeadBaseEnable = Plugin._Instance.config(group4, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _huginMeadBaseMat1 = Plugin._Instance.config(group4, "Required Material 1", "SurtlingCore:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _huginMeadBaseMat2 = Plugin._Instance.config(group4, "Required Material 2", "GreydwarfEye:20", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _huginMeadBaseMat3 = Plugin._Instance.config(group4, "Required Material 3", "AncientSeed:2", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _huginMeadBaseMat4 = Plugin._Instance.config(group4, "Required Material 4", "Feathers:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group5 = "Mead Base- Knarrs Mead"; _knarrMeadBaseEnable = Plugin._Instance.config(group5, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _knarrMeadBaseMat1 = Plugin._Instance.config(group5, "Required Material 1", "SurtlingCore:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _knarrMeadBaseMat2 = Plugin._Instance.config(group5, "Required Material 2", "GreydwarfEye:20", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _knarrMeadBaseMat3 = Plugin._Instance.config(group5, "Required Material 3", "AncientSeed:2", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _knarrMeadBaseMat4 = Plugin._Instance.config(group5, "Required Material 4", "Resin:20", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group6 = "Mead Base- Odins Mead"; _odinsMeadBaseEnable = Plugin._Instance.config(group6, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsMeadBaseMat1 = Plugin._Instance.config(group6, "Required Material 1", "BTM_HaldorMead:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsMeadBaseMat2 = Plugin._Instance.config(group6, "Required Material 2", "SurtlingCore:2", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsMeadBaseMat3 = Plugin._Instance.config(group6, "Required Material 3", "AncientSeed:5", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _odinsMeadBaseMat4 = Plugin._Instance.config(group6, "Required Material 4", "Resin:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); string group7 = "Mead Base- Hildirs Mead"; _hildirsMeadBaseEnable = Plugin._Instance.config(group7, "Recipe", value: true, new ConfigDescription("Enable/Disables recipe. (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hildirsMeadBaseMat1 = Plugin._Instance.config(group7, "Required Material 1", "BTM_HaldorMead:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hildirsMeadBaseMat2 = Plugin._Instance.config(group7, "Required Material 2", "SurtlingCore:1", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hildirsMeadBaseMat3 = Plugin._Instance.config(group7, "Required Material 3", "AncientSeed:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); _hildirsMeadBaseMat4 = Plugin._Instance.config(group7, "Required Material 4", "GreydwarfEye:10", new ConfigDescription("Item name : amount (Needs logout)", (AcceptableValueBase)null, Array.Empty<object>())); } } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<112b52fc-385e-4422-8766-76e3d2c67965>Embedded] internal sealed class <112b52fc-385e-4422-8766-76e3d2c67965>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [<112b52fc-385e-4422-8766-76e3d2c67965>Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class <1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>NullableAttribute : Attribute { public readonly byte[] NullableFlags; public <1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public <1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] [<112b52fc-385e-4422-8766-76e3d2c67965>Embedded] internal sealed class <79594173-e941-4ad9-973e-713c0d41eb0b>NullableContextAttribute : Attribute { public readonly byte Flag; public <79594173-e941-4ad9-973e-713c0d41eb0b>NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace LocalizationManager { [<1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(0)] [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(1)] [PublicAPI] internal class Localizer { private static readonly Dictionary<string, Dictionary<string, Func<string>>> PlaceholderProcessors; private static readonly Dictionary<string, Dictionary<string, string>> loadedTexts; private static readonly ConditionalWeakTable<Localization, string> localizationLanguage; private static readonly List<WeakReference<Localization>> localizationObjects; [<1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(2)] private static BaseUnityPlugin _plugin; private static readonly List<string> fileExtensions; private static BaseUnityPlugin plugin { get { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown if (_plugin == null) { IEnumerable<TypeInfo> source; try { source = Enumerable.ToList(Assembly.GetExecutingAssembly().DefinedTypes); } catch (ReflectionTypeLoadException ex) { source = Enumerable.Select(Enumerable.Where(ex.Types, [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (Type t) => t != null), [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (Type t) => t.GetTypeInfo()); } _plugin = (BaseUnityPlugin)Chainloader.ManagerObject.GetComponent((Type)Enumerable.First(source, [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (TypeInfo t) => t.IsClass && typeof(BaseUnityPlugin).IsAssignableFrom(t))); } return _plugin; } } [<1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(2)] [method: <79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(2)] [field: <1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(2)] public static event Action OnLocalizationComplete; private static void UpdatePlaceholderText(Localization localization, string key) { localizationLanguage.TryGetValue(localization, out var value); string text = loadedTexts[value][key]; if (PlaceholderProcessors.TryGetValue(key, out var value2)) { text = Enumerable.Aggregate(value2, text, [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (string current, KeyValuePair<string, Func<string>> kv) => current.Replace("{" + kv.Key + "}", kv.Value())); } localization.AddWord(key, text); } public static void AddPlaceholder<T>(string key, string placeholder, ConfigEntry<T> config, [<1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(new byte[] { 2, 1, 1 })] Func<T, string> convertConfigValue = null) { if (convertConfigValue == null) { convertConfigValue = (T val) => val.ToString(); } if (!PlaceholderProcessors.ContainsKey(key)) { PlaceholderProcessors[key] = new Dictionary<string, Func<string>>(); } config.SettingChanged += [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (object _, EventArgs _) => { UpdatePlaceholder(); }; if (loadedTexts.ContainsKey(Localization.instance.GetSelectedLanguage())) { UpdatePlaceholder(); } void UpdatePlaceholder() { PlaceholderProcessors[key][placeholder] = () => convertConfigValue(config.Value); UpdatePlaceholderText(Localization.instance, key); } } public static void AddText(string key, string text) { List<WeakReference<Localization>> list = new List<WeakReference<Localization>>(); foreach (WeakReference<Localization> localizationObject in localizationObjects) { if (localizationObject.TryGetTarget(out var target)) { Dictionary<string, string> dictionary = loadedTexts[localizationLanguage.GetOrCreateValue(target)]; if (!target.m_translations.ContainsKey(key)) { dictionary[key] = text; target.AddWord(key, text); } } else { list.Add(localizationObject); } } foreach (WeakReference<Localization> item in list) { localizationObjects.Remove(item); } } public static void Load() { _ = plugin; } public static void LoadLocalizationLater(Localization __instance) { LoadLocalization(Localization.instance, __instance.GetSelectedLanguage()); } public static void SafeCallLocalizeComplete() { Localizer.OnLocalizationComplete?.Invoke(); } private static void LoadLocalization(Localization __instance, string language) { if (!localizationLanguage.Remove(__instance)) { localizationObjects.Add(new WeakReference<Localization>(__instance)); } localizationLanguage.Add(__instance, language); Dictionary<string, string> dictionary = new Dictionary<string, string>(); foreach (string item in Enumerable.Where(Directory.GetFiles(Path.GetDirectoryName(Paths.PluginPath), plugin.Info.Metadata.Name + ".*", SearchOption.AllDirectories), [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (string f) => fileExtensions.IndexOf(Path.GetExtension(f)) >= 0)) { string text = Path.GetFileNameWithoutExtension(item).Split(new char[1] { '.' })[1]; if (dictionary.ContainsKey(text)) { Debug.LogWarning((object)("Duplicate key " + text + " found for " + plugin.Info.Metadata.Name + ". The duplicate file found at " + item + " will be skipped.")); } else { dictionary[text] = item; } } byte[] array = LoadTranslationFromAssembly("English"); if (array == null) { throw new Exception("Found no English localizations in mod " + plugin.Info.Metadata.Name + ". Expected an embedded resource translations/English.json or translations/English.yml."); } Dictionary<string, string> dictionary2 = new DeserializerBuilder().IgnoreFields().Build().Deserialize<Dictionary<string, string>>(Encoding.UTF8.GetString(array)); if (dictionary2 == null) { throw new Exception("Localization for mod " + plugin.Info.Metadata.Name + " failed: Localization file was empty."); } string text2 = null; if (language != "English") { if (dictionary.TryGetValue(language, out var value)) { text2 = File.ReadAllText(value); } else { byte[] array2 = LoadTranslationFromAssembly(language); if (array2 != null) { text2 = Encoding.UTF8.GetString(array2); } } } if (text2 == null && dictionary.TryGetValue("English", out var value2)) { text2 = File.ReadAllText(value2); } if (text2 != null) { foreach (KeyValuePair<string, string> item2 in new DeserializerBuilder().IgnoreFields().Build().Deserialize<Dictionary<string, string>>(text2) ?? new Dictionary<string, string>()) { dictionary2[item2.Key] = item2.Value; } } loadedTexts[language] = dictionary2; foreach (KeyValuePair<string, string> item3 in dictionary2) { UpdatePlaceholderText(__instance, item3.Key); } } static Localizer() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown PlaceholderProcessors = new Dictionary<string, Dictionary<string, Func<string>>>(); loadedTexts = new Dictionary<string, Dictionary<string, string>>(); localizationLanguage = new ConditionalWeakTable<Localization, string>(); localizationObjects = new List<WeakReference<Localization>>(); fileExtensions = new List<string>(2) { ".json", ".yml" }; Harmony val = new Harmony("org.bepinex.helpers.LocalizationManager"); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Localization), "SetupLanguage", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Localizer), "LoadLocalization", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(FejdStartup), "SetupGui", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Localizer), "LoadLocalizationLater", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(FejdStartup), "Start", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Localizer), "SafeCallLocalizeComplete", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } [return: <1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(2)] private static byte[] LoadTranslationFromAssembly(string language) { foreach (string fileExtension in fileExtensions) { byte[] array = ReadEmbeddedFileBytes("translations." + language + fileExtension); if (array != null) { return array; } } return null; } [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(2)] public static byte[] ReadEmbeddedFileBytes([<1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(1)] string resourceFileName, Assembly containingAssembly = null) { using MemoryStream memoryStream = new MemoryStream(); if ((object)containingAssembly == null) { containingAssembly = Assembly.GetCallingAssembly(); } string text = Enumerable.FirstOrDefault(containingAssembly.GetManifestResourceNames(), [<79594173-e941-4ad9-973e-713c0d41eb0b>NullableContext(0)] (string str) => str.EndsWith(resourceFileName, StringComparison.Ordinal)); if (text != null) { containingAssembly.GetManifestResourceStream(text)?.CopyTo(memoryStream); } return (memoryStream.Length == 0L) ? null : memoryStream.ToArray(); } } internal static class LocalizationManagerVersion { [<1bfc4759-c5a6-4eb1-bee9-a1d0c5c59449>Nullable(1)] public const string Version = "1.4.0"; } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] internal sealed class AllowNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] internal sealed class DisallowNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Method, Inherited = false)] internal sealed class DoesNotReturnAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] internal sealed class DoesNotReturnIfAttribute : Attribute { public bool ParameterValue { get; } public DoesNotReturnIfAttribute(bool parameterValue) { ParameterValue = parameterValue; } } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)] internal sealed class MaybeNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] internal sealed class MaybeNullWhenAttribute : Attribute { public bool ReturnValue { get; } public MaybeNullWhenAttribute(bool returnValue) { ReturnValue = returnValue; } } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)] internal sealed class NotNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)] internal sealed class NotNullIfNotNullAttribute : Attribute { public string ParameterName { get; } public NotNullIfNotNullAttribute(string parameterName) { ParameterName = parameterName; } } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] internal sealed class NotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public NotNullWhenAttribute(bool returnValue) { ReturnValue = returnValue; } } } namespace System.Collections.Generic { internal static class DeconstructionExtensions { public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> pair, out TKey key, out TValue value) { key = pair.Key; value = pair.Value; } } } namespace YamlDotNet { internal sealed class CultureInfoAdapter : CultureInfo { private readonly IFormatProvider provider; public CultureInfoAdapter(CultureInfo baseCulture, IFormatProvider provider) : base(baseCulture.LCID) { this.provider = provider; } public override object? GetFormat(Type? formatType) { return provider.GetFormat(formatType); } } internal static class ReflectionExtensions { private static readonly FieldInfo? RemoteStackTraceField = typeof(Exception).GetField("_remoteStackTraceString", BindingFlags.Instance | BindingFlags.NonPublic); public static Type? BaseType(this Type type) { return type.BaseType; } public static bool IsValueType(this Type type) { return type.IsValueType; } public static bool IsGenericType(this Type type) { return type.IsGenericType; } public static bool IsGenericTypeDefinition(this Type type) { return type.IsGenericTypeDefinition; } public static bool IsInterface(this Type type) { return type.IsInterface; } public static bool IsEnum(this Type type) { return type.IsEnum; } public static bool IsDbNull(this object value) { return value is DBNull; } public static bool HasDefaultConstructor(this Type type) { if (!type.IsValueType) { return type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, null, Type.EmptyTypes, null) != null; } return true; } public static TypeCode GetTypeCode(this Type type) { return Type.GetTypeCode(type); } public static PropertyInfo? GetPublicProperty(this Type type, string name) { return type.GetProperty(name); } public static