redruin1 / factorio-draftsman

A complete, well-tested, and up-to-date module to manipulate Factorio blueprint strings. Compatible with mods.
MIT License
94 stars 17 forks source link

Blueprint book did not create Blueprint/BlueprintBook objects before adding to blueprints list #21

Closed elswindle closed 2 years ago

elswindle commented 2 years ago

This change iterates through the blueprints dictionary and creates a Blueprint or BlueprintBook for each entry and adds it to a list. The list is then used to initialize a BlueprintableList object for the BlueprintBook

redruin1 commented 2 years ago

Good catch. However, do you mind moving this to the __init__ constructor of BlueprintableList instead of BlueprintBook.setup? This way if any one else wants to use BlueprintableList in some other class they can get the same conversion functionality which (I think) would be useful.

elswindle commented 2 years ago

Done. It will now accept Blueprint and BlueprintBook objects as well.

redruin1 commented 2 years ago

Awesome. Merging now.