Merge faction sams and shorads into air_defenses.

Fixes https://github.com/Khopa/dcs_liberation/issues/473. Air defenses
for bases, strike locations, and fixed IADS will now all downgrade to
lower tier systems as needed. Strike locations will still be spawned as
an equally weighted random generator from either the medium or long
range groups, but will use a short range system if none are available to
the faction.

I've made the change in a way that leaves factions compatible, but will
follow up to clean up our built-in factions.
This commit is contained in:
Dan Albert
2020-11-27 17:42:59 -08:00
parent e8aa9839b0
commit bd60760f9d
4 changed files with 13 additions and 22 deletions

View File

@@ -71,9 +71,9 @@ class TestFactionLoader(unittest.TestCase):
self.assertIn(Infantry.Infantry_M4, faction.infantry_units)
self.assertIn(Infantry.Soldier_M249, faction.infantry_units)
self.assertIn("AvengerGenerator", faction.shorads)
self.assertIn("AvengerGenerator", faction.air_defenses)
self.assertIn("HawkGenerator", faction.sams)
self.assertIn("HawkGenerator", faction.air_defenses)
self.assertIn(CVN_74_John_C__Stennis, faction.aircraft_carrier)
self.assertIn(LHA_1_Tarawa, faction.helicopter_carrier)