mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Decoupling and generalization of templates
Improvement for factions and templates which will allow decoupling of the templates from the actual units - Implement UnitGroup class which matches unit_types and possible templates as the needed abstraction layer for decoupling. - Refactor UnitType, Add ShipUnitType and all ships we currently use - Remove serialized template.json and migrated to multiple yaml templates (one for each template) and multiple .miz - Reorganized a lot of templates and started with generalization of many types (AAA, Flak, SHORAD, Navy) - Fixed a lot of bugs from the previous reworks (group name generation, strike targets...) - Reorganized the faction file completly. removed redundant lists, added presets for complex groups / families of units like sams - Reworked the building template handling. Some templates are unused like "village" - Reworked how groups from templates can be merged again for the dcs group creation (e.g. the skynet plugin requires them to be in the same group) - Allow to define alternative tasks
This commit is contained in:
@@ -52,18 +52,9 @@
|
||||
"sams": [
|
||||
"HawkGenerator"
|
||||
],
|
||||
"aircraft_carrier": [
|
||||
"Stennis"
|
||||
],
|
||||
"helicopter_carrier": [
|
||||
"LHA_Tarawa"
|
||||
],
|
||||
"destroyers": [
|
||||
"PERRY",
|
||||
"USS_Arleigh_Burke_IIa"
|
||||
],
|
||||
"cruisers": [
|
||||
"TICONDEROG"
|
||||
"naval_units": [
|
||||
"LHA-1 Tarawa",
|
||||
"CVN-74 John C. Stennis"
|
||||
],
|
||||
"requirements": {"mod": "Some mod is required"},
|
||||
"carrier_names": [
|
||||
@@ -79,10 +70,6 @@
|
||||
"LHA-4 Nassau",
|
||||
"LHA-5 Peleliu"
|
||||
],
|
||||
"navy_generators": [
|
||||
"OliverHazardPerryGroupGenerator",
|
||||
"ArleighBurkeGroupGenerator"
|
||||
],
|
||||
"has_jtac": true,
|
||||
"jtac_unit": "MQ_9_Reaper"
|
||||
}
|
||||
|
||||
@@ -95,15 +95,8 @@ class TestFactionLoader(unittest.TestCase):
|
||||
self.assertIn(Infantry.Soldier_M4, faction.infantry_units)
|
||||
self.assertIn(Infantry.Soldier_M249, faction.infantry_units)
|
||||
|
||||
self.assertIn("AvengerGenerator", faction.air_defenses)
|
||||
|
||||
self.assertIn("HawkGenerator", faction.air_defenses)
|
||||
|
||||
self.assertIn(Stennis, faction.aircraft_carrier)
|
||||
self.assertIn(LHA_Tarawa, faction.helicopter_carrier)
|
||||
self.assertIn(PERRY, faction.destroyers)
|
||||
self.assertIn(USS_Arleigh_Burke_IIa, faction.destroyers)
|
||||
self.assertIn(TICONDEROG, faction.cruisers)
|
||||
self.assertIn(Stennis.name, faction.naval_units)
|
||||
self.assertIn(LHA_Tarawa.name, faction.naval_units)
|
||||
|
||||
self.assertIn("mod", faction.requirements.keys())
|
||||
self.assertIn("Some mod is required", faction.requirements.values())
|
||||
@@ -111,9 +104,6 @@ class TestFactionLoader(unittest.TestCase):
|
||||
self.assertEqual(4, len(faction.carrier_names))
|
||||
self.assertEqual(5, len(faction.helicopter_carrier_names))
|
||||
|
||||
self.assertIn("OliverHazardPerryGroupGenerator", faction.navy_generators)
|
||||
self.assertIn("ArleighBurkeGroupGenerator", faction.navy_generators)
|
||||
|
||||
@pytest.mark.skip(reason="Faction unit names in the json files are outdated")
|
||||
def test_load_valid_faction_with_invalid_country(self) -> None:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user