Electrynth / legion-hq-web

Updated front-end for Legion-HQ-2.0
https://legionhq.thefifthtrooper.com
MIT License
11 stars 8 forks source link

Contingencies fix #39

Closed jlueck6 closed 1 year ago

jlueck6 commented 1 year ago

Issue was that a decrement check was deleting contingencies. Unit upgrade mods create a new copy, change upgrades, then delete old copy. Removing the 'unit' copy before replacing it w updated one was removing contingencies. Remove Contingencies check there and let consolidate() handle it.

Leave a similar check inside Addunit for now because I can't quite nail down where a new list gets initialized. Ideally, list.contingencies would never be null and just change based on numContingencies.