mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Clean up the category property of TGOs.
This really needs to be a proper type, but this is a start: create new categories for the types of TGOs that are missing. This removes some icon special cases.
This commit is contained in:
@@ -3,10 +3,9 @@ from typing import Dict
|
||||
|
||||
from PySide2.QtGui import QColor, QFont, QPixmap
|
||||
|
||||
from game.theater.theatergroundobject import CATEGORY_MAP
|
||||
from game.theater.theatergroundobject import NAME_BY_CATEGORY
|
||||
from .liberation_theme import get_theme_icons
|
||||
|
||||
|
||||
URLS: Dict[str, str] = {
|
||||
"Manual": "https://github.com/dcs-liberation/dcs_liberation/wiki",
|
||||
"Repository": "https://github.com/dcs-liberation/dcs_liberation",
|
||||
@@ -141,22 +140,14 @@ def load_icons():
|
||||
|
||||
ICONS["target"] = QPixmap("./resources/ui/ground_assets/target.png")
|
||||
ICONS["cleared"] = QPixmap("./resources/ui/ground_assets/cleared.png")
|
||||
for category in CATEGORY_MAP.keys():
|
||||
for category in NAME_BY_CATEGORY.keys():
|
||||
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["EWR"] = QPixmap("./resources/ui/ground_assets/ewr.png")
|
||||
ICONS["EWR_blue"] = QPixmap("./resources/ui/ground_assets/ewr_blue.png")
|
||||
ICONS["ship"] = QPixmap("./resources/ui/ground_assets/ship.png")
|
||||
ICONS["ship_blue"] = QPixmap("./resources/ui/ground_assets/ship_blue.png")
|
||||
ICONS["missile"] = QPixmap("./resources/ui/ground_assets/missile.png")
|
||||
ICONS["missile_blue"] = QPixmap("./resources/ui/ground_assets/missile_blue.png")
|
||||
ICONS["nothreat"] = QPixmap("./resources/ui/ground_assets/nothreat.png")
|
||||
ICONS["nothreat_blue"] = QPixmap("./resources/ui/ground_assets/nothreat_blue.png")
|
||||
ICONS["coastal"] = QPixmap("./resources/ui/ground_assets/coastal.png")
|
||||
ICONS["coastal_blue"] = QPixmap("./resources/ui/ground_assets/coastal_blue.png")
|
||||
|
||||
ICONS["Generator"] = QPixmap(
|
||||
"./resources/ui/misc/" + get_theme_icons() + "/generator.png"
|
||||
|
||||
@@ -84,12 +84,6 @@ class QMapGroundObject(QMapObject):
|
||||
painter.save()
|
||||
|
||||
cat = self.ground_object.category
|
||||
if cat == "aa" and self.ground_object.sea_object:
|
||||
cat = "ship"
|
||||
if isinstance(self.ground_object, MissileSiteGroundObject):
|
||||
cat = "missile"
|
||||
if isinstance(self.ground_object, CoastalSiteGroundObject):
|
||||
cat = "coastal"
|
||||
|
||||
rect = QRect(
|
||||
option.rect.x() + 2,
|
||||
|
||||
Reference in New Issue
Block a user