(unit_view): New, create by expanding shp_view() to work for

land_unit as well.
(do_unit_move): Add view option for land units using unit_view().
Combine ship and land viewing using the unit_view().
(shp_view): Remove, not used any more, replaced by unit_view().
This commit is contained in:
Ron Koenderink 2007-01-27 02:04:27 +00:00
parent aee2bc78e2
commit 7434da679e
5 changed files with 28 additions and 29 deletions

View file

@ -735,29 +735,6 @@ shp_hit_mine(struct shpstr *sp, struct mchrstr *mcp)
return (int)m;
}
void
shp_view(struct emp_qelem *list)
{
struct sctstr sect;
struct emp_qelem *qp;
struct emp_qelem *next;
struct ulist *mlp;
for (qp = list->q_back; qp != list; qp = next) {
next = qp->q_back;
mlp = (struct ulist *)qp;
getsect(mlp->unit.ship.shp_x, mlp->unit.ship.shp_y, &sect);
if (((struct mchrstr *)mlp->chrp)->m_flags & M_FOOD)
mpr(mlp->unit.ship.shp_own, "[fert:%d] ", sect.sct_fertil);
if (((struct mchrstr *)mlp->chrp)->m_flags & M_OIL)
mpr(mlp->unit.ship.shp_own, "[oil:%d] ", sect.sct_oil);
mpr(mlp->unit.ship.shp_own, "%s @ %s %d%% %s\n",
prship(&mlp->unit.ship),
xyas(mlp->unit.ship.shp_x, mlp->unit.ship.shp_y, player->cnum),
sect.sct_effic, dchr[sect.sct_type].d_name);
}
}
int
shp_nav_one_sector(struct emp_qelem *list, int dir, natid actor,
int together)