gamma-delta / center-brain-archive

Recipe viewer for Dyson Sphere Program
MIT License
1 stars 1 forks source link

Using the data from another github #9

Closed mellester closed 3 years ago

mellester commented 3 years ago

Most of the work was done by the authors of https://github.com/factoriolab/factorio-lab/blob/master/src/data/dsp/data.json I created a typescript script that paresed this file into rust definitions.

TODO The in and output of hydrogen can be measured in floats for some recpies.

gamma-delta commented 3 years ago

Wow, thanks a lot! (I'm saying this stuff here instead of discord PMs so anyone can see it).

Can you explain more how it works, please? From what I gather, it uses Typescript to auto-generate the Rust file, which then someone manually pastes into generator.rs ?

mellester commented 3 years ago

TLDR: Regex, magic Ill add more explantions in code and here at a later day

gamma-delta commented 3 years ago

OK, I think I'm going to "deny" this PR because I don't really need the generator, but I will paste in all the recipes and merge that.

gamma-delta commented 3 years ago

Mhm, we aren't using the same recipe ID for many things... still this is quite helpful.

gamma-delta commented 3 years ago

OK, I've fixed it all up on my end! We now have every single recipe!

Some data was lost, namely handcrafting and what tech unlocks it, but still this is incredibly awesome! The site is now useable!

I'm going to close this PR but all your hard work is about to be pushed to production.