redruin1 / factorio-draftsman

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

`Pump` rotation is not exported #88

Closed arpheno closed 1 year ago

arpheno commented 1 year ago
from draftsman.classes.blueprint import Blueprint
from draftsman.prototypes.pump import Pump

bp = Blueprint()
bp.entities.append(Pump(position=[0, 0], direction=4))
assert Blueprint(bp.to_string()).find_entities_filtered(name='pump')[0].direction == \
       bp.find_entities_filtered(name='pump')[0].direction
Traceback (most recent call last):
  File "/Users/swozny/Library/Application Support/JetBrains/PyCharm2022.2/scratches/scratch_11.py", line 5, in <module>
    assert Blueprint(bp.to_string()).find_entities_filtered(name='pump')[0].direction == bp.find_entities_filtered(name='pump')[0].direction
AssertionError