using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Digitalroot.Modding.Framework.Common.Json; using Digitalroot.Modding.Framework.Logging; using Digitalroot.Modding.Framework.Names.Vanilla; using Digitalroot.Modding.Framework.Utils; using HarmonyLib; using JetBrains.Annotations; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using SimpleJson; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Digitalroot.Valheim.BugFreeMistlands")] [assembly: AssemblyDescription("Bug Free Mistlands")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Digitalroot Technologies")] [assembly: AssemblyProduct("Digitalroot Valheim Mods")] [assembly: AssemblyCopyright("Copyright © Digitalroot Technologies 2021 - 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3ccc4dc1-5b17-47c1-b996-ca03b8639a61")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Digitalroot.Valheim.BugFreeMistlands { [BepInPlugin("digitalroot.mods.bugfreemistlands", "Bug Free Mistlands", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin, ITraceableLogging { internal static class PluginConfigSection { internal const string General = "General"; internal const string Advanced = "Advanced"; } private Harmony _harmony; public const string EvilDvergerPreFabName = "bfml_EvilDverger"; public const string EvilDvergerMagePreFabName = "bfml_EvilDvergerMage"; public const string EvilBonemassPreFabName = "bfml_EvilBonemass"; public const string QueenAltarName = "offeraltar_queen"; private static readonly string[] EvilBonemassParticlePaths = new string[3] { "Visual/particles/ooz", "Visual/particles/wetsplsh", "Visual/particles/wetsplsh (1)" }; private const string EvilBonemassLightPath = "Visual/Point light"; private const string EvilBonemassHeadsPath = "Visual/model/heads"; private const string EvilBonemassBodyPath = "Visual/model/bonemass"; private const string EvilBonemassMudMaterialName = "Bonemass_mud"; public const string Version = "1.0.0"; public const string Name = "Bug Free Mistlands"; public const string Guid = "digitalroot.mods.bugfreemistlands"; public const string Namespace = "Digitalroot.Valheim.BugFreeMistlands"; public static Main Instance { get; private set; } [UsedImplicitly] public static ConfigEntry NexusId { get; private set; } public string Source => "Digitalroot.Valheim.BugFreeMistlands"; public bool EnableTrace { get; } public Main() { Instance = this; EnableTrace = false; } [UsedImplicitly] private void Awake() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown try { if (Instance.EnableTrace) { Log.Trace(Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } NexusId = ((BaseUnityPlugin)this).Config.Bind("General", "NexusID", 4718, new ConfigDescription("Nexus mod ID for updates", (AcceptableValueBase)null, new object[1] { (object)new ConfigurationManagerAttributes { Browsable = false, ReadOnly = true } })); SynchronizationManager.OnConfigurationSynchronized += SynchronizationManager_OnConfigurationSynchronized; CreatureManager.OnVanillaCreaturesAvailable += CreatureManager_OnVanillaCreaturesAvailable; _harmony = Harmony.CreateAndPatchAll(typeof(Main).Assembly, "digitalroot.mods.bugfreemistlands"); } catch (Exception e) { Log.Error(Instance, e); } } [UsedImplicitly] private void OnDestroy() { try { if (Instance.EnableTrace) { Log.Trace(Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } SynchronizationManager.OnConfigurationSynchronized -= SynchronizationManager_OnConfigurationSynchronized; CreatureManager.OnVanillaCreaturesAvailable -= CreatureManager_OnVanillaCreaturesAvailable; } catch (Exception e) { Log.Error(Instance, e); } } private CustomCreature CreateEvilBonemassPrefab() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown GameObject val = PrefabManager.Instance.CreateClonedPrefab("bfml_EvilBonemass", BossNames.Bonemass); GameObject prefab = Cache.GetPrefab(BossNames.SeekerQueen); Character component = prefab.GetComponent(); Humanoid component2 = val.GetComponent(); ((Character)component2).m_boss = component.m_boss; ((Character)component2).m_bossEvent = component.m_bossEvent; ((Character)component2).m_defeatSetGlobalKey = component.m_defeatSetGlobalKey; CharacterDrop val2 = default(CharacterDrop); if (!val.TryGetComponent(ref val2)) { val2 = val.AddComponent(); } val2.m_drops = ((IEnumerable)prefab.GetComponent().m_drops).Select((Func)((Drop d) => new Drop { m_prefab = d.m_prefab, m_amountMin = d.m_amountMin, m_amountMax = d.m_amountMax, m_chance = d.m_chance, m_onePerPlayer = d.m_onePerPlayer, m_levelMultiplier = d.m_levelMultiplier, m_dontScale = d.m_dontScale })).ToList(); ((Character)component2).m_health = component.m_health; MakeBonemassEvil(val, Color.red); RecolorBonemassBody(val, Color.red); ShrinkBonemass(val, 0.5f); val.GetComponent().m_pathAgentType = (AgentType)2; return new CustomCreature(val, true, new CreatureConfig { Name = "$bfml_evil_bonemass", Faction = (Faction)8 }); } private CustomCreature CreateEvilDvergerPrefab() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0165: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_018f: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown GameObject obj = PrefabManager.Instance.CreateClonedPrefab("bfml_EvilDverger", EnemyNames.Dverger); SetEyeColorToEvil(obj); CreatureConfig val = new CreatureConfig(); val.Name = "$bfml_evil_dverger"; val.Faction = (Faction)9; val.UseCumulativeLevelEffects = true; val.Group = string.Empty; val.DropConfigs = (DropConfig[])(object)new DropConfig[7] { new DropConfig { Chance = 80f, Item = ItemDropNames.Carapace, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 100f, Item = ItemDropNames.BugMeat, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 5f, Item = ItemDropNames.TrophySeeker, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 50f, Item = ItemDropNames.Coins, LevelMultiplier = false, MinAmount = 10, MaxAmount = 25 }, new DropConfig { Chance = 5f, Item = ItemDropNames.TrophyTick, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 50f, Item = ItemDropNames.GiantBloodSack, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 10f, Item = ItemDropNames.RoyalJelly, LevelMultiplier = false, MaxAmount = 1 } }; val.SpawnConfigs = (SpawnConfig[])(object)new SpawnConfig[1] { new SpawnConfig { Biome = (Biome)512, BiomeArea = (BiomeArea)2, HuntPlayer = false, MaxSpawned = 2, Name = "evil_dverger_spawn" } }; return new CustomCreature(obj, true, val); } private CustomCreature CreateEvilDvergerMagePrefab() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_0130: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0165: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_018f: Expected O, but got Unknown //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Expected O, but got Unknown GameObject obj = PrefabManager.Instance.CreateClonedPrefab("bfml_EvilDvergerMage", EnemyNames.DvergerMage); SetEyeColorToEvil(obj); CreatureConfig val = new CreatureConfig(); val.Name = "$bfml_evil_dverger_mage"; val.Faction = (Faction)9; val.UseCumulativeLevelEffects = true; val.Group = string.Empty; val.DropConfigs = (DropConfig[])(object)new DropConfig[8] { new DropConfig { Chance = 90f, Item = ItemDropNames.Carapace, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 100f, Item = ItemDropNames.BugMeat, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 85f, Item = ItemDropNames.Mandible, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 5f, Item = ItemDropNames.TrophySeekerBrute, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 5f, Item = ItemDropNames.TrophyGjall, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 50f, Item = ItemDropNames.Coins, LevelMultiplier = false, MinAmount = 10, MaxAmount = 30 }, new DropConfig { Chance = 50f, Item = ItemDropNames.Bilebag, LevelMultiplier = false, MaxAmount = 1 }, new DropConfig { Chance = 10f, Item = ItemDropNames.RoyalJelly, LevelMultiplier = false, MaxAmount = 2 } }; val.SpawnConfigs = (SpawnConfig[])(object)new SpawnConfig[1] { new SpawnConfig { Biome = (Biome)512, BiomeArea = (BiomeArea)2, HuntPlayer = false, MaxSpawned = 1, Name = "evil_dverger_mage_spawn" } }; return new CustomCreature(obj, true, val); } private void CreatureManager_OnVanillaCreaturesAvailable() { try { if (Instance.EnableTrace) { Log.Trace(Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } CreatureManager.Instance.AddCreature(CreateEvilDvergerPrefab()); CreatureManager.Instance.AddCreature(CreateEvilDvergerMagePrefab()); CreatureManager.Instance.AddCreature(CreateEvilBonemassPrefab()); } catch (Exception e) { Log.Error(Instance, e); } finally { CreatureManager.OnVanillaCreaturesAvailable -= CreatureManager_OnVanillaCreaturesAvailable; } } public static OfferingBowl FindClosestQueenAltar(Vector3 position, float maxDistance = 100f) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) if (Instance.EnableTrace) { Log.Trace(Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } OfferingBowl val = null; float num = maxDistance * maxDistance; OfferingBowl[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (OfferingBowl val2 in array) { if (!(((Object)val2).name != "offeraltar_queen")) { Vector3 val3 = ((Component)val2).transform.position - position; float sqrMagnitude = ((Vector3)(ref val3)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; val = val2; } } } if (Instance.EnableTrace) { Log.Trace(Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name + " [" + (((val != null) ? ((Object)val).name : null) ?? "Null") + "]"); } return val; } private static void MakeBonemassEvil(GameObject prefab, Color color) { //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) try { Transform transform = prefab.transform; string[] evilBonemassParticlePaths = EvilBonemassParticlePaths; foreach (string text in evilBonemassParticlePaths) { Transform val = transform.Find(text); if ((Object)(object)val == (Object)null) { Log.Warning(Instance, "Main.MakeBonemassEvil [" + ((Object)prefab).name + "] missing '" + text + "'"); } else { ParticleSystem[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); for (int j = 0; j < componentsInChildren.Length; j++) { TintParticleSystem(componentsInChildren[j], color); } } } Transform val2 = transform.Find("Visual/Point light"); Light val3 = default(Light); if ((Object)(object)val2 != (Object)null && ((Component)val2).TryGetComponent(ref val3)) { val3.color = color; } else { Log.Warning(Instance, "Main.MakeBonemassEvil [" + ((Object)prefab).name + "] missing Light on 'Visual/Point light'"); } Transform val4 = transform.Find("Visual/model/heads"); if ((Object)(object)val4 != (Object)null) { ((Component)val4).gameObject.SetActive(false); } else { Log.Warning(Instance, "Main.MakeBonemassEvil [" + ((Object)prefab).name + "] missing 'Visual/model/heads'"); } } catch (Exception e) { Log.Error(Instance, e); } } private static MinMaxGradient Recolor(MinMaxGradient source, Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected I4, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0074: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) ParticleSystemGradientMode mode = ((MinMaxGradient)(ref source)).mode; switch ((int)mode) { case 0: return new MinMaxGradient(Tint(((MinMaxGradient)(ref source)).color, color)); case 2: return new MinMaxGradient(Tint(((MinMaxGradient)(ref source)).colorMin, color), Tint(((MinMaxGradient)(ref source)).colorMax, color)); case 1: return new MinMaxGradient(Recolor(((MinMaxGradient)(ref source)).gradient, color)); case 3: return new MinMaxGradient(Recolor(((MinMaxGradient)(ref source)).gradientMin, color), Recolor(((MinMaxGradient)(ref source)).gradientMax, color)); case 4: { MinMaxGradient result = default(MinMaxGradient); ((MinMaxGradient)(ref result))..ctor(Recolor(((MinMaxGradient)(ref source)).gradient, color)); ((MinMaxGradient)(ref result)).mode = (ParticleSystemGradientMode)4; return result; } default: return source; } } private static Gradient Recolor(Gradient source, Color color) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown Gradient val = new Gradient { mode = source.mode }; val.SetKeys(((IEnumerable)source.colorKeys).Select((Func)((GradientColorKey k) => new GradientColorKey(Tint(k.color, color), k.time))).ToArray(), source.alphaKeys); return val; } private static void RecolorBonemassBody(GameObject prefab, Color color) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) try { Transform val = prefab.transform.Find("Visual/model/bonemass"); Renderer val2 = default(Renderer); if ((Object)(object)val == (Object)null || !((Component)val).TryGetComponent(ref val2)) { Log.Warning(Instance, "Main.RecolorBonemassBody [" + ((Object)prefab).name + "] missing Renderer on 'Visual/model/bonemass'"); return; } Material[] sharedMaterials = val2.sharedMaterials; int num = Array.FindIndex(sharedMaterials, (Material m) => (Object)(object)m != (Object)null && ((Object)m).name == "Bonemass_mud"); if (num < 0) { Log.Warning(Instance, "Main.RecolorBonemassBody [" + ((Object)prefab).name + "] missing material 'Bonemass_mud'"); return; } Material val3 = new Material(sharedMaterials[num]) { name = ((Object)sharedMaterials[num]).name + "_evil" }; string[] array = new string[3] { "_FlowColor", "_EmissiveColor", "_SSS" }; foreach (string text in array) { if (val3.HasProperty(text)) { val3.SetColor(text, Tint(val3.GetColor(text), color)); } } float targetHue = default(float); float num3 = default(float); float num4 = default(float); Color.RGBToHSV(color, ref targetHue, ref num3, ref num4); array = new string[2] { "_MainTex", "_FlowTexture" }; foreach (string text2 in array) { if (!val3.HasProperty(text2)) { continue; } Texture texture = val3.GetTexture(text2); if (!((Object)(object)texture == (Object)null)) { Texture2D val4 = RecolorTextureHueBand(texture, targetHue, 0.15f, 0.45f, 0.15f); if ((Object)(object)val4 != (Object)null) { val3.SetTexture(text2, (Texture)(object)val4); } } } sharedMaterials[num] = val3; val2.sharedMaterials = sharedMaterials; } catch (Exception e) { Log.Error(Instance, e); } } private static Texture2D RecolorTextureHueBand(Texture source, float targetHue, float minHue, float maxHue, float minSaturation) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) if ((int)SystemInfo.graphicsDeviceType == 4) { return null; } RenderTexture temporary = RenderTexture.GetTemporary(source.width, source.height, 0, (RenderTextureFormat)0, (RenderTextureReadWrite)2); RenderTexture active = RenderTexture.active; try { Graphics.Blit(source, temporary); RenderTexture.active = temporary; Texture2D val = new Texture2D(source.width, source.height, (TextureFormat)4, true, false) { name = ((Object)source).name + "_evil", wrapMode = source.wrapMode, filterMode = source.filterMode, anisoLevel = source.anisoLevel }; val.ReadPixels(new Rect(0f, 0f, (float)source.width, (float)source.height), 0, 0); Color32[] pixels = val.GetPixels32(); float num = default(float); float num2 = default(float); float num3 = default(float); for (int i = 0; i < pixels.Length; i++) { Color val2 = Color32.op_Implicit(pixels[i]); Color.RGBToHSV(val2, ref num, ref num2, ref num3); if (!(num < minHue) && !(num > maxHue) && !(num2 < minSaturation)) { Color val3 = Color.HSVToRGB(targetHue, num2, num3); val3.a = val2.a; pixels[i] = Color32.op_Implicit(val3); } } val.SetPixels32(pixels); val.Apply(true, false); val.Compress(true); val.Apply(false, true); return val; } finally { RenderTexture.active = active; RenderTexture.ReleaseTemporary(temporary); } } public static IEnumerator ReplaceSeekerQueen(Humanoid queen, ZNetView queenView, float altarTimeoutSeconds = 30f) { while ((Object)(object)queenView != (Object)null && queenView.IsValid() && !queenView.IsOwner()) { yield return (object)new WaitForSeconds(0.5f); } if ((Object)(object)queenView == (Object)null || !queenView.IsValid()) { yield break; } Vector3 queenPosition = ((Component)queen).transform.position; if (Instance.EnableTrace) { Log.Trace(Instance, "Main.ReplaceSeekerQueen [Removing " + BossNames.SeekerQueen + "]"); } ZNetScene.instance.Destroy(((Component)queen).gameObject); float deadline = Time.time + altarTimeoutSeconds; OfferingBowl val; while ((Object)(object)(val = FindClosestQueenAltar(queenPosition)) == (Object)null || (Object)(object)val.m_nview == (Object)null || !val.m_nview.IsValid()) { if (Time.time > deadline) { yield break; } yield return (object)new WaitForSeconds(0.5f); } val.m_nview.ClaimOwnership(); if (!val.IsBossSpawnQueued()) { Vector3 val2 = default(Vector3); if (val.CanSpawnBoss(val.GetSpawnPosition(), ref val2)) { val.SpawnBoss(val2); } else { Log.Warning(Instance, string.Format("{0} at {1} found no valid boss spawn point", "offeraltar_queen", ((Component)val).transform.position)); } } } private static void SetEyeColorToEvil(GameObject prefab) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) try { LevelEffects componentInChildren = prefab.GetComponentInChildren(true); Material[] sharedMaterials = componentInChildren.m_mainRender.sharedMaterials; Material val = new Material(sharedMaterials[0]) { name = ((Object)sharedMaterials[0]).name + "_evil" }; val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", Color.red * 2f); sharedMaterials[0] = val; componentInChildren.m_mainRender.sharedMaterials = sharedMaterials; foreach (LevelSetup levelSetup in componentInChildren.m_levelSetups) { levelSetup.m_setEmissiveColor = true; levelSetup.m_emissiveColor = Color.red * 2f; } } catch (Exception e) { Log.Error(Instance, e); } } private static void ShrinkBonemass(GameObject prefab, float factor) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) Transform transform = prefab.transform; CapsuleCollider val = default(CapsuleCollider); if (prefab.TryGetComponent(ref val)) { CapsuleCollider obj = val; obj.center *= factor; CapsuleCollider obj2 = val; obj2.height *= factor; CapsuleCollider obj3 = val; obj3.radius *= factor; } foreach (Transform item in transform) { Transform val2 = item; if (((Object)val2).name == "Visual") { val2.localScale *= factor; val2.localPosition *= factor; } else { val2.localPosition *= factor; val2.localScale *= factor; } } } private void SynchronizationManager_OnConfigurationSynchronized(object sender, ConfigurationSynchronizationEventArgs e) { try { if (Instance.EnableTrace) { Log.Trace(Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name); } } catch (Exception e2) { Log.Error(Instance, e2); } } private static Color Tint(Color source, Color target) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(target, ref num, ref num2, ref num3); float num4 = default(float); float num5 = default(float); Color.RGBToHSV(source, ref num3, ref num4, ref num5); Color result = Color.HSVToRGB(num, num2, num5, true); result.a = source.a; return result; } private static void TintParticleSystem(ParticleSystem ps, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) MainModule main = ps.main; ((MainModule)(ref main)).startColor = Recolor(((MainModule)(ref main)).startColor, color); ColorOverLifetimeModule colorOverLifetime = ps.colorOverLifetime; if (((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled) { ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = Recolor(((ColorOverLifetimeModule)(ref colorOverLifetime)).color, color); } ColorBySpeedModule colorBySpeed = ps.colorBySpeed; if (((ColorBySpeedModule)(ref colorBySpeed)).enabled) { ((ColorBySpeedModule)(ref colorBySpeed)).color = Recolor(((ColorBySpeedModule)(ref colorBySpeed)).color, color); } ParticleSystemRenderer val = default(ParticleSystemRenderer); if (!((Component)ps).TryGetComponent(ref val) || (Object)(object)((Renderer)val).sharedMaterial == (Object)null) { return; } Material val2 = new Material(((Renderer)val).sharedMaterial) { name = ((Object)((Renderer)val).sharedMaterial).name + "_evil" }; string[] array = new string[2] { "_Color", "_TintColor" }; foreach (string text in array) { if (val2.HasProperty(text)) { val2.SetColor(text, Tint(val2.GetColor(text), color)); } } if (val2.HasProperty("_EmissionColor")) { Color color2 = val2.GetColor("_EmissionColor"); float maxColorComponent = ((Color)(ref color2)).maxColorComponent; if (maxColorComponent > 0f) { val2.SetColor("_EmissionColor", new Color(color.r, color.g, color.b) * maxColorComponent); } } ((Renderer)val).sharedMaterial = val2; } } [UsedImplicitly] public class Patch { [HarmonyPatch(typeof(SpawnSystem))] public class PatchSpawnSystem { [HarmonyPostfix] [HarmonyPatch(typeof(SpawnSystem), "Awake")] private static void PostfixAwake(SpawnSystem __instance, ZNetView ___m_nview, List ___m_spawnLists) { try { if ((Object)(object)___m_nview == (Object)null || !___m_nview.IsValid() || ___m_spawnLists.Count <= 0) { return; } foreach (SpawnSystemList ___m_spawnList in ___m_spawnLists) { if (!(((Object)___m_spawnList).name == "_SpawnList_mistlands")) { continue; } foreach (SpawnData spawner in ___m_spawnList.m_spawners) { switch (((Object)spawner.m_prefab).name) { case "Seeker": case "Gjall": case "SeekerBrute": case "SeekerBrood": case "Tick": if (spawner.m_enabled) { spawner.m_enabled = false; } break; } } } } catch (Exception e) { Log.Error(Main.Instance, e); } } } [HarmonyPatch(typeof(CreatureSpawner))] public class PatchCreatureSpawner { [HarmonyPostfix] [HarmonyPatch(typeof(CreatureSpawner), "Awake")] private static void PostfixAwake(CreatureSpawner __instance, ZNetView ___m_nview, ref GameObject ___m_creaturePrefab) { try { if ((Object)(object)___m_nview == (Object)null || !___m_nview.IsValid() || (Object)(object)___m_creaturePrefab == (Object)null) { return; } switch (((Object)___m_creaturePrefab).name) { case "Seeker": { GameObject creaturePrefab2 = CreatureManager.Instance.GetCreaturePrefab("bfml_EvilDverger"); if ((Object)(object)creaturePrefab2 != (Object)null) { ___m_creaturePrefab = creaturePrefab2; } break; } case "Gjall": case "SeekerBrute": { GameObject creaturePrefab = CreatureManager.Instance.GetCreaturePrefab("bfml_EvilDvergerMage"); if ((Object)(object)creaturePrefab != (Object)null) { ___m_creaturePrefab = creaturePrefab; } break; } case "SeekerQueen": if (Main.Instance.EnableTrace) { Log.Trace(Main.Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name + " [" + ((Object)__instance).name + "] " + ((Object)___m_creaturePrefab).name); } break; case "SeekerBrood": break; case "Tick": break; } } catch (Exception e) { Log.Error(Main.Instance, e); } } [HarmonyPrefix] [HarmonyPatch(typeof(CreatureSpawner), "Spawn")] private static bool PrefixSpawn(CreatureSpawner __instance, ZNetView ___m_nview, GameObject ___m_creaturePrefab) { try { if ((Object)(object)___m_nview == (Object)null || !___m_nview.IsValid() || (Object)(object)___m_creaturePrefab == (Object)null) { return true; } switch (((Object)___m_creaturePrefab).name) { case "Seeker": case "Gjall": case "SeekerBrute": case "SeekerBrood": case "Tick": case "SeekerQueen": return false; } } catch (Exception e) { Log.Error(Main.Instance, e); } return true; } } [HarmonyPatch(typeof(Humanoid))] public class PatchHumanoid { [HarmonyPostfix] [HarmonyPatch(typeof(Humanoid), "Awake")] private static void PostfixAwake(Humanoid __instance, ZNetView ___m_nview) { try { if ((Object)(object)___m_nview == (Object)null || !___m_nview.IsValid() || ((Character)__instance).IsPlayer()) { return; } switch (((Character)__instance).m_name) { case "$enemy_seeker": case "$enemy_tick": case "$enemy_gjall": case "$enemy_babyseeker": case "$enemy_seekerbrute": if (!___m_nview.HasOwner()) { ___m_nview.ClaimOwnership(); } if (___m_nview.IsOwner()) { ZNetScene.instance.Destroy(((Component)__instance).gameObject); } break; case "$enemy_seekerqueen": if (!___m_nview.HasOwner()) { ___m_nview.ClaimOwnership(); } ((MonoBehaviour)Main.Instance).StartCoroutine(Main.ReplaceSeekerQueen(__instance, ___m_nview)); break; } } catch (Exception e) { Log.Error(Main.Instance, e); } } } [HarmonyPatch(typeof(OfferingBowl))] public class PatchOfferingBowl { [HarmonyPostfix] [HarmonyPatch(typeof(OfferingBowl), "Awake")] private static void PostfixAwake(OfferingBowl __instance) { try { if ((Object)(object)__instance.m_bossPrefab == (Object)null || !(((Object)__instance.m_bossPrefab).name == "SeekerQueen")) { return; } GameObject creaturePrefab = CreatureManager.Instance.GetCreaturePrefab("bfml_EvilBonemass"); if ((Object)(object)creaturePrefab == (Object)null) { Log.Error(Main.Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name + " bfml_EvilBonemass is not registered; leaving " + BossNames.SeekerQueen + " on " + ((Object)__instance).name); return; } if (Main.Instance.EnableTrace) { Log.Trace(Main.Instance, MethodBase.GetCurrentMethod()?.DeclaringType?.Name + "." + MethodBase.GetCurrentMethod()?.Name + " [" + ((Object)__instance).GetName() + "] Replacing '" + BossNames.SeekerQueen + "' with 'bfml_EvilBonemass'"); } __instance.m_bossPrefab = creaturePrefab; } catch (Exception e) { Log.Error(Main.Instance, e); } } } } } namespace Digitalroot.Modding.Framework.Logging { internal interface ITraceableLogging { string Source { get; } bool EnableTrace { get; } } internal sealed class Log { private static readonly Dictionary TraceLoggers; [UsedImplicitly] private static Log Instance { get; } static Log() { TraceLoggers = new Dictionary(); Instance = new Log(); } private Log() { TraceLoggers.Add("Digitalroot", new TraceLogger("Digitalroot", enableTrace: false)); } public static void RegisterSource(ITraceableLogging sender) { if ((!TraceLoggers.ContainsKey(sender.Source) || TraceLoggers[sender.Source].IsTraceEnabled != sender.EnableTrace) && (!TraceLoggers.ContainsKey(sender.Source) || sender.EnableTrace)) { if (TraceLoggers.ContainsKey(sender.Source) && sender.EnableTrace) { TraceLoggers[sender.Source].EnableTrace(); } else { TraceLoggers.Add(sender.Source, new TraceLogger(sender.Source, sender.EnableTrace)); } } } private static TraceLogger GetTraceLogger(ITraceableLogging sender) { if (!TraceLoggers.ContainsKey(sender.Source)) { return TraceLoggers["Digitalroot"]; } return TraceLoggers[sender.Source]; } [UsedImplicitly] public static void SetEnableTrace(ITraceableLogging sender, bool value) { if (value) { GetTraceLogger(sender).EnableTrace(); } else { GetTraceLogger(sender).DisableTrace(); } } [UsedImplicitly] public static void SetEnableTraceForAllLoggers(bool value) { foreach (TraceLogger value2 in TraceLoggers.Values) { if (value) { value2.EnableTrace(); } else { value2.DisableTrace(); } } } [UsedImplicitly] public static void Debug(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogDebug(value); } [UsedImplicitly] public static void Error(ITraceableLogging sender, Exception e, int i = 1) { Error(sender, "Message: " + e.Message); Error(sender, $"TargetSite: {e.TargetSite}"); Error(sender, "StackTrace: " + e.StackTrace); Error(sender, "Source: " + e.Source); if (e.Data.Count > 0) { foreach (object key in e.Data.Keys) { Error(sender, $"key: {key}, value: {e.Data[key]}"); } } if (e.InnerException != null) { Error(sender, $"--- InnerException [{i}][Start] ---"); Error(sender, e.InnerException, ++i); } } [UsedImplicitly] public static void Error(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogError(value); } [UsedImplicitly] public static void Info(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogInfo(value); } [UsedImplicitly] public static void Fatal(ITraceableLogging sender, Exception e, int i = 1) { Fatal(sender, "Message: " + e.Message); Fatal(sender, $"TargetSite: {e.TargetSite}"); Fatal(sender, "StackTrace: " + e.StackTrace); Fatal(sender, "Source: " + e.Source); if (e.Data.Count > 0) { foreach (object key in e.Data.Keys) { Fatal(sender, $"key: {key}, value: {e.Data[key]}"); } } if (e.InnerException != null) { Fatal(sender, $"--- InnerException [{i}][Start] ---"); Fatal(sender, e.InnerException, ++i); } } [UsedImplicitly] public static void Fatal(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogFatal(value); } [UsedImplicitly] public static void Message(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogMessage(value); } [UsedImplicitly] public static void Trace(ITraceableLogging sender, object value) { if (GetTraceLogger(sender).IsTraceEnabled || sender.EnableTrace) { GetTraceLogger(sender).LoggerRef.Log((LogLevel)63, value); } } [UsedImplicitly] public static void Warning(ITraceableLogging sender, object value) { GetTraceLogger(sender).LoggerRef.LogWarning(value); } } internal class TraceLogger { internal readonly ManualLogSource LoggerRef; private readonly string _source; private readonly FileInfo _traceFileInfo; public bool IsTraceEnabled { get; private set; } private DirectoryInfo AssemblyDirectory => new FileInfo(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path)).Directory; public TraceLogger(string source, bool enableTrace) { _source = source; IsTraceEnabled = enableTrace; LoggerRef = Logger.CreateLogSource(_source); _traceFileInfo = new FileInfo(Path.Combine(Paths.BepInExRootPath ?? AssemblyDirectory.FullName, "logs", _source + ".Trace.log")); if (_traceFileInfo.DirectoryName != null) { Directory.CreateDirectory(_traceFileInfo.DirectoryName); } if (_traceFileInfo.Exists) { _traceFileInfo.Delete(); _traceFileInfo.Refresh(); } LoggerRef.LogEvent += OnLogEvent; } public void EnableTrace() { IsTraceEnabled = true; } public void DisableTrace() { IsTraceEnabled = false; } [UsedImplicitly] public void StopTrace() { LoggerRef.LogEvent -= OnLogEvent; } private void OnLogEvent(object sender, LogEventArgs e) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (e.Source.SourceName != _source || !IsTraceEnabled) { return; } using Mutex mutex = new Mutex(initiallyOwned: false, "Digitalroot.Modding.Log.TraceLogger." + _source); mutex.WaitOne(); try { if (e.Data is string) { string contents = $"[{e.Level,-7}:{e.Source.SourceName,10}] {e.Data}{Environment.NewLine}"; File.AppendAllText(_traceFileInfo.FullName, contents, Encoding.UTF8); } else { string contents2 = $"[{e.Level,-7}:{e.Source.SourceName,10}] {JsonSerializationProvider.Serialize(e.Data)}{Environment.NewLine}"; File.AppendAllText(_traceFileInfo.FullName, contents2, Encoding.UTF8); } } finally { mutex.ReleaseMutex(); } } } } namespace Digitalroot.Modding.Framework.Common.Json { [UsedImplicitly] internal static class JsonSerializationProvider { public static T Deserialize(string json) { return SimpleJson.DeserializeObject(json, (IJsonSerializerStrategy)(object)new DigitalrootJsonSerializerStrategy()); } public static string Serialize(object obj) { return SimpleJson.SerializeObject(obj, (IJsonSerializerStrategy)(object)new DigitalrootJsonSerializerStrategy()); } } internal class DigitalrootJsonSerializerStrategy : PocoJsonSerializerStrategy { public override bool TrySerializeNonPrimitiveObject(object input, out object output) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (!(input is Vector3 val)) { if (input is Quaternion val2) { output = new float[4] { val2.x, val2.y, val2.z, val2.w }; return true; } return ((PocoJsonSerializerStrategy)this).TrySerializeNonPrimitiveObject(input, ref output); } output = new float[3] { val.x, val.y, val.z }; return true; } public override object DeserializeObject(object value, Type type) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) if (type == null) { throw new ArgumentNullException("type"); } if (value == null) { throw new ArgumentNullException("value"); } if (value is string value2) { if (string.IsNullOrWhiteSpace(value2)) { throw new ArgumentNullException("value"); } if (type == typeof(Vector3)) { if (!(((PocoJsonSerializerStrategy)this).DeserializeObject(value, typeof(float[])) is float[] array) || (array != null && array.Length != 3)) { throw new ArgumentException(string.Format("The value '{0}' can be converted to a {1}.", value, "Vector3"), "value"); } return (object)new Vector3(array[0], array[1], array[2]); } if (type == typeof(Quaternion)) { if (!(((PocoJsonSerializerStrategy)this).DeserializeObject(value, typeof(float[])) is float[] array2) || (array2 != null && array2.Length != 4)) { throw new ArgumentException(string.Format("The value '{0}' can be converted to a {1}.", value, "Quaternion"), "value"); } return (object)new Quaternion(array2[0], array2[1], array2[2], array2[3]); } return ((PocoJsonSerializerStrategy)this).DeserializeObject(value, type); } throw new ArgumentException($"The value '{value}' can be converted to a {type.Name}.", "value"); } } } namespace Digitalroot.Modding.Framework.Names.Vanilla { internal static class BossNames { [UsedImplicitly] public static readonly IEnumerable AllNames = ReflectionUtils.AllNames(typeof(BossNames)); public static readonly string Eikthyr = "Eikthyr"; public static readonly string TheElder = "gd_king"; public static readonly string Bonemass = "Bonemass"; public static readonly string Moder = "Dragon"; public static readonly string Yagluth = "GoblinKing"; public static readonly string SeekerQueen = "SeekerQueen"; public static readonly string DragonQueen = "Dragonqueen"; public static readonly string Fader = "Fader"; [UsedImplicitly] public static IEnumerable AllNamesByBiome(Biome biome) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) if ((int)biome <= 8) { switch (biome - 1) { case 0: yield return Eikthyr; yield break; case 1: yield return Bonemass; yield break; case 3: yield return Moder; yield break; case 2: yield break; } if ((int)biome == 8) { yield return TheElder; } } else if ((int)biome != 16) { if ((int)biome == 512) { yield return SeekerQueen; } } else { yield return Yagluth; } } } } namespace Digitalroot.Modding.Framework.Utils { internal static class ReflectionUtils { [UsedImplicitly] public static List AllOf() { return Enum.GetValues(typeof(T)).OfType().ToList(); } [UsedImplicitly] public static IEnumerable AllNames(Type type) { foreach (FieldInfo item in from f1 in type.GetFields() where f1.FieldType == typeof(string) select f1) { yield return item.GetValue(null).ToString(); } } [UsedImplicitly] public static T GetPrivateField(object instance, string name) { FieldInfo field = instance.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { return (T)field.GetValue(instance); } Log.Error(StaticSourceLogger.PreMadeTraceableInstance, $"Variable {name} does not exist on type: {instance.GetType()}"); return default(T); } [UsedImplicitly] public static object InvokePrivate(object instance, string name, object[] args = null) { MethodInfo method = instance.GetType().GetMethod(name, BindingFlags.Instance | BindingFlags.NonPublic); if (method == null) { Type[] types = ((args == null) ? Type.EmptyTypes : args.Select((object arg) => arg.GetType()).ToArray()); method = instance.GetType().GetMethod(name, types); } if (method == null) { Log.Error(StaticSourceLogger.PreMadeTraceableInstance, $"Method {name} does not exist on type: {instance.GetType()}"); return null; } return method.Invoke(instance, args); } [UsedImplicitly] public static void SetPrivateField(object instance, string name, object value) { FieldInfo field = instance.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { Log.Error(StaticSourceLogger.PreMadeTraceableInstance, $"Variable {name} does not exist on type: {instance.GetType()}"); } else { field.SetValue(instance, value); } } } } namespace Digitalroot.Modding.Framework.Logging { [DebuggerDisplay("Source = {Source}, EnableTrace = {EnableTrace}", Name = "{Source}")] internal class StaticSourceLogger : ITraceableLogging { public static readonly StaticSourceLogger PreMadeTraceableInstance = new StaticSourceLogger(enableTrace: true); public static StaticSourceLogger PreMadeNonTraceableInstance = new StaticSourceLogger(); public string Source { get; } public bool EnableTrace { get; } public StaticSourceLogger(bool enableTrace = false) : this("Digitalroot", enableTrace) { } public StaticSourceLogger(string source, bool enableTrace = false) { Source = source; EnableTrace = enableTrace; } } } namespace Digitalroot.Modding.Framework.Names.Vanilla { internal static class EnemyNames { [UsedImplicitly] public static readonly IEnumerable AllNames = ReflectionUtils.AllNames(typeof(EnemyNames)); public static readonly string Abomination = "Abomination"; public static readonly string AxeBerzerkr = "AxeBerzerkr"; public static readonly string AxeBerzerkrBlood = "AxeBerzerkrBlood"; public static readonly string AxeBerzerkrLightning = "AxeBerzerkrLightning"; public static readonly string AxeBerzerkrNature = "AxeBerzerkrNature"; public static readonly string Bat = "Bat"; public static readonly string Blob = "Blob"; public static readonly string BlobElite = "BlobElite"; public static readonly string BlobFrost = "BlobFrost"; public static readonly string BlobLava = "BlobLava"; public static readonly string BlobTar = "BlobTar"; public static readonly string BlobVial = "BlobVial"; public static readonly string Boar = "Boar"; public static readonly string BoarPiggy = "Boar_piggy"; public static readonly string BonemawSerpent = "BonemawSerpent"; public static readonly string CharredArcher = "Charred_Archer"; public static readonly string CharredArcherFader = "Charred_Archer_Fader"; public static readonly string CharredMage = "Charred_Mage"; public static readonly string CharredMelee = "Charred_Melee"; public static readonly string CharredMeleeDyrnwyn = "Charred_Melee_Dyrnwyn"; public static readonly string CharredMeleeFader = "Charred_Melee_Fader"; public static readonly string CharredTwitcher = "Charred_Twitcher"; public static readonly string Crow = "Crow"; public static readonly string Deathsquito = "Deathsquito"; public static readonly string DarkwoodWolf = "darkwood_wolf"; public static readonly string Deer = "Deer"; public static readonly string Drake = "Hatchling"; public static readonly string Draugr = "Draugr"; public static readonly string DraugrElite = "Draugr_Elite"; public static readonly string DraugrRanged = "Draugr_Ranged"; public static readonly string Dverger = "Dverger"; public static readonly string DvergerArbalest = "DvergerArbalest"; public static readonly string DvergerAshlands = "DvergerAshlands"; public static readonly string DvergerMage = "DvergerMage"; public static readonly string DvergerMageFire = "DvergerMageFire"; public static readonly string DvergerMageIce = "DvergerMageIce"; public static readonly string DvergerMageSupport = "DvergerMageSupport"; public static readonly string FallenValkyrie = "FallenValkyrie"; public static readonly string Fenring = "Fenring"; public static readonly string FenringCultist = "Fenring_Cultist"; public static readonly string FenringCultistHildir = "Fenring_Cultist_Hildir"; public static readonly string FenringCultistHildirNochest = "Fenring_Cultist_Hildir_nochest"; public static readonly string FulingTrap = "fuling_trap"; public static readonly string FulingTurret = "fuling_turret"; public static readonly string Ghost = "Ghost"; public static readonly string Gjall = "Gjall"; public static readonly string Goblin = "Goblin"; public static readonly string GoblinArcher = "GoblinArcher"; public static readonly string GoblinBrute = "GoblinBrute"; public static readonly string GoblinBruteHildir = "GoblinBrute_Hildir"; public static readonly string GoblinBruteBros = "GoblinBruteBros"; public static readonly string GoblinShaman = "GoblinShaman"; public static readonly string Greydwarf = "Greydwarf"; public static readonly string GreydwarfElite = "Greydwarf_Elite"; public static readonly string GreydwarfShaman = "Greydwarf_Shaman"; public static readonly string Greyling = "Greyling"; public static readonly string Hare = "Hare"; public static readonly string Hen = "Hen"; public static readonly string Hive = "Hive"; public static readonly string Leech = "Leech"; public static readonly string Lox = "Lox"; public static readonly string LoxCalf = "Lox_Calf"; public static readonly string Mistile = "Mistile"; public static readonly string Morgen = "Morgen"; public static readonly string MorgenNonSleeping = "Morgen_NonSleeping"; public static readonly string Neck = "Neck"; public static readonly string Seagal = "Seagal"; public static readonly string Seeker = "Seeker"; public static readonly string SeekerBrute = "SeekerBrute"; public static readonly string SeekerAspic = "SeekerAspic"; public static readonly string SeekerBrood = "SeekerBrood"; public static readonly string Serpent = "Serpent"; public static readonly string Skeleton = "Skeleton"; public static readonly string SkeletonFriendly = "Skeleton_Friendly"; public static readonly string SkeletonHildir = "Skeleton_Hildir"; public static readonly string SkeletonHildirNochest = "Skeleton_Hildir_nochest"; public static readonly string SkeletonNoArcher = "Skeleton_NoArcher"; public static readonly string SkeletonPoison = "Skeleton_Poison"; public static readonly string StoneGolem = "StoneGolem"; public static readonly string Surtling = "Surtling"; public static readonly string TheHive = "TheHive"; public static readonly string Tick = "Tick"; public static readonly string Troll = "Troll"; public static readonly string Ulv = "Ulv"; public static readonly string Volture = "Volture"; public static readonly string Wolf = "Wolf"; public static readonly string WolfCub = "Wolf_cub"; public static readonly string Wraith = "Wraith"; [UsedImplicitly] public static IEnumerable AllNamesByBiome(Biome biome) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) if ((int)biome <= 16) { switch (biome - 1) { default: if ((int)biome != 8) { if ((int)biome != 16) { break; } yield return BlobTar; yield return Deathsquito; yield return Goblin; yield return GoblinArcher; yield return GoblinBrute; yield return GoblinShaman; yield return Lox; yield return LoxCalf; yield break; } yield return Crow; yield return Deer; yield return Ghost; yield return Greydwarf; yield return GreydwarfElite; yield return GreydwarfShaman; yield return Skeleton; yield return SkeletonPoison; yield return Troll; yield break; case 0: yield return Boar; yield return BoarPiggy; yield return Deer; yield return Draugr; yield return Ghost; yield return Greyling; yield return Greydwarf; yield return GreydwarfElite; yield return GreydwarfShaman; yield return Neck; yield return Seagal; yield return Skeleton; yield break; case 1: yield return Abomination; yield return Blob; yield return BlobElite; yield return Draugr; yield return DraugrElite; yield return DraugrRanged; yield return Leech; yield return Surtling; yield return Wraith; yield break; case 3: yield return Drake; yield return Fenring; yield return StoneGolem; yield return Wolf; yield return WolfCub; yield break; case 2: break; } } else if ((int)biome <= 64) { if ((int)biome == 32 || (int)biome == 64) { yield break; } } else { if ((int)biome == 256) { yield return Serpent; yield break; } if ((int)biome == 512) { yield return Dverger; yield return Gjall; yield return Hare; yield return Seeker; yield return SeekerBrute; yield return Tick; yield break; } } throw new ArgumentOutOfRangeException("biome", biome, null); } } internal static class ItemDropNames { public static readonly IEnumerable AllNames = ReflectionUtils.AllNames(typeof(ItemDropNames)); public static string Acorn = "Acorn"; public static string Amber = "Amber"; public static string AmberPearl = "AmberPearl"; public static string AncientSkull = "ancient_skull"; public static string AncientSeed = "AncientSeed"; public static string ArmorCarapaceChest = "ArmorCarapaceChest"; public static string ArmorCarapaceLegs = "ArmorCarapaceLegs"; public static string ArmorDress1 = "ArmorDress1"; public static string ArmorDress2 = "ArmorDress2"; public static string ArmorDress3 = "ArmorDress3"; public static string ArmorDress4 = "ArmorDress4"; public static string ArmorDress5 = "ArmorDress5"; public static string ArmorDress6 = "ArmorDress6"; public static string ArmorDress7 = "ArmorDress7"; public static string ArmorDress8 = "ArmorDress8"; public static string ArmorDress9 = "ArmorDress9"; public static string ArmorDress10 = "ArmorDress10"; public static string ArmorFenringChest = "ArmorFenringChest"; public static string ArmorFenringLegs = "ArmorFenringLegs"; public static string ArmorFlametalChest = "ArmorFlametalChest"; public static string ArmorFlametalLegs = "ArmorFlametalLegs"; public static string ArmorHarvester1 = "ArmorHarvester1"; public static string ArmorHarvester2 = "ArmorHarvester2"; public static string ArmorAshlandsMediumChest = "ArmorAshlandsMediumChest"; public static string ArmorAshlandsMediumlegs = "ArmorAshlandsMediumlegs"; public static string ArmorBronzeChest = "ArmorBronzeChest"; public static string ArmorBronzeLegs = "ArmorBronzeLegs"; public static string ArmorIronChest = "ArmorIronChest"; public static string ArmorIronLegs = "ArmorIronLegs"; public static string ArmorMageChest = "ArmorMageChest"; public static string ArmorMageLegs = "ArmorMageLegs"; public static string ArmorMageLegsAshlands = "ArmorMageLegs_Ashlands"; public static string ArmorLeatherChest = "ArmorLeatherChest"; public static string ArmorLeatherLegs = "ArmorLeatherLegs"; public static string ArmorPaddedCuirass = "ArmorPaddedCuirass"; public static string ArmorPaddedGreaves = "ArmorPaddedGreaves"; public static string ArmorRagsChest = "ArmorRagsChest"; public static string ArmorRagsLegs = "ArmorRagsLegs"; public static string ArmorRootChest = "ArmorRootChest"; public static string ArmorRootLegs = "ArmorRootLegs"; public static string ArmorTrollLeatherChest = "ArmorTrollLeatherChest"; public static string ArmorTrollLeatherLegs = "ArmorTrollLeatherLegs"; public static string ArmorTunic1 = "ArmorTunic1"; public static string ArmorTunic2 = "ArmorTunic2"; public static string ArmorTunic3 = "ArmorTunic3"; public static string ArmorTunic4 = "ArmorTunic4"; public static string ArmorTunic5 = "ArmorTunic5"; public static string ArmorTunic6 = "ArmorTunic6"; public static string ArmorTunic7 = "ArmorTunic7"; public static string ArmorTunic8 = "ArmorTunic8"; public static string ArmorTunic9 = "ArmorTunic9"; public static string ArmorTunic10 = "ArmorTunic10"; public static string ArmorWolfChest = "ArmorWolfChest"; public static string ArmorWolfLegs = "ArmorWolfLegs"; public static string ArrowBronze = "ArrowBronze"; public static string ArrowCarapace = "ArrowCarapace"; public static string ArrowCharred = "ArrowCharred"; public static string ArrowFire = "ArrowFire"; public static string ArrowFlint = "ArrowFlint"; public static string ArrowFrost = "ArrowFrost"; public static string ArrowIron = "ArrowIron"; public static string ArrowNeedle = "ArrowNeedle"; public static string ArrowObsidian = "ArrowObsidian"; public static string ArrowPoison = "ArrowPoison"; public static string ArrowSilver = "ArrowSilver"; public static string ArrowWood = "ArrowWood"; public static string AsksvinEgg = "AsksvinEgg"; public static string AsksvinMeat = "AsksvinMeat"; public static string AtgeirBlackmetal = "AtgeirBlackmetal"; public static string AtgeirBronze = "AtgeirBronze"; public static string AtgeirHimminAfl = "AtgeirHimminAfl"; public static string AtgeirIron = "AtgeirIron"; public static string AtgeirWood = "AtgeirWood"; public static string AxeBlackMetal = "AxeBlackMetal"; public static string AxeBronze = "AxeBronze"; public static string AxeEarly = "AxeEarly"; public static string AxeFlint = "AxeFlint"; public static string AxeIron = "AxeIron"; public static string AxeJotunBane = "AxeJotunBane"; public static string AxeStone = "AxeStone"; public static string AxeWood = "AxeWood"; public static string BarberKit = "BarberKit"; public static string Barley = "Barley"; public static string BarleyFlour = "BarleyFlour"; public static string BarleyWine = "BarleyWine"; public static string BarleyWineBase = "BarleyWineBase"; public static string BarrelRings = "BarrelRings"; public static string Battleaxe = "Battleaxe"; public static string BattleaxeCrystal = "BattleaxeCrystal"; public static string BeechSeeds = "BeechSeeds"; public static string Bell = "Bell"; public static string BeltStrength = "BeltStrength"; public static string Bilebag = "Bilebag"; public static string BirchSeeds = "BirchSeeds"; public static string BjornHide = "BjornHide"; public static string BjornMeat = "BjornMeat"; public static string BjornPaw = "BjornPaw"; public static string BlackCore = "BlackCore"; public static string BlackMarble = "BlackMarble"; public static string BlackMetal = "BlackMetal"; public static string BlackMetalScrap = "BlackMetalScrap"; public static string BlackSoup = "BlackSoup"; public static string Blackwood = "Blackwood"; public static string Bloodbag = "Bloodbag"; public static string BloodPudding = "BloodPudding"; public static string Blueberries = "Blueberries"; public static string BoarJerky = "BoarJerky"; public static string BoltBlackmetal = "BoltBlackmetal"; public static string BoltBone = "BoltBone"; public static string BoltCarapace = "BoltCarapace"; public static string BoltCharred = "BoltCharred"; public static string BoltIron = "BoltIron"; public static string BombBile = "BombBile"; public static string BombLava = "BombLava"; public static string BombOoze = "BombOoze"; public static string BombSiege = "BombSiege"; public static string BombSmoke = "BombSmoke"; public static string BoneFragments = "BoneFragments"; public static string BoneMawSerpentMeat = "BoneMawSerpentMeat"; public static string BonemawSerpentScale = "BonemawSerpentScale"; public static string BonemawSerpentTooth = "BonemawSerpentTooth"; public static string Bow = "Bow"; public static string BowAshlands = "BowAshlands"; public static string BowAshlandsBlood = "BowAshlandsBlood"; public static string BowAshlandsRoot = "BowAshlandsRoot"; public static string BowAshlandsStorm = "BowAshlandsStorm"; public static string BowDraugrFang = "BowDraugrFang"; public static string BowFineWood = "BowFineWood"; public static string BowHuntsman = "BowHuntsman"; public static string BowSpineSnap = "BowSpineSnap"; public static string Bread = "Bread"; public static string BreadDough = "BreadDough"; public static string Bronze = "Bronze"; public static string BronzeNails = "BronzeNails"; public static string BronzeScrap = "BronzeScrap"; public static string BugMeat = "BugMeat"; public static string CandleWick = "CandleWick"; public static string CapeAsh = "CapeAsh"; public static string CapeAsksvin = "CapeAsksvin"; public static string CapeDeerHide = "CapeDeerHide"; public static string CapeFeather = "CapeFeather"; public static string CapeLinen = "CapeLinen"; public static string CapeLox = "CapeLox"; public static string CapeOdin = "CapeOdin"; public static string CapeTest = "CapeTest"; public static string CapeTrollHide = "CapeTrollHide"; public static string CapeWolf = "CapeWolf"; public static string Carapace = "Carapace"; public static string Carrot = "Carrot"; public static string CarrotSeeds = "CarrotSeeds"; public static string CarrotSoup = "CarrotSoup"; public static string CelestialFeather = "CelestialFeather"; public static string CeramicPlate = "CeramicPlate"; public static string Chain = "Chain"; public static string CharcoalResin = "CharcoalResin"; public static string CharredBone = "CharredBone"; public static string CharredCogwheel = "CharredCogwheel"; public static string CharredBreastplate = "Charred_Breastplate"; public static string CharredHelmet = "Charred_Helmet"; public static string CharredHipCloth = "Charred_HipCloth"; public static string CharredMageCloths = "Charred_MageCloths"; public static string ChestHildir1 = "chest_hildir1"; public static string ChestHildir2 = "chest_hildir2"; public static string ChestHildir3 = "chest_hildir3"; public static string Chicken = "Chicken"; public static string ChickenEgg = "ChickenEgg"; public static string ChickenMeat = "ChickenMeat"; public static string Chitin = "Chitin"; public static string Cinder = "Cinder"; public static string Cloudberry = "Cloudberry"; public static string Club = "Club"; public static string Coal = "Coal"; public static string Coins = "Coins"; public static string CookedAsksvinMeat = "CookedAsksvinMeat"; public static string CookedBoneMawSerpentMeat = "CookedBoneMawSerpentMeat"; public static string CookedBugMeat = "CookedBugMeat"; public static string CookedChickenMeat = "CookedChickenMeat"; public static string CookedDeerMeat = "CookedDeerMeat"; public static string CookedEgg = "CookedEgg"; public static string CookedHareMeat = "CookedHareMeat"; public static string CookedLoxMeat = "CookedLoxMeat"; public static string CookedWolfMeat = "CookedWolfMeat"; public static string CookedMeat = "CookedMeat"; public static string CookedVoltureMeat = "CookedVoltureMeat"; public static string Copper = "Copper"; public static string CopperOre = "CopperOre"; public static string CopperScrap = "CopperScrap"; public static string CrossbowArbalest = "CrossbowArbalest"; public static string CryptKey = "CryptKey"; public static string Crystal = "Crystal"; public static string Cultivator = "Cultivator"; public static string CuredSquirrelHamstring = "CuredSquirrelHamstring"; public static string Dandelion = "Dandelion"; public static string DeerHide = "DeerHide"; public static string DeerMeat = "DeerMeat"; public static string DeerStew = "DeerStew"; public static string Demister = "Demister"; public static string DragonEgg = "DragonEgg"; public static string DragonTear = "DragonTear"; public static string DvergrKey = "DvergrKey"; public static string DvergrKeyFragment = "DvergrKeyFragment"; public static string DvergrNeedle = "DvergrNeedle"; public static string DvergerStaffFire = "DvergerStaffFire"; public static string DvergerStaffHeal = "DvergerStaffHeal"; public static string DvergerStaffIce = "DvergerStaffIce"; public static string DvergerStaffSupport = "DvergerStaffSupport"; public static string DvergerSuitArbalest = "DvergerSuitArbalest"; public static string DvergerSuitArbalestAshlands = "DvergerSuitArbalest_Ashlands"; public static string DvergerSuitFire = "DvergerSuitFire"; public static string DvergerSuitIce = "DvergerSuitIce"; public static string DvergerSuitSupport = "DvergerSuitSupport"; public static string DyrnwynBladeFragment = "DyrnwynBladeFragment"; public static string DyrnwynHiltFragment = "DyrnwynHiltFragment"; public static string DyrnwynTipFragment = "DyrnwynTipFragment"; public static string Eitr = "Eitr"; public static string Eikthyrnir = "Eikthyrnir"; public static string ElderBark = "ElderBark"; public static string Entrails = "Entrails"; public static string Eyescream = "Eyescream"; public static string FaderDrop = "FaderDrop"; public static string FeastAshlandsMaterial = "FeastAshlands_Material"; public static string FeastBlackforestMaterial = "FeastBlackforest_Material"; public static string Feaster = "Feaster"; public static string FeastMeadowsMaterial = "FeastMeadows_Material"; public static string FeastMistlandsMaterial = "FeastMistlands_Material"; public static string FeastMountainsMaterial = "FeastMountains_Material"; public static string FeastOceansMaterial = "FeastOceans_Material"; public static string FeastPlainsMaterial = "FeastPlains_Material"; public static string FeastSwampsMaterial = "FeastSwamps_Material"; public static string Feathers = "Feathers"; public static string FineWood = "FineWood"; public static string FirCone = "FirCone"; public static string FishAndBread = "FishAndBread"; public static string FishAndBreadUncooked = "FishAndBreadUncooked"; public static string FishAnglerRaw = "FishAnglerRaw"; public static string FishCooked = "FishCooked"; public static string FishingBait = "FishingBait"; public static string FishingBaitAshlands = "FishingBaitAshlands"; public static string FishingBaitCave = "FishingBaitCave"; public static string FishingBaitDeepNorth = "FishingBaitDeepNorth"; public static string FishingBaitForest = "FishingBaitForest"; public static string FishingBaitMistlands = "FishingBaitMistlands"; public static string FishingBaitOcean = "FishingBaitOcean"; public static string FishingBaitPlains = "FishingBaitPlains"; public static string FishingBaitSwamp = "FishingBaitSwamp"; public static string FishingRod = "FishingRod"; public static string FishRaw = "FishRaw"; public static string FishWraps = "FishWraps"; public static string FistFenrirClaw = "FistFenrirClaw"; public static string Flametal = "Flametal"; public static string FlametalNew = "FlametalNew"; public static string FlametalOre = "FlametalOre"; public static string FlametalOreNew = "FlametalOreNew"; public static string Flax = "Flax"; public static string Flint = "Flint"; public static string FragrantBundle = "FragrantBundle"; public static string FreezeGland = "FreezeGland"; public static string FreshSeaweed = "FreshSeaweed"; public static string GemstoneBlue = "GemstoneBlue"; public static string GemstoneGreen = "GemstoneGreen"; public static string GemstoneRed = "GemstoneRed"; public static string GiantBloodSack = "GiantBloodSack"; public static string GlowingMushroom = "GlowingMushroom"; public static string GoblinGem = "Goblin_Gem"; public static string GoblinTotem = "GoblinTotem"; public static string Grausten = "Grausten"; public static string GreydwarfEye = "GreydwarfEye"; public static string Guck = "Guck"; public static string Hammer = "Hammer"; public static string HareMeat = "HareMeat"; public static string HardAntler = "HardAntler"; public static string HelmetAshlandsMediumHood = "HelmetAshlandsMediumHood"; public static string HelmetBronze = "HelmetBronze"; public static string HelmetCarapace = "HelmetCarapace"; public static string HelmetDrake = "HelmetDrake"; public static string HelmetDverger = "HelmetDverger"; public static string HelmetFenring = "HelmetFenring"; public static string HelmetFishingHat = "HelmetFishingHat"; public static string HelmetFlametal = "HelmetFlametal"; public static string HelmetHat1 = "HelmetHat1"; public static string HelmetHat2 = "HelmetHat2"; public static string HelmetHat3 = "HelmetHat3"; public static string HelmetHat4 = "HelmetHat4"; public static string HelmetHat5 = "HelmetHat5"; public static string HelmetHat6 = "HelmetHat6"; public static string HelmetHat7 = "HelmetHat7"; public static string HelmetHat8 = "HelmetHat8"; public static string HelmetHat9 = "HelmetHat9"; public static string HelmetHat10 = "HelmetHat10"; public static string HelmetIron = "HelmetIron"; public static string HelmetLeather = "HelmetLeather"; public static string HelmetMage = "HelmetMage"; public static string HelmetMageAshlands = "HelmetMage_Ashlands"; public static string HelmetMidsummerCrown = "HelmetMidsummerCrown"; public static string HelmetOdin = "HelmetOdin"; public static string HelmetPadded = "HelmetPadded"; public static string HelmetPointyHat = "HelmetPointyHat"; public static string HelmetRoot = "HelmetRoot"; public static string HelmetTrollLeather = "HelmetTrollLeather"; public static string HelmetYule = "HelmetYule"; public static string Hoe = "Hoe"; public static string Honey = "Honey"; public static string HoneyGlazedChicken = "HoneyGlazedChicken"; public static string HoneyGlazedChickenUncooked = "HoneyGlazedChickenUncooked"; public static string Iron = "Iron"; public static string IronNails = "IronNails"; public static string IronOre = "IronOre"; public static string IronScrap = "IronScrap"; public static string JuteBlue = "JuteBlue"; public static string JuteRed = "JuteRed"; public static string KnifeBlackMetal = "KnifeBlackMetal"; public static string KnifeButcher = "KnifeButcher"; public static string KnifeChitin = "KnifeChitin"; public static string KnifeCopper = "KnifeCopper"; public static string KnifeFlint = "KnifeFlint"; public static string KnifeSilver = "KnifeSilver"; public static string KnifeSkollAndHati = "KnifeSkollAndHati"; public static string Lantern = "Lantern"; public static string Larva = "Larva"; public static string LavaRock = "LavaRock"; public static string LeatherScraps = "LeatherScraps"; public static string LinenThread = "LinenThread"; public static string LoxMeat = "LoxMeat"; public static string LoxPelt = "LoxPelt"; public static string LoxPie = "LoxPie"; public static string LoxPieUncooked = "LoxPieUncooked"; public static string LuredWisp = "LuredWisp"; public static string MaceBronze = "MaceBronze"; public static string MaceEldner = "MaceEldner"; public static string MaceEldnerBlood = "MaceEldnerBlood"; public static string MaceEldnerLightning = "MaceEldnerLightning"; public static string MaceEldnerNature = "MaceEldnerNature"; public static string MaceIron = "MaceIron"; public static string MaceNeedle = "MaceNeedle"; public static string MaceSilver = "MaceSilver"; public static string MagicallyStuffedShroom = "MagicallyStuffedShroom"; public static string MagicallyStuffedShroomUncooked = "MagicallyStuffedShroomUncooked"; public static string Mandible = "Mandible"; public static string MarinatedGreens = "MarinatedGreens"; public static string MashedMeat = "MashedMeat"; public static string MeadBaseBugRepellent = "MeadBaseBugRepellent"; public static string MeadBaseBzerker = "MeadBaseBzerker"; public static string MeadBaseEitrLingering = "MeadBaseEitrLingering"; public static string MeadBaseEitrMinor = "MeadBaseEitrMinor"; public static string MeadBaseFrostResist = "MeadBaseFrostResist"; public static string MeadBaseHasty = "MeadBaseHasty"; public static string MeadBaseHealthLingering = "MeadBaseHealthLingering"; public static string MeadBaseHealthMajor = "MeadBaseHealthMajor"; public static string MeadBaseHealthMedium = "MeadBaseHealthMedium"; public static string MeadBaseHealthMinor = "MeadBaseHealthMinor"; public static string MeadBaseLightFoot = "MeadBaseLightFoot"; public static string MeadBasePoisonResist = "MeadBasePoisonResist"; public static string MeadBaseStaminaLingering = "MeadBaseStaminaLingering"; public static string MeadBaseStaminaMedium = "MeadBaseStaminaMedium"; public static string MeadBaseStaminaMinor = "MeadBaseStaminaMinor"; public static string MeadBaseStrength = "MeadBaseStrength"; public static string MeadBaseSwimmer = "MeadBaseSwimmer"; public static string MeadBaseTamer = "MeadBaseTamer"; public static string MeadBaseTasty = "MeadBaseTasty"; public static string MeadBugRepellent = "MeadBugRepellent"; public static string MeadBzerker = "MeadBzerker"; public static string MeadEitrLingering = "MeadEitrLingering"; public static string MeadEitrMinor = "MeadEitrMinor"; public static string MeadFrostResist = "MeadFrostResist"; public static string MeadHasty = "MeadHasty"; public static string MeadHealthLingering = "MeadHealthLingering"; public static string MeadHealthMajor = "MeadHealthMajor"; public static string MeadHealthMedium = "MeadHealthMedium"; public static string MeadHealthMinor = "MeadHealthMinor"; public static string MeadLightfoot = "MeadLightfoot"; public static string MeadPoisonResist = "MeadPoisonResist"; public static string MeadStaminaLingering = "MeadStaminaLingering"; public static string MeadStaminaMedium = "MeadStaminaMedium"; public static string MeadStaminaMinor = "MeadStaminaMinor"; public static string MeadTasty = "MeadTasty"; public static string MeadTrollPheromones = "MeadTrollPheromones"; public static string MeatPlatter = "MeatPlatter"; public static string MeatPlatterUncooked = "MeatPlatterUncooked"; public static string MechanicalSpring = "MechanicalSpring"; public static string MinceMeatSauce = "MinceMeatSauce"; public static string MisthareSupreme = "MisthareSupreme"; public static string MisthareSupremeUncooked = "MisthareSupremeUncooked"; public static string MistileKamikaze = "Mistile_kamikaze"; public static string MoltenCore = "MoltenCore"; public static string MorgenHeart = "MorgenHeart"; public static string Mushroom = "Mushroom"; public static string MushroomBlue = "MushroomBlue"; public static string MushroomBzerker = "MushroomBzerker"; public static string MushroomJotunPuffs = "MushroomJotunPuffs"; public static string MushroomMagecap = "MushroomMagecap"; public static string MushroomOmelette = "MushroomOmelette"; public static string MushroomSmokePuff = "MushroomSmokePuff"; public static string MushroomYellow = "MushroomYellow"; public static string NeckTail = "NeckTail"; public static string NeckTailGrilled = "NeckTailGrilled"; public static string Needle = "Needle"; public static string Obsidian = "Obsidian"; public static string Onion = "Onion"; public static string OnionSeeds = "OnionSeeds"; public static string OnionSoup = "OnionSoup"; public static string Ooze = "Ooze"; public static string PickaxeAntler = "PickaxeAntler"; public static string PickaxeBlackMetal = "PickaxeBlackMetal"; public static string PickaxeBronze = "PickaxeBronze"; public static string PickaxeIron = "PickaxeIron"; public static string PickaxeStone = "PickaxeStone"; public static string PineCone = "PineCone"; public static string PiquantPie = "PiquantPie"; public static string PiquantPieUncooked = "PiquantPieUncooked"; public static string PlaceofMystery1 = "PlaceofMystery1"; public static string PlaceofMystery2 = "PlaceofMystery2"; public static string PlaceofMystery3 = "PlaceofMystery3"; public static string PotShardGreen = "Pot_Shard_Green"; public static string PotShardRed = "Pot_Shard_Red"; public static string PowderedDragonEgg = "PowderedDragonEgg"; public static string ProustitePowder = "ProustitePowder"; public static string PukeBerries = "Pukeberries"; public static string PungentPebbles = "PungentPebbles"; public static string QueenBee = "QueenBee"; public static string QueenDrop = "QueenDrop"; public static string QueensJam = "QueensJam"; public static string Raspberry = "Raspberry"; public static string RawMeat = "RawMeat"; public static string Resin = "Resin"; public static string RoastedCrustPie = "RoastedCrustPie"; public static string RoastedCrustPieUncooked = "RoastedCrustPieUncooked"; public static string RoundLog = "RoundLog"; public static string RottenMeat = "RottenMeat"; public static string RoyalJelly = "RoyalJelly"; public static string Ruby = "Ruby"; public static string SaddleLox = "SaddleLox"; public static string Salad = "Salad"; public static string Sap = "Sap"; public static string Sausages = "Sausages"; public static string ScaleHide = "ScaleHide"; public static string ScorchingMedley = "ScorchingMedley"; public static string Scythe = "Scythe"; public static string ScytheHandle = "ScytheHandle"; public static string SerpentMeat = "SerpentMeat"; public static string SerpentMeatCooked = "SerpentMeatCooked"; public static string SerpentScale = "SerpentScale"; public static string SerpentStew = "SerpentStew"; public static string SharpeningStone = "SharpeningStone"; public static string ShieldBanded = "ShieldBanded"; public static string ShieldBlackmetal = "ShieldBlackmetal"; public static string ShieldBlackmetalTower = "ShieldBlackmetalTower"; public static string ShieldBoneTower = "ShieldBoneTower"; public static string ShieldBronzeBuckler = "ShieldBronzeBuckler"; public static string ShieldCarapace = "ShieldCarapace"; public static string ShieldCarapaceBuckler = "ShieldCarapaceBuckler"; public static string ShieldCore = "ShieldCore"; public static string ShieldFlametal = "ShieldFlametal"; public static string ShieldFlametalTower = "ShieldFlametalTower"; public static string ShieldIronBuckler = "ShieldIronBuckler"; public static string ShieldIronSquare = "ShieldIronSquare"; public static string ShieldIronTower = "ShieldIronTower"; public static string ShieldKnight = "ShieldKnight"; public static string ShieldSerpentscale = "ShieldSerpentscale"; public static string ShieldSilver = "ShieldSilver"; public static string ShieldWood = "ShieldWood"; public static string ShieldWoodTower = "ShieldWoodTower"; public static string ShocklateSmoothie = "ShocklateSmoothie"; public static string Silver = "Silver"; public static string SilverNecklace = "SilverNecklace"; public static string SilverOre = "SilverOre"; public static string SizzlingBerryBroth = "SizzlingBerryBroth"; public static string SledgeCheat = "SledgeCheat"; public static string SledgeDemolisher = "SledgeDemolisher"; public static string SledgeIron = "SledgeIron"; public static string SledgeStagbreaker = "SledgeStagbreaker"; public static string Softtissue = "Softtissue"; public static string SpearBronze = "SpearBronze"; public static string SpearCarapace = "SpearCarapace"; public static string SpearChitin = "SpearChitin"; public static string SpearElderbark = "SpearElderbark"; public static string SpearFlint = "SpearFlint"; public static string SpearSplitner = "SpearSplitner"; public static string SpearSplitnerBlood = "SpearSplitner_Blood"; public static string SpearSplitnerLightning = "SpearSplitner_Lightning"; public static string SpearSplitnerNature = "SpearSplitner_Nature"; public static string SpearWolfFang = "SpearWolfFang"; public static string SpiceAshlands = "SpiceAshlands"; public static string SpiceForests = "SpiceForests"; public static string SpiceMistlands = "SpiceMistlands"; public static string SpiceMountains = "SpiceMountains"; public static string SpiceOceans = "SpiceOceans"; public static string SpicePlains = "SpicePlains"; public static string SpicyMarmalade = "SpicyMarmalade"; public static string StaffClusterbomb = "StaffClusterbomb"; public static string StaffFireball = "StaffFireball"; public static string StaffGreenRoots = "StaffGreenRoots"; public static string StaffIceShards = "StaffIceShards"; public static string StaffLightning = "StaffLightning"; public static string StaffRedTroll = "StaffRedTroll"; public static string StaffShield = "StaffShield"; public static string StaffSkeleton = "StaffSkeleton"; public static string StaminaUpgradeGreydwarf = "StaminaUpgrade_Greydwarf"; public static string StaminaUpgradeTroll = "StaminaUpgrade_Troll"; public static string StaminaUpgradeWraith = "StaminaUpgrade_Wraith"; public static string Stone = "Stone"; public static string SurtlingCore = "SurtlingCore"; public static string SwordBlackmetal = "SwordBlackmetal"; public static string SwordBronze = "SwordBronze"; public static string SwordCheat = "SwordCheat"; public static string SwordDyrnwyn = "SwordDyrnwyn"; public static string SwordIron = "SwordIron"; public static string SwordIronFire = "SwordIronFire"; public static string SwordMistwalker = "SwordMistwalker"; public static string SwordNiedhogg = "SwordNiedhogg"; public static string SwordNiedhoggBlood = "SwordNiedhoggBlood"; public static string SwordNiedhoggLightning = "SwordNiedhoggLightning"; public static string SwordNiedhoggNature = "SwordNiedhoggNature"; public static string SwordSilver = "SwordSilver"; public static string Tankard = "Tankard"; public static string TankardDvergr = "Tankard_dvergr"; public static string TankardAnniversary = "TankardAnniversary"; public static string TankardOdin = "TankardOdin"; public static string Tar = "Tar"; public static string TarLiquid = "TarLiquid"; public static string ThSwordKrom = "THSwordKrom"; public static string ThSwordSlayer = "THSwordSlayer"; public static string ThSwordSlayerBlood = "THSwordSlayerBlood"; public static string ThSwordSlayerLightning = "THSwordSlayerLightning"; public static string ThSwordSlayerNature = "THSwordSlayerNature"; public static string Thistle = "Thistle"; public static string Thunderstone = "Thunderstone"; public static string Tin = "Tin"; public static string TinOre = "TinOre"; public static string TolrokoFlyer = "tolroko_flyer"; public static string Torch = "Torch"; public static string TorchMist = "TorchMist"; public static string TreasurePile = "treasure_pile"; public static string TreasureStack = "treasure_stack"; public static string TrollHide = "TrollHide"; public static string TrophyAbomination = "TrophyAbomination"; public static string TrophyAsksvin = "TrophyAsksvin"; public static string TrophyBlob = "TrophyBlob"; public static string TrophyBoar = "TrophyBoar"; public static string TrophyBonemass = "TrophyBonemass"; public static string TrophyBonemawSerpent = "TrophyBonemawSerpent"; public static string TrophyCharredArcher = "TrophyCharredArcher"; public static string TrophyCharredMage = "TrophyCharredMage"; public static string TrophyCharredMelee = "TrophyCharredMelee"; public static string TrophyCultist = "TrophyCultist"; public static string TrophyCultistHildir = "TrophyCultist_Hildir"; public static string TrophyDeathsquito = "TrophyDeathsquito"; public static string TrophyDeer = "TrophyDeer"; public static string TrophyDragonQueen = "TrophyDragonQueen"; public static string TrophyDraugr = "TrophyDraugr"; public static string TrophyDraugrElite = "TrophyDraugrElite"; public static string TrophyDraugrFem = "TrophyDraugrFem"; public static string TrophyDvergr = "TrophyDvergr"; public static string TrophyEikthyr = "TrophyEikthyr"; public static string TrophyFader = "TrophyFader"; public static string TrophyFallenValkyrie = "TrophyFallenValkyrie"; public static string TrophyFenring = "TrophyFenring"; public static string TrophyForestTroll = "TrophyForestTroll"; public static string TrophyFrostTroll = "TrophyFrostTroll"; public static string TrophyGjall = "TrophyGjall"; public static string TrophyGoblin = "TrophyGoblin"; public static string TrophyGoblinBrute = "TrophyGoblinBrute"; public static string TrophyGoblinBruteBrosBrute = "TrophyGoblinBruteBrosBrute"; public static string TrophyGoblinBruteBrosShaman = "TrophyGoblinBruteBrosShaman"; public static string TrophyGoblinKing = "TrophyGoblinKing"; public static string TrophyGoblinShaman = "TrophyGoblinShaman"; public static string TrophyGreydwarf = "TrophyGreydwarf"; public static string TrophyGreydwarfBrute = "TrophyGreydwarfBrute"; public static string TrophyGreydwarfShaman = "TrophyGreydwarfShaman"; public static string TrophyGrowth = "TrophyGrowth"; public static string TrophyHare = "TrophyHare"; public static string TrophyHatchling = "TrophyHatchling"; public static string TrophyKvastur = "TrophyKvastur"; public static string TrophyLeech = "TrophyLeech"; public static string TrophyLox = "TrophyLox"; public static string TrophyMorgen = "TrophyMorgen"; public static string TrophyNeck = "TrophyNeck"; public static string TrophySeeker = "TrophySeeker"; public static string TrophySeekerBrute = "TrophySeekerBrute"; public static string TrophySeekerQueen = "TrophySeekerQueen"; public static string TrophySerpent = "TrophySerpent"; public static string TrophySGolem = "TrophySGolem"; public static string TrophySkeleton = "TrophySkeleton"; public static string TrophySkeletonHildir = "TrophySkeletonHildir"; public static string TrophySkeletonPoison = "TrophySkeletonPoison"; public static string TrophySurtling = "TrophySurtling"; public static string TrophyTheElder = "TrophyTheElder"; public static string TrophyTick = "TrophyTick"; public static string TrophyUlv = "TrophyUlv"; public static string TrophyVolture = "TrophyVolture"; public static string TrophyWolf = "TrophyWolf"; public static string TrophyWraith = "TrophyWraith"; public static string Turnip = "Turnip"; public static string TurnipSeeds = "TurnipSeeds"; public static string TurnipStew = "TurnipStew"; public static string TurretBolt = "TurretBolt"; public static string TurretBoltBone = "TurretBoltBone"; public static string TurretBoltFlametal = "TurretBoltFlametal"; public static string TurretBoltWood = "TurretBoltWood"; public static string VegvisirShardBonemass = "VegvisirShard_Bonemass"; public static string VineAsh = "VineAsh"; public static string Vineberry = "Vineberry"; public static string VineberrySeeds = "VineberrySeeds"; public static string VoltureEgg = "VoltureEgg"; public static string VoltureMeat = "VoltureMeat"; public static string VoltureNest = "VoltureNest"; public static string WaterLiquid = "WaterLiquid"; public static string Wishbone = "Wishbone"; public static string Wisp = "Wisp"; public static string WitheredBone = "WitheredBone"; public static string WolfClaw = "WolfClaw"; public static string WolfHairBundle = "WolfHairBundle"; public static string WolfFang = "WolfFang"; public static string WolfJerky = "WolfJerky"; public static string WolfMeat = "WolfMeat"; public static string WolfMeatSkewer = "WolfMeatSkewer"; public static string WolfPelt = "WolfPelt"; public static string Wood = "Wood"; public static string YagluthDrop = "YagluthDrop"; public static string YggdrasilPorridge = "YggdrasilPorridge"; public static string YggdrasilRoot = "YggdrasilRoot"; public static string YggdrasilWood = "YggdrasilWood"; public static string YmirRemains = "YmirRemains"; } } internal class DigitalrootValheimBugFreeMistlands_ProcessedByFody { internal const string FodyVersion = "6.6.0.0"; internal const string ILMerge = "1.22.0.0"; }