Skip to content

Save/Load snapshots to/from .json files and some bugfixes.

just-claudio requested to merge just-claudio/atc-pie:snapshot into master

I wanted to be able to save snapshots on local storage to be able to recall them after closing the program. Working on this I encountered the following bugs that I fixed:

  • recalling a snapshot would crash the application with a division by zero error (commit #90f79ae8)
  • recalling a snapshot would sometimes duplicate aircraft creating a "ghost" one, which couldn't be instructed and just stood frozen (commit #36d3d9af)

I've also made sure that recalling a situation would replace all the existing strips with new ones linked to the restored aircraft (commit #91321801).

Finally I've made two new buttons in the snapshot tab of the teacher console to save snapshots as json and to load them from the same files. Currently it doesn't save instructions and just restores aircraft with an empty list of instructions. I might look into that one day.

Thank you and cheers!

Edited by just-claudio

Merge request reports