You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Desc.:
A player starts a game with smooth_economy ON.
Connects a local coal mine to a power station.
Coal mine through the years increases to 1200 tonnes per month (production_rate = 150).
This same player then, out of curiosity, changes economy from smooth to default (during the game progressing).
Little does he know that with his flip of the economy change switch to default, default (starting) prod_level (=0x10) has been assigned to "his" 1200t coal mine.
Upon first production change (let's say it's a decrease) of "his" connected coal mine, he is appalled to find out that production has decreased to 64t per month (prod_rate of 8 and prod_level of 0x8).
There is consistency the other way around (if one switches from default to smooth_econ - production rates get changed from their current values).
So in the event of smooth -> default switch, every prod_rate[0] and [1] should be checked and prod_level set according to the highest of the two following these rules:
if (prod_rate >= indspec->prod_rate * 8)
prod_level = 0x80;
if (prod_rate >= indspec->prod_rate * 4 && prod_rate < indspec->prod_rate * 8)
prod_level = 0x40;
if (prod_rate >= indspec->prod_rate * 2 && prod_rate < indspec->prod_rate * 4)
prod_level = 0x20;
if (prod_rate >= indspec->prod_rate * 1 && prod_rate < indspec->prod_rate * 2)
prod_level = 0x10;
if (prod_rate >= indspec->prod_rate / 2 && prod_rate < indspec->prod_rate * 1)
prod_level = 0x8;
if (prod_rate >= indspec->prod_rate / 4 && prod_rate < indspec->prod_rate / 2)
prod_level = 0x4;
To not instantly close eventual less than (indspec->prod_rate / 4) industries such prod_rate could be upgraded to indspec->prod_rate / 4. :-)
This should add consistency although I can't imaginge anyone wanting to go from smooth_economy to default other than out of curiosity. :-)
SirkoZ opened the ticket and wrote:
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/3164
The text was updated successfully, but these errors were encountered: