mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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
64 lines
1.5 KiB
Python
64 lines
1.5 KiB
Python
from enum import Enum
|
|
|
|
|
|
class GroupRole(Enum):
|
|
Unknow = "Unknown"
|
|
AntiAir = "AntiAir"
|
|
Building = "Building"
|
|
Naval = "Naval"
|
|
GroundForce = "GroundForce"
|
|
Defenses = "Defenses"
|
|
Air = "Air"
|
|
|
|
|
|
class GroupTask(Enum):
|
|
EWR = "EarlyWarningRadar"
|
|
AAA = "AAA"
|
|
SHORAD = "SHORAD"
|
|
MERAD = "MERAD"
|
|
LORAD = "LORAD"
|
|
AircraftCarrier = "AircraftCarrier"
|
|
HelicopterCarrier = "HelicopterCarrier"
|
|
Navy = "Navy"
|
|
BaseDefense = "BaseDefense" # Ground
|
|
FrontLine = "FrontLine"
|
|
Air = "Air"
|
|
Missile = "Missile"
|
|
Coastal = "Coastal"
|
|
Factory = "Factory"
|
|
Ammo = "Ammo"
|
|
Oil = "Oil"
|
|
FOB = "FOB"
|
|
StrikeTarget = "StrikeTarget"
|
|
Comms = "Comms"
|
|
Power = "Power"
|
|
|
|
|
|
ROLE_TASKINGS: dict[GroupRole, list[GroupTask]] = {
|
|
GroupRole.Unknow: [], # No Tasking
|
|
GroupRole.AntiAir: [
|
|
GroupTask.EWR,
|
|
GroupTask.AAA,
|
|
GroupTask.SHORAD,
|
|
GroupTask.MERAD,
|
|
GroupTask.LORAD,
|
|
],
|
|
GroupRole.GroundForce: [GroupTask.BaseDefense, GroupTask.FrontLine],
|
|
GroupRole.Naval: [
|
|
GroupTask.AircraftCarrier,
|
|
GroupTask.HelicopterCarrier,
|
|
GroupTask.Navy,
|
|
],
|
|
GroupRole.Building: [
|
|
GroupTask.Factory,
|
|
GroupTask.Ammo,
|
|
GroupTask.Oil,
|
|
GroupTask.FOB,
|
|
GroupTask.StrikeTarget,
|
|
GroupTask.Comms,
|
|
GroupTask.Power,
|
|
],
|
|
GroupRole.Defenses: [GroupTask.Missile, GroupTask.Coastal],
|
|
GroupRole.Air: [GroupTask.Air],
|
|
}
|