Loading save games repeatedly when coal upgrades are unlocked causes coal production to increase

Issue #15 resolved
Joel Teichroeb created an issue

Save a game with an upgrade such as geodesy unlocked. Load that save game multiple times. See coal output go up.

Comments (6)

  1. Seth Leblanc

    I believe pull request #48 should fix this. Haven't tested this specifically with that change, but it should reset building effects on load, which is what causes this problem.

  2. Joel Teichroeb reporter

    Now it resets the when reloading the page, but when importing a save game it will still increase the amount. Maybe we need to calculate the effects again after loading a save?

  3. Seth Leblanc

    My bad, didn't notice you mentioned geodesy specifically. Building effects are recalculated on load (importing and refreshing both call the same load function), which fixes the problem with e.g. mines continuing to produce coal even if the imported save doesn't have deep mining, but geodesy is handled differently. Geodesy and the drill upgrades are a mess atm, that calculation really needs to be centralized...

  4. Log in to comment