diff --git a/Patches/KeepOfferWindowOpenPatches.cs b/Patches/KeepOfferWindowOpenPatches.cs index ab1a9e1..80b081e 100644 --- a/Patches/KeepOfferWindowOpenPatches.cs +++ b/Patches/KeepOfferWindowOpenPatches.cs @@ -32,7 +32,7 @@ namespace UIFixes { // Close the window if you're gonna hit max offers var ragfair = __instance.R().Ragfair; - if (ragfair.MyOffersCount + 1 < ragfair.GetMaxOffersCount(ragfair.MyRating)) + if (Settings.KeepAddOfferOpenIgnoreMaxOffers.Value || ragfair.MyOffersCount + 1 < ragfair.GetMaxOffersCount(ragfair.MyRating)) { BlockClose = true; } diff --git a/Settings.cs b/Settings.cs index 6f4ac03..13bc03b 100644 --- a/Settings.cs +++ b/Settings.cs @@ -63,6 +63,7 @@ namespace UIFixes // Advanced public static ConfigEntry StyleItemPanel { get; set; } + public static ConfigEntry KeepAddOfferOpenIgnoreMaxOffers { get; set; } public static void Init(ConfigFile config) { @@ -264,6 +265,15 @@ namespace UIFixes null, new ConfigurationManagerAttributes { IsAdvanced = true }))); + configEntries.Add(KeepAddOfferOpenIgnoreMaxOffers = config.Bind( + AdvancedSection, + "Keep Add Offer Window Open: Ignore Max Offers", + false, + new ConfigDescription( + "Specifically for the Keep Add Offers Window Open, this setting will keep the window open even if you're at max offers.", + null, + new ConfigurationManagerAttributes { IsAdvanced = true }))); + RecalcOrder(configEntries); } private static void RecalcOrder(List configEntries)