(fuel, load, prod, max_population, shp_nav_one_sector,
nav_loadship, upd_buildeff): Identify BIG_CITY (IS_BIG_CITY) by using packing type of UPKG instead of opt_BIG_CITY and sector type of SCT_CAPITAL.
This commit is contained in:
parent
d581485d32
commit
a2798857cf
8 changed files with 36 additions and 40 deletions
|
@ -121,9 +121,8 @@ fuel(void)
|
|||
|
||||
if ((sect.sct_type != SCT_HARBR)
|
||||
&& (sect.sct_type != SCT_WATER)
|
||||
&& (sect.sct_type != SCT_BSPAN) && (!opt_BIG_CITY
|
||||
|| sect.sct_type !=
|
||||
SCT_CAPIT)) {
|
||||
&& (sect.sct_type != SCT_BSPAN)
|
||||
&& (!IS_BIG_CITY(sect.sct_type))) {
|
||||
pr("Sector %s is not a harbor, bridge span, or sea.\n",
|
||||
xyas(item.ship.shp_x, item.ship.shp_y,
|
||||
item.ship.shp_own));
|
||||
|
@ -134,7 +133,7 @@ fuel(void)
|
|||
|
||||
harbor = 0;
|
||||
if (sect.sct_type == SCT_HARBR
|
||||
|| (opt_BIG_CITY && sect.sct_type == SCT_CAPIT)) {
|
||||
|| IS_BIG_CITY(sect.sct_type)) {
|
||||
harbor = 1;
|
||||
oil_amt = sect.sct_item[I_OIL];
|
||||
pet_amt = sect.sct_item[I_PETROL];
|
||||
|
|
|
@ -138,7 +138,7 @@ load(void)
|
|||
continue;
|
||||
if (!player->owner &&
|
||||
sect.sct_type != SCT_HARBR &&
|
||||
(!opt_BIG_CITY || sect.sct_type != SCT_CAPIT))
|
||||
!IS_BIG_CITY(sect.sct_type))
|
||||
continue;
|
||||
if (!sect.sct_own)
|
||||
continue;
|
||||
|
@ -149,11 +149,13 @@ load(void)
|
|||
continue;
|
||||
}
|
||||
if (sect.sct_type != SCT_HARBR &&
|
||||
(!opt_BIG_CITY || sect.sct_type != SCT_CAPIT)) {
|
||||
!IS_BIG_CITY(sect.sct_type)) {
|
||||
if (noisy)
|
||||
pr("Sector %s is not a harbor%s.\n",
|
||||
pr("Sector %s is not a harbor%s%s.\n",
|
||||
xyas(ship.shp_x, ship.shp_y, player->cnum),
|
||||
opt_BIG_CITY ? " or a city" : "");
|
||||
IS_BIG_CITY(sect.sct_type) ? " or a " : "",
|
||||
IS_BIG_CITY(sect.sct_type) ?
|
||||
dchr[sect.sct_type].d_name : "");
|
||||
continue;
|
||||
}
|
||||
if (sect.sct_own != player->cnum && load_unload == UNLOAD
|
||||
|
|
|
@ -136,18 +136,16 @@ prod(void)
|
|||
type = sect.sct_newtype;
|
||||
eff = 0;
|
||||
}
|
||||
if (opt_BIG_CITY) {
|
||||
if (!eff && dchr[otype].d_pkg == UPKG &&
|
||||
dchr[type].d_pkg != UPKG) {
|
||||
natp = getnatp(sect.sct_own);
|
||||
maxpop = max_population(natp->nat_level[NAT_RLEV],
|
||||
type, eff);
|
||||
work = new_work(§,
|
||||
total_work(sect.sct_work, etu_per_update,
|
||||
civs, sect.sct_item[I_MILIT],
|
||||
uws, maxpop));
|
||||
bwork = min(work / 2, bwork);
|
||||
}
|
||||
if (!eff && IS_BIG_CITY(otype) &&
|
||||
!IS_BIG_CITY(type)) {
|
||||
natp = getnatp(sect.sct_own);
|
||||
maxpop = max_population(natp->nat_level[NAT_RLEV],
|
||||
type, eff);
|
||||
work = new_work(§,
|
||||
total_work(sect.sct_work, etu_per_update,
|
||||
civs, sect.sct_item[I_MILIT],
|
||||
uws, maxpop));
|
||||
bwork = min(work / 2, bwork);
|
||||
}
|
||||
twork = 100 - eff;
|
||||
if (twork > bwork) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue