Merge branch 'master' into singularity

Conflicts:
	gui/builtinContextMenus/__init__.py
This commit is contained in:
blitzmann
2014-12-02 02:50:27 -05:00
2 changed files with 11 additions and 2 deletions

View File

@@ -62,12 +62,13 @@ class Miscellanea(ViewColumn):
return (("displayName", bool, False),
("showIcon", bool, True))
def __getData(self, stuff):
item = stuff.item
if item is None:
return "", None
itemGroup = item.group.name
itemCategory = item.category.name
if itemGroup in ("Energy Weapon", "Hybrid Weapon", "Projectile Weapon", "Combat Drone", "Fighter Drone"):
trackingSpeed = stuff.getModifiedItemAttr("trackingSpeed")
if not trackingSpeed:
@@ -75,6 +76,14 @@ class Miscellanea(ViewColumn):
text = "{0}".format(formatAmount(trackingSpeed, 3, 0, 3))
tooltip = "Tracking speed"
return text, tooltip
elif itemCategory == "Subsystem":
slots = ("hi", "med", "low")
info = []
for slot in slots:
n = int(stuff.getModifiedItemAttr("%sSlotModifier"%slot))
if n > 0:
info.append("{0}{1}".format(n, slot[0].upper()))
return "+ "+", ".join(info), "Slot Modifiers"
elif itemGroup == "Energy Destabilizer":
neutAmount = stuff.getModifiedItemAttr("energyDestabilizationAmount")
cycleTime = stuff.cycleTime

View File

@@ -86,7 +86,7 @@ if __name__ == "__main__":
git = False
if pyfaconfig.tag.lower() == "git":
try: # if there is a git repo associated with base, use master commit
with open(os.path.join(options.base,"..",".git","refs","heads","master"), 'r') as f:
with open(os.path.join(options.base,".git","refs","heads","master"), 'r') as f:
id = f.readline()[0:6]
git = True
except: # else, use custom ID