var normal = 25 + item.Spec.Torpedo * Math.Sqrt(onslot);\r
airspec = "航空戦 " + (int)(normal * 0.8) + "/" + (int)(normal * 1.5);\r
}\r
+\r
equips.Add(new Record\r
{\r
- Equip = GenEquipString(item, onslot, max),\r
+ Equip = GenEquipString(item),\r
+ Spec = item.Spec.IsAircraft ? $"+{item.Alv} {onslot}/{max}" : "",\r
AircraftSpec = airspec,\r
Color = item.Spec.Color\r
});\r
if (s.SlotEx.Id > 0)\r
{\r
var item = s.SlotEx;\r
- equips.Add(new Record {Equip = GenEquipString(item, 0, 0), Color = item.Spec.Color});\r
+ equips.Add(new Record {Equip = GenEquipString(item), Color = item.Spec.Color});\r
}\r
if (drum != 0)\r
drumShips++;\r
});\r
list.AddRange(airCorps.Planes.Select(plane => new Record\r
{\r
- Equip =\r
- plane.State != 1\r
- ? plane.StateName\r
- : GenEquipString(plane.Slot, plane.Count, plane.MaxCount),\r
+ Equip = plane.State != 1 ? plane.StateName : GenEquipString(plane.Slot),\r
+ Spec = plane.State != 1 ? "" : $"+{plane.Slot.Alv} {plane.Count}/{plane.MaxCount}",\r
Color = plane.Slot.Spec.Color\r
}));\r
}\r
_table = list.ToArray();\r
}\r
\r
- private string GenEquipString(ItemStatus item, int onslot, int max)\r
+ private string GenEquipString(ItemStatus item)\r
{\r
var name = item.Spec.Name;\r
- var attr = (item.Alv == 0 ? "" : "+" + item.Alv) +\r
- (item.Level == 0 ? "" : "★" + item.Level) +\r
- (!item.Spec.IsAircraft ? "" : " " + onslot + "/" + max);\r
+ var attr = item.Level == 0 ? "" : "★" + item.Level;\r
var proposed = new Size(int.MaxValue, int.MaxValue);\r
- const int maxWidth = 180;\r
+ var maxWidth = item.Spec.IsAircraft ? 132 : 180;\r
var result = name + attr;\r
if (TextRenderer.MeasureText(result, Font, proposed).Width <= maxWidth)\r
return result;\r
- attr = " " + attr;\r
var truncated = "";\r
foreach (var ch in name)\r
{\r