Fix scrap and scuttle output when there's output about cargo

scra() and scut() printed their "scrapped in" / "scuttled in" message
in two parts.  Messages for scrapped / scuttled cargo were printed
between the parts.  Fix by printing in one go, after the cargo
messages.
This commit is contained in:
Markus Armbruster 2008-09-13 09:45:26 -04:00
parent 0103372471
commit 06dd3d80ac
2 changed files with 6 additions and 10 deletions

View file

@ -171,7 +171,6 @@ scra(void)
}
}
}
pr("%s", prship(&item.ship));
for (i = I_NONE + 1; i <= I_MAX; i++) {
sect.sct_item[i] += item.ship.shp_item[i];
}
@ -219,7 +218,6 @@ scra(void)
} else if (type == EF_LAND) {
eff = item.land.lnd_effic / 100.0;
lp = &lchr[(int)item.land.lnd_type];
pr("%s", prland(&item.land));
for (i = I_NONE + 1; i <= I_MAX; i++) {
sect.sct_item[i] += item.land.lnd_item[i];
}
@ -269,15 +267,15 @@ scra(void)
} else {
eff = item.land.lnd_effic / 100.0;
pp = &plchr[(int)item.plane.pln_type];
pr("%s", prplane(&item.plane));
sect.sct_item[I_LCM] += pp->pl_lcm * 2 / 3 * eff;
sect.sct_item[I_HCM] += pp->pl_hcm * 2 / 3 * eff;
sect.sct_item[I_MILIT] += pp->pl_crew;
item.plane.pln_effic = 0;
putplane(item.plane.pln_uid, &item.plane);
}
pr(" scrapped in %s\n",
xyas(sect.sct_x, sect.sct_y, player->cnum));
pr("%s scrapped in %s\n",
obj_nameof(&item.gen),
xyas(item.gen.x, item.gen.y, player->cnum));
for (i = I_NONE + 1; i <= I_MAX; i++) {
if (sect.sct_item[i] > ITEM_MAX)
sect.sct_item[i] = ITEM_MAX;

View file

@ -131,7 +131,6 @@ scut(void)
if (!scuttle_tradeship(&item.ship, 1))
continue;
}
pr("%s", prship(&item.ship));
scuttle_ship(&item.ship);
} else if (type == EF_LAND) {
if (item.land.lnd_ship >= 0) {
@ -139,15 +138,14 @@ scut(void)
prland(&item.land));
continue;
}
pr("%s", prland(&item.land));
scuttle_land(&item.land);
} else {
pr("%s", prplane(&item.plane));
item.plane.pln_effic = 0;
putplane(item.plane.pln_uid, &item.plane);
}
pr(" scuttled in %s\n",
xyas(item.ship.shp_x, item.ship.shp_y, player->cnum));
pr("%s scuttled in %s\n",
obj_nameof(&item.gen),
xyas(item.gen.x, item.gen.y, player->cnum));
}
return RET_OK;