pmotschmann / Evolve

An incremental game about evolving a civilization
Mozilla Public License 2.0
832 stars 355 forks source link

Slow/Hyper adding/removal affecting Calm #946

Open elias098 opened 1 year ago

elias098 commented 1 year ago

I am not completely sure if this is correct or not.

Before https://github.com/pmotschmann/Evolve/commit/4ea8757c13226246694bdfe7d369594c5f8a417c calling cleanAddTrait and cleanRemoveTrait on slow/hyper reloaded the page, but that got changed to restarting the web worker instead.

This change caused the addition and removal of slow/hyper to run the next code block in the switch statement, thus running the code for adding and removing calm.

Adding a break at the end of the slow/hyper code blocks should fix this issue.

yarukishi commented 9 months ago

This issue was fixed (for 1.3.10+) when https://github.com/pmotschmann/Evolve/commit/a3cc7b4469e433ddac674dec2d5cd31cd9e3aab7 (#961) was merged.