diff --git a/StardewArchipelago/Locations/CodeInjections/Vanilla/Relationship/PregnancyInjections.cs b/StardewArchipelago/Locations/CodeInjections/Vanilla/Relationship/PregnancyInjections.cs index 97f7d0d13..d357552f8 100644 --- a/StardewArchipelago/Locations/CodeInjections/Vanilla/Relationship/PregnancyInjections.cs +++ b/StardewArchipelago/Locations/CodeInjections/Vanilla/Relationship/PregnancyInjections.cs @@ -186,7 +186,7 @@ public static bool TickUpdate_BirthingEvent_Prefix(BirthingEvent __instance, Gam var playerName = Lexicon.capitalize(Game1.player.Name); var spouseName = Game1.player.spouse; var pronoun = "it"; - var scoutedItemClassification = $"{scoutedItem.Classification.ToLower()} item"; + var scoutedItemClassification = $"{scoutedItem.GetClassificationString()} item"; var multiplayerField = _helper.Reflection.GetField(typeof(Game1), "multiplayer"); var multiplayer = multiplayerField.GetValue(); diff --git a/StardewArchipelago/Locations/InGameLocations/ObtainableArchipelagoLocation.cs b/StardewArchipelago/Locations/InGameLocations/ObtainableArchipelagoLocation.cs index e61fcbabb..fe2a71fa4 100644 --- a/StardewArchipelago/Locations/InGameLocations/ObtainableArchipelagoLocation.cs +++ b/StardewArchipelago/Locations/InGameLocations/ObtainableArchipelagoLocation.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Archipelago.MultiClient.Net.Enums; using Archipelago.MultiClient.Net.Models; using KaitoKid.ArchipelagoUtilities.Net; using KaitoKid.ArchipelagoUtilities.Net.Client; @@ -83,13 +84,38 @@ public ObtainableArchipelagoLocation(string locationDisplayName, string location _locationChecker = locationChecker; var isHinted = myActiveHints.Any(hint => archipelago.GetLocationName(hint.LocationId).Equals(locationName, StringComparison.OrdinalIgnoreCase)); - var desiredTextureName = isHinted ? ArchipelagoTextures.PLEADING : ArchipelagoTextures.COLOR; + var scoutedLocation = archipelago.ScoutSingleLocation(LocationName); + + var desiredTextureName = GetCorrectTexture(scoutedLocation, isHinted); _archipelagoTexture = ArchipelagoTextures.GetArchipelagoLogo(logger, modHelper, 48, desiredTextureName); - var scoutedLocation = archipelago.ScoutSingleLocation(LocationName); _description = scoutedLocation == null ? ScoutedLocation.GenericItemName() : scoutedLocation.ToString(); } + private static string GetCorrectTexture(ScoutedLocation scoutedLocation, bool isHinted) + { + if (isHinted) + { + return ArchipelagoTextures.PLEADING; + } + + if (scoutedLocation.Classification.HasFlag(ItemFlags.Advancement)) + { + return ArchipelagoTextures.PROGRESSION; + } + + if (scoutedLocation.Classification.HasFlag(ItemFlags.NeverExclude)) + { + return ArchipelagoTextures.COLOR; + } + + if (scoutedLocation.Classification.HasFlag(ItemFlags.Trap)) + { + return ArchipelagoTextures.RED; + } + + return ArchipelagoTextures.BLACK; + } public override void drawInMenu(SpriteBatch spriteBatch, Vector2 location, float scaleSize, float transparency, float layerDepth, StackDrawType drawStackNumber, Color color, bool drawShadow) diff --git a/StardewArchipelago/StardewArchipelago.csproj b/StardewArchipelago/StardewArchipelago.csproj index 2bd5d8141..f337e450c 100644 --- a/StardewArchipelago/StardewArchipelago.csproj +++ b/StardewArchipelago/StardewArchipelago.csproj @@ -18,7 +18,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/StardewArchipelago/manifest.json b/StardewArchipelago/manifest.json index cb62126cf..d18fb0f13 100644 --- a/StardewArchipelago/manifest.json +++ b/StardewArchipelago/manifest.json @@ -1,7 +1,7 @@ { "Name": "StardewArchipelago", "Author": "Kaito Kid", - "Version": "6.5.0", + "Version": "6.5.1", "Description": "Stardew Valley Randomizer for Archipelago", "UniqueID": "KaitoKid.StardewArchipelago", "EntryDll": "StardewArchipelago.dll",