diff --git a/IconsBuilder/Icons/MonsterIcon.cs b/IconsBuilder/Icons/MonsterIcon.cs index 804a6e0..971a084 100644 --- a/IconsBuilder/Icons/MonsterIcon.cs +++ b/IconsBuilder/Icons/MonsterIcon.cs @@ -62,7 +62,7 @@ public void Update(Entity entity, IconsBuilderSettings settings, Dictionary(); - var mods = objectMagicProperties.Mods; + var mods = objectMagicProperties?.Mods; if (mods != null) { diff --git a/MapIconsSettings.cs b/MapIconsSettings.cs index 2348037..f4bab18 100644 --- a/MapIconsSettings.cs +++ b/MapIconsSettings.cs @@ -11,6 +11,7 @@ public class MapIconsSettings : ISettings public RangeNode ZForText { get; set; } = new RangeNode(-10, -50, 50); public ToggleNode DrawOnlyOnLargeMap { get; set; } = new ToggleNode(true); public ToggleNode DrawCachedEntities { get; set; } = new ToggleNode(true); + public ToggleNode DrawShrineNames { get; set; } = new ToggleNode(true); public ToggleNode DrawReplacementsForGameIconsWhenOutOfRange { get; set; } = new ToggleNode(true); public ToggleNode IgnoreFullscreenPanels { get; set; } = new ToggleNode(false); public ToggleNode IgnoreLargePanels { get; set; } = new ToggleNode(false); @@ -26,6 +27,7 @@ public class MapIconsSettings : ISettings { Content = [ + new TextNode("Metadata/Shrines/Shrine") ], EnableControls = true, ItemFactory = () => new TextNode(""), diff --git a/MinimapIcons.cs b/MinimapIcons.cs index 220b29f..d5b6c2f 100644 --- a/MinimapIcons.cs +++ b/MinimapIcons.cs @@ -268,17 +268,20 @@ public override void Render() if (!icon.Show()) continue; + var iconGridPos = icon.GridPosition(); + var position = _mapCenter + + DeltaInWorldToMinimapDelta(iconGridPos - playerPos, + (playerHeight + GameController.IngameState.Data.GetTerrainHeightAt(iconGridPos)) * PoeMapExtension.WorldToGridConversion); + + if (Settings.DrawShrineNames && icon.Entity.Type == EntityType.Shrine && !string.IsNullOrEmpty(icon.Entity.RenderName)) + Graphics.DrawText(icon.Entity.RenderName, position.Translate(0, Settings.ZForText), FontAlign.Center); + if (icon.HasIngameIcon && icon is not CustomIcon && (!Settings.DrawReplacementsForGameIconsWhenOutOfRange || icon.Entity.IsValid) && !icon.Entity.Path.Contains("Metadata/Terrain/Leagues/Delve/Objects/DelveWall")) continue; - var iconGridPos = icon.GridPosition(); - var position = _mapCenter + - DeltaInWorldToMinimapDelta(iconGridPos - playerPos, - (playerHeight + GameController.IngameState.Data.GetTerrainHeightAt(iconGridPos)) * PoeMapExtension.WorldToGridConversion); - var iconValueMainTexture = icon.MainTexture; var size = iconValueMainTexture.Size; var halfSize = size / 2f;