mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
MAde it possible to setup liveries in faction files.
This commit is contained in:
@@ -714,6 +714,17 @@ class AircraftConflictGenerator:
|
||||
for unit_instance in group.units:
|
||||
unit_instance.livery_id = db.PLANE_LIVERY_OVERRIDES[unit_type]
|
||||
|
||||
# Override livery by faction file data
|
||||
if flight.from_cp.captured:
|
||||
faction = self.game.player_faction
|
||||
else:
|
||||
faction = self.game.enemy_faction
|
||||
|
||||
if unit_type in faction.liveries_overrides:
|
||||
livery = random.choice(faction.liveries_overrides[unit_type])
|
||||
for unit_instance in group.units:
|
||||
unit_instance.livery_id = livery
|
||||
|
||||
for idx in range(0, min(len(group.units), flight.client_count)):
|
||||
unit = group.units[idx]
|
||||
if self.use_client:
|
||||
|
||||
Reference in New Issue
Block a user