diff --git a/src/Digitalroot.Valheim.Bounties/CMB/MerchantPanelLoader.cs b/src/Digitalroot.Valheim.Bounties/CMB/MerchantPanelLoader.cs index 5371b2d..fad1d06 100644 --- a/src/Digitalroot.Valheim.Bounties/CMB/MerchantPanelLoader.cs +++ b/src/Digitalroot.Valheim.Bounties/CMB/MerchantPanelLoader.cs @@ -29,11 +29,11 @@ public void Start() try { return; - Log.Trace(Main.Instance, $"{Main.Namespace}.{MethodBase.GetCurrentMethod()?.DeclaringType?.Name}.{MethodBase.GetCurrentMethod()?.Name}"); - Bounties = AdventureDataManager.Config.Bounties.Targets; - AdventureDataManagerConfig = AdventureDataManager.Config; - UpdateBounties(); - RefreshBounties(); + // Log.Trace(Main.Instance, $"{Main.Namespace}.{MethodBase.GetCurrentMethod()?.DeclaringType?.Name}.{MethodBase.GetCurrentMethod()?.Name}"); + // Bounties = AdventureDataManager.Config.Bounties.Targets; + // AdventureDataManagerConfig = AdventureDataManager.Config; + // UpdateBounties(); + // RefreshBounties(); } catch (Exception e) { @@ -44,7 +44,7 @@ public void Start() // ReSharper disable once MemberCanBePrivate.Global public static void UpdateBounties() => Main.Instance.ConfigureBounties(); - [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] + [UsedImplicitly] public void RefreshBounties() { try diff --git a/src/Digitalroot.Valheim.Bounties/Extensions/BountyTargetConfigExtensions.cs b/src/Digitalroot.Valheim.Bounties/Extensions/BountyTargetConfigExtensions.cs index 1008101..a22c05a 100644 --- a/src/Digitalroot.Valheim.Bounties/Extensions/BountyTargetConfigExtensions.cs +++ b/src/Digitalroot.Valheim.Bounties/Extensions/BountyTargetConfigExtensions.cs @@ -42,7 +42,7 @@ public class DigitalrootPatchFile public string ToJson() { - return Common.Json.JsonSerializationProvider.ToJson(this, true); + return Common.Json.JsonSerializationProvider.Serialize(this); } } } diff --git a/src/Digitalroot.Valheim.Bounties/Main.cs b/src/Digitalroot.Valheim.Bounties/Main.cs index a860c48..851443b 100644 --- a/src/Digitalroot.Valheim.Bounties/Main.cs +++ b/src/Digitalroot.Valheim.Bounties/Main.cs @@ -21,7 +21,7 @@ namespace Digitalroot.Valheim.Bounties { [BepInPlugin(Guid, Name, Version)] - [BepInDependency(EpicLoot.EpicLoot.PluginId, "0.10.0")] + [BepInDependency(EpicLoot.EpicLoot.PluginId, "0.9.39")] [BepInDependency(Bears, BepInDependency.DependencyFlags.SoftDependency)] [BepInDependency(MonsterLabZ, BepInDependency.DependencyFlags.SoftDependency)] [BepInDependency(RRRCore, BepInDependency.DependencyFlags.SoftDependency)] @@ -492,7 +492,6 @@ private bool IsBountyListCurrent(out IEnumerable missingBounti return false; } - [SuppressMessage("ReSharper", "MemberCanBeMadeStatic.Global")] [Obsolete] public void OnStoreGuiShow(ref StoreGui storeGui) { diff --git a/src/Digitalroot.Valheim.Bounties/Providers/DebugBounties.cs b/src/Digitalroot.Valheim.Bounties/Providers/DebugBounties.cs index c9ef734..b35bd33 100644 --- a/src/Digitalroot.Valheim.Bounties/Providers/DebugBounties.cs +++ b/src/Digitalroot.Valheim.Bounties/Providers/DebugBounties.cs @@ -1,4 +1,5 @@ using EpicLoot.Adventure; +using JetBrains.Annotations; using System.Collections.Generic; namespace Digitalroot.Valheim.Bounties.Providers @@ -10,19 +11,21 @@ public class DebugBounties : AbstractBounties protected override IEnumerable FilterResults(IEnumerable bountyTargetConfigs) { return null; - return new List - { - CreateBountyTargetConfig(Heightmap.Biome.Meadows, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.BlackForest, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.Swamp, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.Mountain, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.Plains, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.Mistlands, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.AshLands, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - , CreateBountyTargetConfig(Heightmap.Biome.DeepNorth, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) - }; + // return new List + // { + // CreateBountyTargetConfig(Heightmap.Biome.Meadows, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.BlackForest, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.Swamp, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.Mountain, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.Plains, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.Mistlands, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.AshLands, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // , CreateBountyTargetConfig(Heightmap.Biome.DeepNorth, Common.Names.MonsterLabZMod.EnemyNames.GhostWarrior) + // }; } + [UsedImplicitly] + [System.Diagnostics.CodeAnalysis.SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "Xplit")] private BountyTargetConfig CreateBountyTargetConfig(Heightmap.Biome biome, string name) { return new BountyTargetConfig diff --git a/src/Digitalroot.Valheim.Bounties/packages.lock.json b/src/Digitalroot.Valheim.Bounties/packages.lock.json index d385510..498eed5 100644 --- a/src/Digitalroot.Valheim.Bounties/packages.lock.json +++ b/src/Digitalroot.Valheim.Bounties/packages.lock.json @@ -61,7 +61,7 @@ "type": "Direct", "requested": "[0.10.0, )", "resolved": "0.10.0", - "contentHash": "b9s3hlTG34WVP4YrPbCztIa1zw1QXobDVnVv513qfoFUgU4GNk8i9rNaPPihSXWhyZUBs8je48YZ/GWXpxJL4A==" + "contentHash": "xcrww8T651JVpWdursPyqJ2Ok+3eD9/sx8TfqlRrelY5VRNXeBo1W+g2JhdGacsZc4c5C/tzmdjkHap34159Zw==" }, "ErrorProne.NET.CoreAnalyzers": { "type": "Direct", @@ -84,15 +84,6 @@ "Fody": "6.3.0" } }, - "Microsoft.NETFramework.ReferenceAssemblies": { - "type": "Direct", - "requested": "[1.0.3, )", - "resolved": "1.0.3", - "contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==", - "dependencies": { - "Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3" - } - }, "BepInEx.BaseLib": { "type": "Transitive", "resolved": "5.4.20", @@ -125,11 +116,6 @@ "resolved": "1.2.0", "contentHash": "jcZROJ28bmrZx/RaFHcTlSy3x4SmSsMolJiKoluFFrE7oMiXUnYx1K+SJeHJhow05W0Rg9oi9HEyZWwdYSV3cw==" }, - "Microsoft.NETFramework.ReferenceAssemblies.net48": { - "type": "Transitive", - "resolved": "1.0.3", - "contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ==" - }, "Mono.Cecil": { "type": "Transitive", "resolved": "0.11.4",