Let players stop/start units:
(genitem, lndstr, nukstr, plnstr, shpstr): New members off, lnd_off, nuk_off, pln_off, shp_off. (NSC_GENITEM): New selector off. (land, nuke, plan, shi): Display efficiency prefixed by `=' when off. (start, stop, player_coms): Rewrite, new syntax. Print only objects that actually change. (start_hdr, stop_hdr, start_stop_hdr): Consolidate. (item_u, start_stop, start_stop_sector, proff, start_stop_unit) (start_stop_unit_hdr, unit_type_name): New. (upd_land, upd_plane, planerepair, upd_ship): Obey and clear stoppage.
This commit is contained in:
parent
520446ef39
commit
eb1512d75f
22 changed files with 218 additions and 179 deletions
|
@ -102,8 +102,9 @@ upd_plane(struct plnstr *pp, int etus,
|
|||
int mult, cost, eff;
|
||||
|
||||
if (build == 1) {
|
||||
if (np->nat_money >= 0)
|
||||
if (!pp->pln_off && np->nat_money >= 0)
|
||||
planerepair(pp, np, bp, etus);
|
||||
pp->pln_off = 0;
|
||||
} else {
|
||||
mult = 1;
|
||||
if (np->nat_level[NAT_TLEV] < pp->pln_tech * 0.85)
|
||||
|
@ -151,6 +152,8 @@ planerepair(struct plnstr *pp, struct natstr *np, int *bp, int etus)
|
|||
if (pp->pln_effic >= 80)
|
||||
return;
|
||||
carrier = getshipp(pp->pln_ship);
|
||||
if (carrier->shp_off)
|
||||
return;
|
||||
if (CANT_HAPPEN(!carrier || carrier->shp_own != pp->pln_own))
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue