ThizThizzyDizzy / nc-reactor-generator

A program to plan and generate reactors for Nuclearcraft (https://www.curseforge.com/minecraft/mc-mods/nuclearcraft-mod)
GNU General Public License v3.0
32 stars 6 forks source link

[SUGGESTION] Add import from png #76

Open joendter opened 2 years ago

joendter commented 2 years ago

I think it is technically possible to extract the whole reactor from the PNGs, generated by the planner. This would be quite convenient, since you would no longer have to use ncpf for a quick data transfer and you would still have a nice PNG. I could imagine 2 implementations:

  1. Convert the ncpf file into pixels and put it at the bottom of the PNG or somewhere where nobody sees it. This would probably be easier to implement but also not as "nice".
  2. Extract the reactor from the human readable part of the PNG. Since all layers are shown and the material list also shows what is intended to be what this could be possible. Custom configurations such as AAPN could also be written on the PNG. Non default custom configs wouldn't really easily work with this implementation, but it could be compatible with older PNGs and would be the cooler solution in my opinion. PS: For non default custom configurations in the second implementation one could also still use extra pixels to convey the information
ThizThizzyDizzy commented 2 years ago

I've been planning to do this for a while; here's another important point:

As for implementation, I would use a combination of the above two; parsing the image itself for multiblock data, while using some hidden pixels to read metadata, such as author, configurations, etc.

joendter commented 2 years ago

but why would one want an option to disable importing? i mean yes intellectual property, but if you have the PNG you can always just manually rebuild it.

ThizThizzyDizzy commented 2 years ago

There are many reasons; for example, to prevent easy copy/improve for build challenges