Switch the diff format from "$module $quantity" to "$module x$quantity"

This commit is contained in:
2026-01-18 23:17:18 +01:00
parent 959467028c
commit 1063a1ab49

View File

@@ -211,7 +211,7 @@ class FitDiffFrame(wx.Frame):
count1 = fit1_slot_modules.get(module_type, 0)
count2 = fit2_slot_modules.get(module_type, 0)
if count2 > count1:
slot_diff_lines.append(f"{module_type} {count2 - count1}")
slot_diff_lines.append(f"{module_type} x{count2 - count1}")
if slot_diff_lines:
if diffLines:
@@ -227,7 +227,7 @@ class FitDiffFrame(wx.Frame):
count1 = fit1_drones.get(drone_type, 0)
count2 = fit2_drones.get(drone_type, 0)
if count2 > count1:
diffLines.append(f"{drone_type} {count2 - count1}")
diffLines.append(f"{drone_type} x{count2 - count1}")
# Get fighter counts
fit1_fighters = self.getFighterCounts(fit1)
@@ -238,7 +238,7 @@ class FitDiffFrame(wx.Frame):
count1 = fit1_fighters.get(fighter_type, 0)
count2 = fit2_fighters.get(fighter_type, 0)
if count2 > count1:
diffLines.append(f"{fighter_type} {count2 - count1}")
diffLines.append(f"{fighter_type} x{count2 - count1}")
# Get cargo counts
fit1_cargo = self.getCargoCounts(fit1)
@@ -249,21 +249,21 @@ class FitDiffFrame(wx.Frame):
count1 = fit1_cargo.get(cargo_type, 0)
count2 = fit2_cargo.get(cargo_type, 0)
if count2 > count1:
diffLines.append(f"{cargo_type} {count2 - count1}")
diffLines.append(f"{cargo_type} x{count2 - count1}")
# Get implants
fit1_implants = self.getImplantNames(fit1)
fit2_implants = self.getImplantNames(fit2)
for implant in sorted(fit2_implants - fit1_implants):
diffLines.append(f"{implant} 1")
diffLines.append(f"{implant} x1")
# Get boosters
fit1_boosters = self.getBoosterNames(fit1)
fit2_boosters = self.getBoosterNames(fit2)
for booster in sorted(fit2_boosters - fit1_boosters):
diffLines.append(f"{booster} 1")
diffLines.append(f"{booster} x1")
return diffLines