Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph.

This commit is contained in:
Michael Lutz
2023-01-03 13:48:42 +01:00
parent 4d3da0cf14
commit aab580e0ac
9 changed files with 94 additions and 409 deletions

View File

@@ -1837,7 +1837,7 @@ struct StationViewWindow : public Window {
const LinkGraph *lg = LinkGraph::GetIfValid(ge->link_graph);
SetDParam(0, cs->name);
SetDParam(1, lg != nullptr ? lg->Monthly((*lg)[ge->node].Supply()) : 0);
SetDParam(1, lg != nullptr ? lg->Monthly((*lg)[ge->node].supply) : 0);
SetDParam(2, STR_CARGO_RATING_APPALLING + (ge->rating >> 5));
SetDParam(3, ToPercent8(ge->rating));
DrawString(tr.Indent(WidgetDimensions::scaled.hsep_indent, rtl), STR_STATION_VIEW_CARGO_SUPPLY_RATING);