You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromdraftsman.blueprintableimportBlueprintfrompathlibimportPathprint("loading blueprint...")
target=Path("./demo.blueprint")
blueprint=Blueprint()
blueprint.load_from_string(target.read_text())
print("loaded blueprint!!")
print("sinking blueprint to test round trip safeness")
output=Path("./demo.round-trip.blueprint")
output.write_text(blueprint.to_string())
print("done!!")
output:
loading blueprint...
/home/orion/projects/factorio/blueprint_hacks/main.py:9: DraftsmanWarning: <class 'draftsman.prototypes.inserter.Inserter'> has no attribute 'drop_position'
blueprint.load_from_string(target.read_text())
/home/orion/projects/factorio/blueprint_hacks/main.py:9: DraftsmanWarning: <class 'draftsman.prototypes.inserter.Inserter'> has no attribute 'pickup_position'
blueprint.load_from_string(target.read_text())
loaded blueprint!!
sinking blueprint to test round trip safeness
done!!
When such blueprints are exported, the position fields are lost.
Thus, draftsman emits malformed blueprints that would require manual post-processing to fix.
Expected behavior
Draftsman should pass through any fields it isn't aware of, as they may belong to mods draftsman doesn't have specific support for.
Additional context
This issue relates to Bob's adjustable inserters and more generally any AngelBobs derived modpack.
Please also include the following:
factorio-draftsman = "^1.1.1"
$ python3 --version [14:43:09]
Python 3.10.12
The text was updated successfully, but these errors were encountered:
this applies to both inserters and filter inserters.
and the same issue exists for Furnace too
loading blueprint...
/home/orion/projects/factorio/blueprint_hacks/main.py:9: DraftsmanWarning: <class 'draftsman.prototypes.inserter.Inserter'> has no attribute 'drop_position'
blueprint.load_from_string(target.read_text())
/home/orion/projects/factorio/blueprint_hacks/main.py:9: DraftsmanWarning: <class 'draftsman.prototypes.inserter.Inserter'> has no attribute 'pickup_position'
blueprint.load_from_string(target.read_text())
loaded blueprint!!
sinking blueprint to test round trip safeness
done!!
Thanks for the report, I forgot about these attributes. I'll patch this into 2.0. You mention that Furnaces also have this issue; what attributes is Draftsman complaining about in that case?
Describe the bug
When loading a blueprint that has bob's adjustable inserters in it, draftsman emits warnings and drops the fields.
Current Behavior
Example blueprint string:
example reproducing python code:
output:
When such blueprints are exported, the position fields are lost.
Thus, draftsman emits malformed blueprints that would require manual post-processing to fix.
Expected behavior
Draftsman should pass through any fields it isn't aware of, as they may belong to mods draftsman doesn't have specific support for.
Additional context
This issue relates to Bob's adjustable inserters and more generally any AngelBobs derived modpack.
Please also include the following:
factorio-draftsman = "^1.1.1"
The text was updated successfully, but these errors were encountered: