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

Incorrect warning #47

Closed flameSla closed 2 years ago

flameSla commented 2 years ago
Warning (from warnings module):
  File "Y:\Python-Sources\construction_train.py", line 22
    blueprint.entities.append("locomotive", position=[7 * train_car_position, train_number*4], orientation=0.75)
OverlappingObjectsWarning: Added object 'locomotive' (Locomotive) at {'x': 0.0, 'y': 4.0} intersects 'locomotive' (Locomotive) at {'x': 0.0, 'y': 0.0}

Warning (from warnings module):
  File "Y:\Python-Sources\construction_train.py", line 22
    blueprint.entities.append("locomotive", position=[7 * train_car_position, train_number*4], orientation=0.75)
OverlappingObjectsWarning: Added object 'locomotive' (Locomotive) at {'x': 7.0, 'y': 4.0} intersects 'locomotive' (Locomotive) at {'x': 7.0, 'y': 0.0}

Warning (from warnings module):
  File "Y:\Python-Sources\construction_train.py", line 22
    blueprint.entities.append("locomotive", position=[7 * train_car_position, train_number*4], orientation=0.75)
OverlappingObjectsWarning: Added object 'locomotive' (Locomotive) at {'x': 14.0, 'y': 4.0} intersects 'locomotive' (Locomotive) at {'x': 14.0, 'y': 0.0}

{'x': 0.0, 'y': 4.0} {'x': 0.0, 'y': 0.0} - the trains are on adjacent tracks

redruin1 commented 2 years ago

This will be fixed in the next version. This should also be much more accurate now, due to using Rectangle instead of AABB.