Added support for maximum active drones.

If I were the drinking type, I'd grab a vodka.
This commit is contained in:
Corollax
2010-10-26 08:49:38 -05:00
parent 6404d3252b
commit 11ba62e1eb
2 changed files with 9 additions and 8 deletions

2
eos

Submodule eos updated: dd3cadec0f...4af51e0676

View File

@@ -58,8 +58,8 @@ class ResourcesViewFull(StatsView):
base.Add(sizer, 0, wx.ALIGN_CENTER)
#Turrets & launcher hardslots display
tooltipText = {"turret":"Turret hardpoints", "launcher":"Launcher hardpoints", "calibration":"Calibration"}
for type in ("turret", "launcher", "calibration"):
tooltipText = {"turret":"Turret hardpoints", "launcher":"Launcher hardpoints", "drones":"Drones active", "calibration":"Calibration"}
for type in ("turret", "launcher", "drones", "calibration"):
bitmap = bitmapLoader.getStaticBitmap("%s_big" % type, parent, "icons")
tooltip = wx.ToolTip(tooltipText[type])
bitmap.SetToolTip(tooltip)
@@ -68,19 +68,18 @@ class ResourcesViewFull(StatsView):
sizer.Add(bitmap, 0, wx.ALIGN_CENTER)
sizer.Add(box, 0, wx.ALIGN_CENTER_VERTICAL)
suffix = "Points" if type == "calibration" else "Hardpoints"
suffix = {'turret':'Hardpoints', 'launcher':'Hardpoints', 'drones':'Active', 'calibration':'Points'}
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type.capitalize(), suffix.capitalize()), lbl)
setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type.capitalize(), suffix[type].capitalize()), lbl)
box.Add(lbl, 0, wx.ALIGN_LEFT)
box.Add(wx.StaticText(parent, wx.ID_ANY, "/"), 0, wx.ALIGN_LEFT)
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sTotal%s%s" % (panel.capitalize(), type.capitalize(), suffix.capitalize()), lbl)
setattr(self, "label%sTotal%s%s" % (panel.capitalize(), type.capitalize(), suffix[type].capitalize()), lbl)
box.Add(lbl, 0, wx.ALIGN_LEFT)
st = wx.VERTICAL
base.Add(wx.StaticLine(parent, wx.ID_ANY, style=st), 0, wx.EXPAND | wx.LEFT, 3 if panel == "full" else 0)
base.Add(wx.StaticLine(parent, wx.ID_ANY, style=wx.VERTICAL), 0, wx.EXPAND | wx.LEFT, 3 if panel == "full" else 0)
#PG, Cpu & drone stuff
tooltipText = {"cpu":"CPU", "pg":"PowerGrid", "droneBay":"Drone bay", "droneBandwidth":"Drone bandwidth"}
@@ -136,6 +135,8 @@ class ResourcesViewFull(StatsView):
("label%sTotalTurretHardpoints", lambda: fit.ship.getModifiedItemAttr('turretSlotsLeft'), 0, 0, 0),
("label%sUsedLauncherHardpoints", lambda: fit.getHardpointsUsed(Hardpoint.MISSILE), 0, 0, 0),
("label%sTotalLauncherHardpoints", lambda: fit.ship.getModifiedItemAttr('launcherSlotsLeft'), 0, 0, 0),
("label%sUsedDronesActive", lambda: fit.usedDronesActive, 0, 0, 0),
("label%sTotalDronesActive", lambda: fit.ship.totalDronesActive, 0, 0, 0),
("label%sUsedCalibrationPoints", lambda: fit.calibrationUsed, 0, 0, 0),
("label%sTotalCalibrationPoints", lambda: fit.ship.getModifiedItemAttr('upgradeCapacity'), 0, 0, 0),
("label%sUsedPg", lambda: fit.pgUsed, 4, 0, 9),