From 11ba62e1eb224ba501bd78eb79144ca1d923897a Mon Sep 17 00:00:00 2001 From: Corollax Date: Tue, 26 Oct 2010 08:49:38 -0500 Subject: [PATCH 1/2] Added support for maximum active drones. If I were the drinking type, I'd grab a vodka. --- eos | 2 +- gui/builtinStatsViews/resourcesViewFull.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/eos b/eos index dd3cadec0..4af51e067 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit dd3cadec0f0320c22bce42867f18b4a98c931f89 +Subproject commit 4af51e06767b2bccf633f5e7b3bf1aebe3f497be diff --git a/gui/builtinStatsViews/resourcesViewFull.py b/gui/builtinStatsViews/resourcesViewFull.py index 9fa8f005e..9e76472d5 100644 --- a/gui/builtinStatsViews/resourcesViewFull.py +++ b/gui/builtinStatsViews/resourcesViewFull.py @@ -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), From acb98f87d806d9f8a5c0ef0aa587539525012824 Mon Sep 17 00:00:00 2001 From: Corollax Date: Tue, 26 Oct 2010 08:57:27 -0500 Subject: [PATCH 2/2] Forgot to rename an icon file and broke the bitmap loadder. Oops! This'll fix it. =P --- icons/{droneCount_big.png => drones_big.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename icons/{droneCount_big.png => drones_big.png} (100%) diff --git a/icons/droneCount_big.png b/icons/drones_big.png similarity index 100% rename from icons/droneCount_big.png rename to icons/drones_big.png