(upd_ship): Don't produce stuff when broke, to match sector behavior.
This commit is contained in:
parent
dc6168f782
commit
6a595c0bb7
1 changed files with 4 additions and 2 deletions
|
@ -156,7 +156,8 @@ upd_ship(struct shpstr *sp, int etus,
|
|||
sectp = getsectp(sp->shp_x, sp->shp_y);
|
||||
|
||||
/* produce oil */
|
||||
if ((mp->m_flags & M_OIL) && sectp->sct_type == SCT_WATER) {
|
||||
if (np->nat_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,
|
||||
sp->shp_item[I_CIVIL],
|
||||
|
@ -181,7 +182,8 @@ upd_ship(struct shpstr *sp, int etus,
|
|||
sp->shp_item[I_OIL] += oil_gained;
|
||||
}
|
||||
/* produce fish */
|
||||
if ((mp->m_flags & M_FOOD) && sectp->sct_type == SCT_WATER) {
|
||||
if (np->nat_money > 0
|
||||
&& (mp->m_flags & M_FOOD) && sectp->sct_type == SCT_WATER) {
|
||||
sp->shp_item[I_FOOD]
|
||||
+= roundavg(total_work(100, etus,
|
||||
sp->shp_item[I_CIVIL],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue