update: Don't let stopped ships produce

Ships fish and drill for oil even when stopped.  Fix that.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-06-21 21:59:30 +02:00
parent f5c9e232e8
commit da14a03231
4 changed files with 13 additions and 15 deletions

View file

@ -126,7 +126,7 @@ upd_ship(struct shpstr *sp, int etus, struct bp *bp, int build)
sectp = getsectp(sp->shp_x, sp->shp_y);
/* produce oil */
if (budget->money >= 0
if (!sp->shp_off && budget->money >= 0
&& (mp->m_flags & M_OIL) && sectp->sct_type == SCT_WATER) {
product = &pchr[dchr[SCT_OIL].d_prd];
oil_gained = roundavg(total_work(100, etus,
@ -152,7 +152,7 @@ upd_ship(struct shpstr *sp, int etus, struct bp *bp, int build)
sp->shp_item[I_OIL] += oil_gained;
}
/* produce fish */
if (budget->money >= 0
if (!sp->shp_off && budget->money >= 0
&& (mp->m_flags & M_FOOD) && sectp->sct_type == SCT_WATER) {
sp->shp_item[I_FOOD]
+= roundavg(total_work(100, etus,