power: Drop the RES_POP factor
If option RES_POP is enabled, the power factor is multiplied by a "research factor" of 1.0 + maxpop / 10000.0, where maxpop is the maximum population of a mine sector. Back when this code was written (Chainsaw 3), all sectors had the same population limit, so using a mine sector was as good as any. Since then, it has become configurable, and the stock game has both sector types with lower (mountains, plains) and with higher (cities) population limits. Space for people is worth considering for power, but multiplying total power by a fudge factor based on the most common sector type's maximum population is silly. Drop it. Adjusting each sector's value for maximum population would make more sense, with and without RES_POP. Perhaps later. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
c0ce2b9973
commit
7d689bd6a3
2 changed files with 0 additions and 14 deletions
|
@ -81,10 +81,6 @@ power factor += ((nation money / 100) + (petrol / 500) +
|
||||||
(guns / 2.5) + (lcms / 10) + (hcms / 5))
|
(guns / 2.5) + (lcms / 10) + (hcms / 5))
|
||||||
power factor += ((number of sectors * (average sector effic / 100)) * 10)
|
power factor += ((number of sectors * (average sector effic / 100)) * 10)
|
||||||
power factor = ((power factor) * (nation tech level / 500))
|
power factor = ((power factor) * (nation tech level / 500))
|
||||||
power factor = ((power factor) * (research factor))
|
|
||||||
.FI
|
.FI
|
||||||
.s1
|
.s1
|
||||||
The research factor is either 1, if RES_POP is not being used, or 1+(max
|
|
||||||
pop in a sector)/10000, if it is being used.
|
|
||||||
.s1
|
|
||||||
.SA "census, nation, Communication, Nations, Diplomacy"
|
.SA "census, nation, Communication, Nations, Diplomacy"
|
||||||
|
|
|
@ -300,16 +300,6 @@ gen_power(struct powstr *powbuf, int save)
|
||||||
f_ptr++;
|
f_ptr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 1; i < MAXNOC; i++) {
|
|
||||||
struct natstr *np;
|
|
||||||
int maxpop;
|
|
||||||
|
|
||||||
if (opt_RES_POP) {
|
|
||||||
np = getnatp(i);
|
|
||||||
maxpop = max_population(np->nat_level[NAT_RLEV], SCT_MINE, 0);
|
|
||||||
powbuf[i].p_power *= 1.0 + maxpop / 10000.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
qsort(&powbuf[1], MAXNOC - 1, sizeof(*powbuf), powcmp);
|
qsort(&powbuf[1], MAXNOC - 1, sizeof(*powbuf), powcmp);
|
||||||
if (!save)
|
if (!save)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue