omsi6.github.io
omsi6.github.io copied to clipboard
Analysing a core that provides no value breaks the heirloom calculator
Describe the bug I have a spire with no poison or condenser towers in it and this Common Core:
When I put this core into the heirloom calculator I just get:
And an error in the console:
Poking around in the console, it seems that the getModEfficiency
returns 1 for both these mods (since buying them doesn't change my spire's ability to kill enemies) and hence calculatePurchases
doesn't set next
to anything leading to the code that fills in the "Next upgrades to buy" to try to find the full name of the mod called "", which causes the error.
The code that writes out the next upgrades to buy block checks for hasUpgradeableMods()
before writing out the sections for the staff and shield, but not for the core. I think the fix is to just add a similar check for the core (possibly re-working this code so there's not 8 branches to worry about).
To Reproduce Steps to reproduce the behavior:
- Import the attached save into the heirlooms calculator.
Expected behavior I expected the calculator to show me recommended upgrades for the shield and staff (possibly not recommending any upgrade for the core, since they won't help me).
Screenshots If applicable, add screenshots to help explain your problem.
Savefile
https://pastebin.com/MyjC3LkV