sanity check for OwSL, they need at least 1 element

This commit is contained in:
haven1433
2022-11-15 23:18:36 -06:00
parent a580174783
commit c7cbb65c87

View File

@@ -133,6 +133,8 @@ namespace HavenSoft.HexManiac.Core.Models.Runs {
if (ElementCount == MaxOverworldSprites) break; // overworld sprite lists can only have so many elements
}
ElementCount = Math.Max(ElementCount, 1);
Length = Math.Max(ElementLength, Length);
SpriteFormat = new SpriteFormat(4, tileWidth, tileHeight, hint);
ElementNames = ElementCount.Range().Select(i => string.Empty).ToList();
}