teoxoy / factorio-blueprint-editor

A feature-rich Factorio Blueprint Editor
https://fbe.teoxoy.com
MIT License
306 stars 62 forks source link

[BUG] Blueprint with no icon in the first spots not exported correctly #224

Closed WerFra closed 3 years ago

WerFra commented 4 years ago

After editing a blueprint with no icon in one of the first spots can no longer be imported back into the game.

Steps to reproduce the behavior:

  1. Create blueprint in game that has an icon in the last spot
  2. Open blueprint in edito
  3. Export from editor
  4. Game fails to import blueprint Value must be a dictionary in property tree at ROOT.blueprint.icons[0]

Screenshots image

Looking at the blueprint after editing on Factorio Blueprint Tools it looks like there are some nil values in the empty icon slots.

Blueprint String before editing 0eNpNjl0KgzAQhO8yzynUqkmbq5RS/Fnsgq6SxFKR3L1GofRxduebmRV1P9PkWALsCm5G8bD3FZ47qfp0C8tEsOBAAxSkGpJyFfeICiwtfWCL+FAgCRyYDn4Xy1PmoSYHm/1IHza2e4XTHqEwjX6jRklVW5LOjcICeyp1vuW37Kg53pfUsa+wf6MV3uT8YbhmhSluRpvsrEsd4xc7+UgS
Blueprint String after editing 0eJxNjs0KwjAQhN9lzhFaaxVz9DVEpD9LXUi3JUnFEvruJi1ULwPDznw7AbWZaLQsHjqAm0Ec9F0mY9RPAhx3UpkU8fNI0GBPPRSk6pOzFRssCiwtfaBPy0OBxLNnSriwmfkpU1+Thc73pvOx2738YUUojIOLrUHSq0jKFOaoEd2ypWa7HBN+HaD/5iu8ybo1cCmyvCzOeZlfFUxVU1yO255cli/pJlJ/