Ship icons for ship groups

This commit is contained in:
Khopa 2020-06-14 17:31:45 +02:00
parent cd41bcf45c
commit 826935eb7d
6 changed files with 12 additions and 23 deletions

View File

@ -1,26 +1,8 @@
from game.utils import nm_to_meter, feet_to_meter
MAX_NUMBER_OF_INTERCEPTION_GROUP = 3
MISSION_DURATION = 120 # in minutes
CAP_EVERY_X_MINUTES = 20
CAS_EVERY_X_MINUTES = 30
SEAD_EVERY_X_MINUTES = 40
STRIKE_EVERY_X_MINUTES = 40
INGRESS_EGRESS_DISTANCE = nm_to_meter(45)
INGRESS_ALT = feet_to_meter(20000)
EGRESS_ALT = feet_to_meter(20000)
PATROL_ALT_RANGE = (feet_to_meter(15000), feet_to_meter(33000))
NAV_ALT = 9144
PATTERN_ALTITUDE = feet_to_meter(5000)
CAP_DEFAULT_ENGAGE_DISTANCE = nm_to_meter(40)
MODERN_DOCTRINE = {
"GENERATORS":{
"GENERATORS": {
"CAS": True,
"CAP": True,
"SEAD": True,
@ -110,4 +92,4 @@ WWII_DOCTRINE = {
"MAX_NUMBER_OF_INTERCEPTION_GROUP": 3,
}
}

View File

@ -74,6 +74,8 @@ def load_icons():
ICONS[category] = QPixmap("./resources/ui/ground_assets/" + category + ".png")
ICONS[category + "_blue"] = QPixmap("./resources/ui/ground_assets/" + category + "_blue.png")
ICONS["destroyed"] = QPixmap("./resources/ui/ground_assets/destroyed.png")
ICONS["ship"] = QPixmap("./resources/ui/ground_assets/ship.png")
ICONS["ship_blue"] = QPixmap("./resources/ui/ground_assets/ship_blue.png")
ICONS["Generator"] = QPixmap("./resources/ui/misc/generator.png")
ICONS["Missile"] = QPixmap("./resources/ui/misc/missile.png")

View File

@ -44,10 +44,15 @@ class QMapGroundObject(QGraphicsRectItem):
#super(QMapControlPoint, self).paint(painter, option, widget)
if self.parent.get_display_rule("go"):
painter.save()
cat = self.model.category
if cat == "aa" and self.model.sea_object:
cat = "ship"
if not self.model.is_dead and not self.cp.captured:
painter.drawPixmap(option.rect, CONST.ICONS[self.model.category])
painter.drawPixmap(option.rect, CONST.ICONS[cat])
elif not self.model.is_dead:
painter.drawPixmap(option.rect, CONST.ICONS[self.model.category + "_blue"])
painter.drawPixmap(option.rect, CONST.ICONS[cat + "_blue"])
else:
painter.drawPixmap(option.rect, CONST.ICONS["destroyed"])
painter.restore()

View File

@ -42,7 +42,7 @@ local unitPayloads = {
},
},
[3] = {
["name"] = "ANTISTRIKE",
["name"] = "ANTISHIP",
["pylons"] = {
},
["tasks"] = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B