Skip to content

Commit

Permalink
1.2.2 fixed a case where a belt direction could be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomansion committed Oct 24, 2022
1 parent 355da63 commit d1c9dad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions factorio_blueprint_analyser/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def to_char(self):
return colored("↓", color)
elif self.direction == 6:
return colored("←", color)
elif self.direction is None:
elif self.direction == 0 or self.direction is None:
return colored("↑", color)

return colored("?", color)
Expand All @@ -181,8 +181,11 @@ def get_tile_in_front_offset(self):
return [0, 1]
elif self.direction == 6:
return [-1, 0]
elif self.direction is None:
elif self.direction == 0 or self.direction is None:
return [0, -1]

utils.warning(f"Unknown direction {self.direction} for {self.name}")
return [0, 0]

def can_connect_to(self, entity):
if entity.data["type"] == "transport-belt":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='factorioBlueprintAnalyser',
version='1.2.1',
version='1.2.2',
description="A python library analyse Factorio Blueprints and find bottlenecks.",
url="https://github.com/tomansion/factorio_blueprint_analyser_app/",
author="Tom Mansion",
Expand Down
1 change: 1 addition & 0 deletions tests/blueprints/redCircuitFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0eJytndtu2zgQht9F11YhHiXmcl9jUSwcR5sKcGTDh2KLIu++VFI7USRK88m+CII2zj8azvxzIIfK7+xxe673h6Y9ZQ+/s2aza4/Zw9+/s2Pz3K633f+dfu3r7CFrTvVLtsra9Uv3r/XxWL88bpv2OX9Zb340bZ2r7HWVNe1T/V/2oF6/r7K6PTWnpn7H+/N7p8O6Pe53h1P+WG9PEW+/O8YP7dpOUvzFPHxzq+xX9lB8cxHuqTnUm/cf6z+Av/5pzy+P9aETspLjVnJcTXBLOa4huF6Oawmuk+M6gmvluJ7gGjluSXC1HLciuEqOGwhuAXhRAGCCSwgH1k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