From d06dc534eddb2882fcc2d3e9fda7639b44dac380 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 24 Jun 2006 09:22:04 +0000 Subject: [PATCH] (prod, prprod): Fix to show the designation that actually produces, not the designation as it is now. --- src/lib/commands/prod.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/commands/prod.c b/src/lib/commands/prod.c index 2a254a5fd..854268801 100644 --- a/src/lib/commands/prod.c +++ b/src/lib/commands/prod.c @@ -47,7 +47,7 @@ #include "optlist.h" #include "commands.h" -static void prprod(struct sctstr *, double, double, int, char, +static void prprod(coord, coord, int, double, double, int, char, double, double, double, char[], int[], int[], int); int @@ -207,7 +207,7 @@ prod(void) } if (enlisted < 0) enlisted = 0; - prprod(§, p_e, 1.0, work, + prprod(sect.sct_x, sect.sct_y, type, p_e, 1.0, work, ichr[I_MILIT].i_mnem, enlisted, maxmil, enlisted * 3, "c\0\0", &enlisted, &enlisted, nsect++); continue; @@ -301,7 +301,7 @@ prod(void) mnem = '.'; else mnem = 0; - prprod(§, p_e, prodeff, work, + prprod(sect.sct_x, sect.sct_y, type, p_e, prodeff, work, mnem, real, maxr, cost, cmnem, cuse, cmax, nsect++); } @@ -317,8 +317,8 @@ prod(void) return RET_OK; } -void -prprod(struct sctstr *sp, double p_e, double prodeff, int work, +static void +prprod(coord x, coord y, int type, double p_e, double prodeff, int work, char mnem, double make, double max, double cost, char cmnem[], int cuse[], int cmax[], int nsect) { @@ -329,8 +329,8 @@ prprod(struct sctstr *sp, double p_e, double prodeff, int work, pr(" sect des eff avail make p.e. cost use1 use2 use3 max1 max2 max3 max\n"); } - prxy("%4d,%-4d", sp->sct_x, sp->sct_y, player->cnum); - pr(" %c %3.0f%% %5d", dchr[sp->sct_type].d_mnem, p_e * 100.0, work); + prxy("%4d,%-4d", x, y, player->cnum); + pr(" %c %3.0f%% %5d", dchr[type].d_mnem, p_e * 100.0, work); if (mnem == '.') pr(" %5.2f", make); else -- 2.43.0