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
70 lines
1.2 KiB
Python
70 lines
1.2 KiB
Python
import inspect
|
|
import dcs
|
|
|
|
REQUIRED_BUILDINGS = [
|
|
"ammo",
|
|
"factory",
|
|
"fob",
|
|
]
|
|
|
|
DEFAULT_AVAILABLE_BUILDINGS = [
|
|
"fuel",
|
|
"comms",
|
|
"oil",
|
|
"ware",
|
|
"farp",
|
|
"power",
|
|
"derrick",
|
|
]
|
|
|
|
WW2_FREE = ["fuel", "ware"]
|
|
WW2_GERMANY_BUILDINGS = [
|
|
"fuel",
|
|
"ww2bunker",
|
|
"ww2bunker",
|
|
"ww2bunker",
|
|
"allycamp",
|
|
"allycamp",
|
|
]
|
|
WW2_ALLIES_BUILDINGS = [
|
|
"fuel",
|
|
"allycamp",
|
|
"allycamp",
|
|
"allycamp",
|
|
"allycamp",
|
|
"allycamp",
|
|
]
|
|
|
|
FORTIFICATION_BUILDINGS = [
|
|
"Siegfried Line",
|
|
"Concertina wire",
|
|
"Concertina Wire",
|
|
"Czech hedgehogs 1",
|
|
"Czech hedgehogs 2",
|
|
"Dragonteeth 1",
|
|
"Dragonteeth 2",
|
|
"Dragonteeth 3",
|
|
"Dragonteeth 4",
|
|
"Dragonteeth 5",
|
|
"Haystack 1",
|
|
"Haystack 2",
|
|
"Haystack 3",
|
|
"Haystack 4",
|
|
"Hemmkurvenvenhindernis",
|
|
"Log posts 1",
|
|
"Log posts 2",
|
|
"Log posts 3",
|
|
"Log ramps 1",
|
|
"Log ramps 2",
|
|
"Log ramps 3",
|
|
"Belgian Gate",
|
|
"Container white",
|
|
]
|
|
|
|
FORTIFICATION_UNITS = [
|
|
c for c in vars(dcs.vehicles.Fortification).values() if inspect.isclass(c)
|
|
]
|
|
FORTIFICATION_UNITS_ID = [
|
|
c.id for c in vars(dcs.vehicles.Fortification).values() if inspect.isclass(c)
|
|
]
|