vaendryl / Sunrider

source code of the visual novel 'Sunrider'
http://sunrider-vn.com/
41 stars 21 forks source link

loading an old save can lead to skirmish breaking #75

Closed vaendryl closed 9 years ago

vaendryl commented 9 years ago

Ender gave me a save file that when loaded causes even current code to crash when clicking one of the image buttons in the unit pools (skirmish). these image buttons are clearly set to return ['selection',ship] but BM.result seems to end up with None somehow.

the BM method skirmish_selection does get called though, which implies that the return isn't None at all. if it was then the dispatcher would never run the method. something must go wrong in between.

the most probable culprit is one of the default values of BM set at init not getting updated properly by reset_classes

EnderShadow commented 9 years ago

I fixed this and made the changes in these commits https://github.com/vaendryl/Sunrider/commit/7f1dbb99f5705e3ff7ba625adeb37bf79809d8d6 https://github.com/vaendryl/Sunrider/commit/4cdbc64b56aadd35ba9168747f063fb42d209c0a