diff --git a/Yafc/Workspace/ProductionTable/ProductionLinkSummaryScreen.cs b/Yafc/Workspace/ProductionTable/ProductionLinkSummaryScreen.cs index e82f940e..4eb1274e 100644 --- a/Yafc/Workspace/ProductionTable/ProductionLinkSummaryScreen.cs +++ b/Yafc/Workspace/ProductionTable/ProductionLinkSummaryScreen.cs @@ -77,7 +77,7 @@ private void ShowRelatedLinks(ImGui gui) { table.Add((r, localFlow)); } else if (localFlow < 0) { - table.Add((r, -localFlow)); + table.Add((r, localFlow)); } else { table.Add((r, 0)); @@ -87,7 +87,7 @@ private void ShowRelatedLinks(ImGui gui) { gui.BuildText("Related links: "); var color = 1; foreach (var relTable in related.Values) { - BuildFlow(gui, relTable, relTable.Sum(e => e.flow), false, color++); + BuildFlow(gui, relTable, relTable.Sum(e => Math.Abs(e.flow)), false, color++); } } if (unlinked.Any()) { @@ -172,7 +172,7 @@ void drawLinks(ImGui gui) { if (gui.isBuilding) { var lastRect = gui.lastRect; - lastRect.Width *= (flow / total); + lastRect.Width *= Math.Abs(flow / total); gui.DrawRectangle(lastRect, GetColor(c)); } }