| 34 | self.bitmap = BitmapLoader.getBitmap("damagePattern_small", "gui") |
| 35 | |
| 36 | def getText(self, stuff): |
| 37 | if isinstance(stuff, Fighter): |
| 38 | # this is an experiment, not sure I like it. But it saves us from duplicating code. |
| 39 | col = self.columns['Fighter Abilities'](self.fittingView, {}) |
| 40 | text = col.getText(stuff) |
| 41 | del col |
| 42 | return text |
| 43 | if getattr(stuff, "charge", None) is not None: |
| 44 | charges = stuff.numCharges |
| 45 | if charges > 0: |
| 46 | cycles = stuff.numShots |
| 47 | if cycles != 0 and charges != cycles: |
| 48 | return "%s (%d, %d cycles)" % (stuff.charge.name, charges, cycles) |
| 49 | else: |
| 50 | return "%s (%d)" % (stuff.charge.name, charges) |
| 51 | else: |
| 52 | return stuff.charge.name |
| 53 | return "" |
| 54 | |
| 55 | def getImageId(self, mod): |
| 56 | return -1 |