[0.15.x] Crash on tech screen if all techs disabled
Posted: Mon Jul 17, 2017 8:34 pm
I'm writing a scenario that has a "tutorial" component to it. As part of this, I want to disable *all* technologies until they reach the point in the 'Now research some stuff' part of the tutorial, at which point I enable techs incrementally in order to limit confusion. In 0.14 this was possible, but porting it to 0.15, attempting to open the tech screen with all tech disabled causes a game crash.
Steps to reproduce:
* Open scenario which disables all techs.
* Open tech screen: Game crashes.
* Until you open tech screen, game seems to play properly.
* Open game & scenario again.
* Use cheat to enable at least one tech.
* Open tech screen: Behaves as expected.
* Rewrite scenario to disable all *but one* tech
* Game (including tech screen) operates normally.
If you don't want to support all techs to be disabled, I'd understand that decision, but it probably should be validated at startup time rather than crashing during play.
Steps to reproduce:
* Open scenario which disables all techs.
* Open tech screen: Game crashes.
* Until you open tech screen, game seems to play properly.
* Open game & scenario again.
* Use cheat to enable at least one tech.
* Open tech screen: Behaves as expected.
* Rewrite scenario to disable all *but one* tech
* Game (including tech screen) operates normally.
If you don't want to support all techs to be disabled, I'd understand that decision, but it probably should be validated at startup time rather than crashing during play.