Dyson Sphere Program blueprint tool, python bindings.
- Load and save blueprint files.
- Replace blueprint items and recipes (partial).
- Upgrade buildings.
- Print blueprint info.
import dspbp
from dspbp import DSPItem
data = open("my_blueprint.txt", "rb").read()
bp = dspbp.load(data)
replacement = {
DSPItem.IronOre: DSPItem.CopperOre,
DSPItem.IronIngot: DSPItem.CopperIngot,
}
bp.replace_item(replacement)
open("edited_blueprint.txt", "wb").write(dspbp.save(bp))
Blueprint class.
DSP item enum. Use dir(DSPItem)
to get a list of all item types.
DSP recipe enum. Use dir(DSPRecipe)
to get a list of all recipes.
Load a blueprint from a bytes
object.
Turn a blueprint into a bytes
object.
Icon text property. Use it to set blueprint text under the icons.
Get blueprint description.
Replace items in the blueprint. Any item with a key in r
gets replaced with a
corresponding value.
Supports belt labels, logistic station slots and item icons.
TODO: inserter filters, splitter filters, traffic monitors.
Replace recipes in the blueprint. Any recipe with a key in r
gets replaced
with a corresponding value.
Replace both items and recipes. Items get converted into a most basic recipe.
Upgrade and downgrade buildings.