nyurik / fatul

Make Factorio blueprints easy to version in git, minimizing text changes.
MIT License
6 stars 1 forks source link

Sort Power-Pole Neighbors #3

Closed bcwhite-code closed 1 year ago

bcwhite-code commented 1 year ago

Saw this in a recent diff...

       {
         "name": "medium-electric-pole",
-        "neighbours": ["6,-3", "-7,0", "2,8"],
+        "neighbours": ["-7,0", "6,-3", "2,8"],
         "position": {"x": 53.5, "y": 157.5}
       },
nyurik commented 1 year ago

Are you certain this is not being used, e.g. for organizing the power lines? For example, if you have 3 or more power poles connected by red, green, and power cables, you want the red/green not to crisscross each other, and the ordering of this field might play a role (because i don't see any other way to store that). I did implement it in https://github.com/nyurik/fatul/pull/4 -- see if it works ok, and if so, I'll merge

bcwhite-code commented 1 year ago

It's just a list of outgoing connections from a pole so order shouldn't matter. In this case, I imported a blueprint, changed one thing, and exported it. The diff has nothing to do with my change.