diff options
Diffstat (limited to 'apworld/__init__.py')
| -rw-r--r-- | apworld/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
| diff --git a/apworld/__init__.py b/apworld/__init__.py index f5774c6..3d2f075 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py | |||
| @@ -77,7 +77,10 @@ class Lingo2World(World): | |||
| 77 | if self.options.shuffle_worldports: | 77 | if self.options.shuffle_worldports: |
| 78 | if hasattr(self.multiworld, "re_gen_passthrough") and "Lingo 2" in self.multiworld.re_gen_passthrough: | 78 | if hasattr(self.multiworld, "re_gen_passthrough") and "Lingo 2" in self.multiworld.re_gen_passthrough: |
| 79 | slot_value = self.multiworld.re_gen_passthrough["Lingo 2"]["port_pairings"] | 79 | slot_value = self.multiworld.re_gen_passthrough["Lingo 2"]["port_pairings"] |
| 80 | self.port_pairings = {int(fp): int(tp) for fp, tp in slot_value.items()} | 80 | self.port_pairings = { |
| 81 | self.static_logic.port_id_by_ap_id[int(fp)]: self.static_logic.port_id_by_ap_id[int(tp)] | ||
| 82 | for fp, tp in slot_value.items() | ||
| 83 | } | ||
| 81 | 84 | ||
| 82 | connect_ports_from_ut(self.port_pairings, self) | 85 | connect_ports_from_ut(self.port_pairings, self) |
| 83 | else: | 86 | else: |
| @@ -152,7 +155,11 @@ class Lingo2World(World): | |||
| 152 | } | 155 | } |
| 153 | 156 | ||
| 154 | if self.options.shuffle_worldports: | 157 | if self.options.shuffle_worldports: |
| 155 | slot_data["port_pairings"] = self.port_pairings | 158 | def get_port_ap_id(port_id): |
| 159 | return self.static_logic.objects.ports[port_id].ap_id | ||
| 160 | |||
| 161 | slot_data["port_pairings"] = {get_port_ap_id(from_id): get_port_ap_id(to_id) | ||
| 162 | for from_id, to_id in self.port_pairings.items()} | ||
| 156 | 163 | ||
| 157 | return slot_data | 164 | return slot_data |
| 158 | 165 | ||
