diff --git a/Quest Map/Configuration.cs b/Quest Map/Configuration.cs index 98fbb45..7516330 100644 --- a/Quest Map/Configuration.cs +++ b/Quest Map/Configuration.cs @@ -10,6 +10,7 @@ namespace QuestMap { public bool ShowSeasonal; public bool ShowArrowheads; public bool CondenseMsq; + public bool ShowRedundantArrows; public Visibility EmoteVis; public Visibility ItemVis; diff --git a/Quest Map/PluginUi.cs b/Quest Map/PluginUi.cs index 7151a7a..de4fd8d 100644 --- a/Quest Map/PluginUi.cs +++ b/Quest Map/PluginUi.cs @@ -225,6 +225,11 @@ namespace QuestMap { anyChanged = true; } + if (ImGui.MenuItem("Show redundant arrows", null, ref this.Plugin.Config.ShowRedundantArrows)) { + this._relayout = true; + anyChanged = true; + } + ImGui.EndMenu(); } diff --git a/Quest Map/Quests.cs b/Quest Map/Quests.cs index c2fd1cc..b80af9f 100644 --- a/Quest Map/Quests.cs +++ b/Quest Map/Quests.cs @@ -149,7 +149,20 @@ namespace QuestMap { g.Nodes.Add(graphNode); msaglNodes[node.Id] = graphNode; - foreach (var parent in node.Parents) { + IEnumerable> parents; + if (this.Plugin.Config.ShowRedundantArrows) { + parents = node.Parents; + } else { + // only add if no *other* parent also shares + parents = node.Parents + .Where(q => { + return !node.Parents + .Where(other => other != q) + .Any(other => other.Parents.Contains(q)); + }); + } + + foreach (var parent in parents) { links.Add((parent.Id, node.Id)); } }