diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index accc1dca..541076c0 100644 --- a/ARKBreedingStats/Properties/AssemblyInfo.cs +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ // Revision // [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.50.1.1")] +[assembly: AssemblyFileVersion("0.50.1.2")] [assembly: NeutralResourcesLanguage("en")] diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index d9a51759..fe3c9d81 100644 --- a/ARKBreedingStats/_manifest.json +++ b/ARKBreedingStats/_manifest.json @@ -4,7 +4,7 @@ "ARK Smart Breeding": { "Id": "ARK Smart Breeding", "Category": "main", - "version": "0.50.1.1" + "version": "0.50.1.2" }, "SpeciesColorImages": { "Id": "SpeciesColorImages", diff --git a/ARKBreedingStats/library/CreatureInfoGraphic.cs b/ARKBreedingStats/library/CreatureInfoGraphic.cs index 5c17ad2e..b4051849 100644 --- a/ARKBreedingStats/library/CreatureInfoGraphic.cs +++ b/ARKBreedingStats/library/CreatureInfoGraphic.cs @@ -73,6 +73,7 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, using (var fontBrush = new SolidBrush(foreColor)) using (var borderAroundColors = new Pen(Utils.ForeColor(backColor), 1)) using (var stringFormatRight = new StringFormat { Alignment = StringAlignment.Far }) + using (var stringFormatRightUp = new StringFormat { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Far }) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; int currentYPosition = frameThickness * 3; @@ -288,7 +289,7 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, if (cc != null && displayMaxWildLevel) { g.DrawString($"{Loc.S("max wild level")}: {cc.maxWildLevel}", - fontSmall, fontBrush, width - 2 * frameThickness, height - fontSizeSmall - 4 * frameThickness, stringFormatRight); + fontSmall, fontBrush, width - 2 * frameThickness, height - frameThickness, stringFormatRightUp); } // frame diff --git a/ARKBreedingStats/species/CreatureColored.cs b/ARKBreedingStats/species/CreatureColored.cs index 3bb3aec4..0866015b 100644 --- a/ARKBreedingStats/species/CreatureColored.cs +++ b/ARKBreedingStats/species/CreatureColored.cs @@ -35,7 +35,7 @@ internal static string SpeciesImageName(string speciesName, bool replacePolar = /// Returns the image file path to the image with the according colorization. /// private static string ColoredCreatureCacheFilePath(string speciesName, byte[] colorIds, bool listView = false) - => Path.Combine(_imgCacheFolderPath, speciesName.Substring(0, Math.Min(speciesName.Length, 5)) + "_" + Convert.ToBase64String(colorIds.Select(ci => (byte)ci).Concat(Encoding.UTF8.GetBytes(speciesName)).ToArray()).Replace('/', '-') + (listView ? "_lv" : string.Empty) + Extension); + => Path.Combine(_imgCacheFolderPath, speciesName.Substring(0, Math.Min(speciesName.Length, 5)) + "_" + Convert.ToBase64String(colorIds.Select(ci => ci).Concat(Encoding.UTF8.GetBytes(speciesName)).ToArray()).Replace('/', '-') + (listView ? "_lv" : string.Empty) + Extension); /// /// Checks if an according species image exists in the cache folder, if not it tries to creates one. Returns false if there's no image. @@ -79,7 +79,7 @@ public static Bitmap GetColoredCreature(byte[] colorIds, Species species, bool[] if (string.IsNullOrEmpty(species?.name)) onlyColors = true; else - speciesName = SpeciesImageName(species?.name); + speciesName = SpeciesImageName(species.name); if (onlyColors || string.IsNullOrEmpty(ImageFolder)) return DrawPieChart(colorIds, enabledColorRegions, size, pieSize); @@ -461,7 +461,7 @@ private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, public static string RegionColorInfo(Species species, byte[] colorIds) { - if (species == null || colorIds == null) return null; + if (species?.colors == null || colorIds == null) return null; var creatureRegionColors = new StringBuilder("Colors:"); var cs = species.colors;