# HG changeset patch # User Jason Maltzen # Date 2021-09-10 00:00:11 # Node ID 57e33102e42b9a8d1487111ad2bfbf608104c5a7 # Parent a930076422652e083c5d7ddac36137ba772e3562 During recipe generation, don't allow min concentration to go be set below 10 or max reagents below 1 diff --git a/Models/RecipeSearchNode.cs b/Models/RecipeSearchNode.cs --- a/Models/RecipeSearchNode.cs +++ b/Models/RecipeSearchNode.cs @@ -13,7 +13,16 @@ namespace DesertPaintCodex.Models private int _nextReagentPos; public int ReagentCount => _nextReagentPos; - public uint MinConcentration { get; set; } = 10; + private uint _minConcentration = 10; + public uint MinConcentration + { + get => _minConcentration; + set + { + if (value < 10) value = 10; + _minConcentration = value; + } + } private readonly bool[] _reagentInUse; private readonly List _costSortedReagents; @@ -37,6 +46,7 @@ namespace DesertPaintCodex.Models get => _maxReagents; set { + if (value < 1) value = 1; _maxReagents = value; CurrentWeights = new uint[_maxReagents]; }