From e5c352818d7edfdc5219e4c82f7d5b2083b2b72d Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 Jun 2007 11:58:59 +0000 Subject: (svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it. --- src/roadveh_gui.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/roadveh_gui.cpp') diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index a07203f0b..d97b20dbb 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -154,10 +154,10 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e) for (const Vehicle *u = v; u != NULL; u = u->next) { str = STR_8812_EMPTY; - if (u->cargo_count != 0) { + if (!u->cargo.Empty()) { SetDParam(0, u->cargo_type); - SetDParam(1, u->cargo_count); - SetDParam(2, u->cargo_source); + SetDParam(1, u->cargo.Count()); + SetDParam(2, u->cargo.Source()); str = STR_8813_FROM; } DrawString(34, 78 + y_offset, str, 0); @@ -172,17 +172,17 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e) DrawString(34, 67 + y_offset, STR_9012_CAPACITY, 0); str = STR_8812_EMPTY; - if (v->cargo_count != 0) { + if (!v->cargo.Empty()) { SetDParam(0, v->cargo_type); - SetDParam(1, v->cargo_count); - SetDParam(2, v->cargo_source); + SetDParam(1, v->cargo.Count()); + SetDParam(2, v->cargo.Source()); str = STR_8813_FROM; } DrawString(34, 78 + y_offset, str, 0); } /* Draw Transfer credits text */ - SetDParam(0, v->cargo_feeder_share); + SetDParam(0, v->cargo.FeederShare()); DrawString(34, 90 + y_offset, STR_FEEDER_CARGO_VALUE, 0); /* Draw service interval text */ -- cgit v1.2.3-54-g00ecf