Added aircraft icons + fixed ww2 empty aircraft loadout not being loaded.

This commit is contained in:
Khopa
2020-06-20 13:44:11 +02:00
parent 5f1f4f8d81
commit 93bcd07c7f
6 changed files with 16 additions and 9 deletions

View File

@@ -40,11 +40,15 @@ class AircraftConflictGenerator:
did_load_loadout = False
unit_type = group.units[0].unit_type
print("SETUP GROUP : " + str(for_task) + " -- " + str(group.name))
if unit_type in db.PLANE_PAYLOAD_OVERRIDES:
override_loadout = db.PLANE_PAYLOAD_OVERRIDES[unit_type]
if type(override_loadout) == dict:
# Clear pylons
for p in group.units:
p.pylons.clear()
# Now load loadout
if for_task in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
payload_name = db.PLANE_PAYLOAD_OVERRIDES[unit_type][for_task]
group.load_loadout(payload_name)