Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of BazaarHavenQualityAddon v1.1.1
BazaarHavenQualityAddon.dll
Decompiled 18 hours agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BazaarIsMyHaven; using BepInEx; using BepInEx.Configuration; using ItemQualities; using RoR2; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BazaarHavenQualityAddon")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BazaarHavenQualityAddon")] [assembly: AssemblyTitle("BazaarHavenQualityAddon")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace BazaarHavenQualityAddon; [BepInPlugin("thebugreport.BazaarHavenQualityAddon", "BazaarHavenQualityAddon", "1.1.0")] public class BazaarHavenQualityAddon : BaseUnityPlugin { public ConfigEntry<int> NormalCost; public ConfigEntry<int> LargeCost; public ConfigEntry<int> MilitaryCost; public ConfigEntry<int> WildCost; public ConfigEntry<float> NormalWeight; public ConfigEntry<float> LargeWeight; public ConfigEntry<float> MilitaryWeight; public ConfigEntry<float> WildWeight; public ConfigEntry<bool> SScrapperEnabled; public static ConfigEntry<int> SScrapperCost; public static ConfigEntry<float> SScrapperWeight; private void Awake() { NormalCost = ((BaseUnityPlugin)this).Config.Bind<int>("Printers", "DirectorCostQualityWhite", 15, "Director credits a printer for quality white (Tier 1) items costs. Costs 3x the non-quality printer price by default to try and keep quality items elusive as intended. Requires Restart."); LargeCost = ((BaseUnityPlugin)this).Config.Bind<int>("Printers", "DirectorCostQualityGreen", 30, "Director credits a printer for quality green (Tier 2) items costs. Costs 3x the non-quality printer price by default to try and keep quality items elusive as intended. Requires Restart."); MilitaryCost = ((BaseUnityPlugin)this).Config.Bind<int>("Printers", "DirectorCostQualityRed", 45, "Director credits a printer for quality red (Tier 3) items costs. Costs 3x the non-quality printer price by default to try and keep quality items elusive as intended. Requires Restart."); WildCost = ((BaseUnityPlugin)this).Config.Bind<int>("Printers", "DirectorCostQualityBoss", 30, "Director credits a printer for quality Boss items costs. Costs 3x the non-quality printer price by default to try and keep quality items elusive as intended. Requires Restart."); NormalWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Printers", "Tier1QualityWeight", 0.125f, "Weight for Tier 1 (white) items. Weighs a quater as must as the non-quality printer by default to try and keep quality items elusive as intended. Requires Restart."); LargeWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Printers", "Tier2QualityWeight", 0.0625f, "Weight for Tier 2 (green) items. Weighs a quater as must as the non-quality printer by default to try and keep quality items elusive as intended. Requires Restart."); MilitaryWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Printers", "Tier3QualityWeight", 0.0425f, "Weight for Tier 3 (red) items. Weighs a quater as must as the non-quality printer by default to try and keep quality items elusive as intended. Requires Restart."); WildWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Printers", "BossQualityWeight", 0.01f, "Weight for Boss-tier items. Weighs a quater as must as the non-quality printer by default to try and keep quality items elusive as intended. Requires Restart."); SScrapperEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Scrap Scrapper", "Enabled", true, "Enables or disables the Scrap Scrapper section. Requires Restart."); SScrapperCost = ((BaseUnityPlugin)this).Config.Bind<int>("Scrap Scrapper", "DirectorCost", 3, "Director credits the Scrap Scrapper costs."); SScrapperWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Scrap Scrapper", "DirectorWeight", 1f, "How likely the director picks the Scrap Scrapper, compared to the DirectorWeight of the other interactables in BazaarIsMyHaven."); BazaarAPI.AddPrinter("Quality white printer", (Func<SpawnCard>)(() => (SpawnCard)(object)SpawnCards.QualityDuplicator), (Func<int>)(() => NormalCost.Value), (Func<float>)(() => NormalWeight.Value), (Func<bool>)null); BazaarAPI.AddPrinter("Quality green printer", (Func<SpawnCard>)(() => (SpawnCard)(object)SpawnCards.QualityDuplicatorLarge), (Func<int>)(() => LargeCost.Value), (Func<float>)(() => LargeWeight.Value), (Func<bool>)null); BazaarAPI.AddPrinter("Quality red printer", (Func<SpawnCard>)(() => (SpawnCard)(object)SpawnCards.QualityDuplicatorMilitary), (Func<int>)(() => MilitaryCost.Value), (Func<float>)(() => MilitaryWeight.Value), (Func<bool>)null); BazaarAPI.AddPrinter("Quality boss printer", (Func<SpawnCard>)(() => (SpawnCard)(object)SpawnCards.QualityDuplicatorWild), (Func<int>)(() => WildCost.Value), (Func<float>)(() => WildWeight.Value), (Func<bool>)null); if (SScrapperEnabled.Value) { BazaarAPI.AddSection((BazaarBase)(object)new QualityScrapperSection()); } } } public class QualityScrapperSection : BazaarBase { private DirectorCard card; public override void Preload() { } public override void AddDirectorCards(List<DirectorCard> cards) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown card = new DirectorCard("Scrap Scrapper", (Func<int>)(() => BazaarHavenQualityAddon.SScrapperCost.Value), (Func<float>)(() => BazaarHavenQualityAddon.SScrapperWeight.Value), (Func<int>)(() => 1), (Func<bool>)null, true); cards.Add(card); } public override void SetupBazaar() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < card.Count; i++) { NetworkServer.Spawn(Object.Instantiate<GameObject>(NetworkedPrefabs.QualityScrapper, new Vector3(-93.714f, -25f, -42.43222f), Quaternion.identity)); } } }