diff --git a/src/pathfinder/app.py b/src/pathfinder/app.py index 0a30638..6ce0e6d 100644 --- a/src/pathfinder/app.py +++ b/src/pathfinder/app.py @@ -186,8 +186,10 @@ def additional_gui_setup(self): line_edit_field.setCompleter(completer) # Table configuration - self.tableWidget_path.setColumnCount(4) - self.tableWidget_path.setHorizontalHeaderLabels(["System name", "Class", "Security", "Instructions"]) + self.tableWidget_path.setColumnCount(5) + self.tableWidget_path.setHorizontalHeaderLabels( + ["System name", "Class", "Security", "Instructions", "Additional information"] + ) self.tableWidget_path.horizontalHeader().setStretchLastSection(True) # Signals diff --git a/src/pathfinder/model/navigation.py b/src/pathfinder/model/navigation.py index c1d6fcb..2c39031 100644 --- a/src/pathfinder/model/navigation.py +++ b/src/pathfinder/model/navigation.py @@ -44,6 +44,30 @@ def _get_instructions(weight): return instructions + @staticmethod + def _get_additional_info(weight, weight_back): + info = "" + if weight and weight_back: + if weight_back[0] == SolarMap.WORMHOLE: + [wh_sig, wh_code, wh_size] = weight_back[1] + # Return signature + info += "Return sig: {}[{}]".format(wh_sig, wh_code) + + # Wormhole size + info += ", Size: " + if wh_size == 0: + info += "Small" + elif wh_size == 1: + info += "Medium" + elif wh_size == 2: + info += "Large" + elif wh_size == 3: + info += "X-large" + else: + info += "Unknown" + + return info + def route(self, source, destination, avoidance_list, size_restriction): source_id = self.eve_db.name2id(source) dest_id = self.eve_db.name2id(destination) @@ -64,13 +88,16 @@ def route(self, source, destination, avoidance_list, size_restriction): source = self.solar_map.get_system(x) dest = self.solar_map.get_system(path[idx + 1]) weight = source.get_weight(dest) + weight_back = dest.get_weight(source) else: weight = None + weight_back = None system_description = list(self.eve_db.system_desc[x]) system_description.append(Navigation._get_instructions(weight)) + system_description.append(Navigation._get_additional_info(weight, weight_back)) route.append(system_description) - # Build short format message (traveling between multiple consecutive gates will be denoted as '...') + # Build short format message (travelling between multiple consecutive gates will be denoted as '...') if not weight: # destination reached if prev_gate: