mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Ground objects are always generated and destroyable, even when it's not the current mission objective.
Fix : SAM site destruction status is saved correctly. Added most SAM site to generator.
This commit is contained in:
@@ -13,7 +13,21 @@ class QMapGroundObject(QGraphicsRectItem):
|
||||
self.parent = parent
|
||||
self.setAcceptHoverEvents(True)
|
||||
self.setZValue(2)
|
||||
self.setToolTip(cp.name + "'s " + self.model.category)
|
||||
|
||||
if len(self.model.groups) > 0:
|
||||
units = {}
|
||||
for g in self.model.groups:
|
||||
for u in g.units:
|
||||
if u.type in units.keys():
|
||||
units[u.type] = units[u.type]+1
|
||||
else:
|
||||
units[u.type] = 1
|
||||
tooltip = ""
|
||||
for unit in units.keys():
|
||||
tooltip = tooltip + str(unit) + "x" + str(units[unit]) + "\n"
|
||||
self.setToolTip(tooltip + str(model.groups[0].id) + str(model.groups[0].name))
|
||||
else:
|
||||
self.setToolTip(cp.name + "'s " + self.model.category)
|
||||
|
||||
|
||||
def paint(self, painter, option, widget=None):
|
||||
|
||||
Reference in New Issue
Block a user