Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Jul 18, 2022
2 parents bd3b68c + 7cfadd6 commit b1c222e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ARKBreedingStats/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

2 changes: 1 addition & 1 deletion ARKBreedingStats/_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion ARKBreedingStats/library/CreatureInfoGraphic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ARKBreedingStats/species/CreatureColored.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal static string SpeciesImageName(string speciesName, bool replacePolar =
/// Returns the image file path to the image with the according colorization.
/// </summary>
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);

/// <summary>
/// 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.
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b1c222e

Please sign in to comment.