From 7d689bd6a387d8b86899708821e834b3234e534c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 27 May 2016 16:58:04 +0200 Subject: [PATCH] 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 --- info/power.t | 4 ---- src/lib/commands/powe.c | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/info/power.t b/info/power.t index d147f9f01..812609684 100644 --- a/info/power.t +++ b/info/power.t @@ -81,10 +81,6 @@ power factor += ((nation money / 100) + (petrol / 500) + (guns / 2.5) + (lcms / 10) + (hcms / 5)) power factor += ((number of sectors * (average sector effic / 100)) * 10) power factor = ((power factor) * (nation tech level / 500)) -power factor = ((power factor) * (research factor)) .FI .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" diff --git a/src/lib/commands/powe.c b/src/lib/commands/powe.c index 63b79c2fd..7b6e074ed 100644 --- a/src/lib/commands/powe.c +++ b/src/lib/commands/powe.c @@ -300,16 +300,6 @@ gen_power(struct powstr *powbuf, int save) 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); if (!save) return; -- 2.43.0