mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
- Fix tgogenerator - Fix UI for ForceGroup and Layouts - Fix ammo depot handling - Split bigger files in smaller meaningful files (TGO, layouts, forces) - Renamed Template to Layout - Renamed GroundGroup to TheaterGroup and GroundUnit to TheaterUnit - Reorganize Layouts and UnitGroups to a ArmedForces class and ForceGroup similar to the AirWing and Squadron - Reworded the UnitClass, GroupRole, GroupTask (adopted to PEP8) and reworked the connection from Role and Task - added comments - added missing unit classes - added temp workaround for missing classes - add repariable property to TheaterUnit - Review and Cleanup Added serialization for loaded templates Loading the templates from the .miz files takes a lot of computation time and in the future there will be more templates added to the system. Therefore a local pickle serialization for the loaded templates was re-added: - The pickle will be created the first time the TemplateLoader will be accessed - Pickle is stored in Liberation SaveDir - Added UI option to (re-)import templates
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
from dcs.vehicles import AirDefence
|
|
|
|
from game.theater.theatergroup import TheaterUnit
|
|
|
|
|
|
class AlicCodes:
|
|
CODES = {
|
|
AirDefence._1L13_EWR.id: 101,
|
|
AirDefence._55G6_EWR.id: 102,
|
|
AirDefence.S_300PS_40B6MD_sr.id: 103,
|
|
AirDefence.S_300PS_64H6E_sr.id: 104,
|
|
AirDefence.SA_11_Buk_SR_9S18M1.id: 107,
|
|
AirDefence.Kub_1S91_str.id: 108,
|
|
AirDefence.Dog_Ear_radar.id: 109,
|
|
AirDefence.S_300PS_40B6M_tr.id: 110,
|
|
AirDefence.SA_11_Buk_LN_9A310M1.id: 115,
|
|
AirDefence.Osa_9A33_ln.id: 117,
|
|
AirDefence.Strela_10M3.id: 118,
|
|
AirDefence.Tor_9A331.id: 119,
|
|
AirDefence._2S6_Tunguska.id: 120,
|
|
AirDefence.ZSU_23_4_Shilka.id: 121,
|
|
AirDefence.P_19_s_125_sr.id: 122,
|
|
AirDefence.Snr_s_125_tr.id: 123,
|
|
AirDefence.Rapier_fsa_blindfire_radar.id: 124,
|
|
AirDefence.Rapier_fsa_launcher.id: 125,
|
|
AirDefence.SNR_75V.id: 126,
|
|
AirDefence.HQ_7_LN_SP.id: 127,
|
|
AirDefence.HQ_7_STR_SP.id: 128,
|
|
AirDefence.RLS_19J6.id: 130,
|
|
AirDefence.Roland_ADS.id: 201,
|
|
AirDefence.Patriot_str.id: 202,
|
|
AirDefence.Hawk_sr.id: 203,
|
|
AirDefence.Hawk_tr.id: 204,
|
|
AirDefence.Roland_Radar.id: 205,
|
|
AirDefence.Hawk_cwar.id: 206,
|
|
AirDefence.Gepard.id: 207,
|
|
AirDefence.Vulcan.id: 208,
|
|
AirDefence.NASAMS_Radar_MPQ64F1.id: 209,
|
|
}
|
|
|
|
@classmethod
|
|
def code_for(cls, unit: TheaterUnit) -> int:
|
|
return cls.CODES[unit.type.id]
|