11 Commits

Author SHA1 Message Date
Raffson
d410f9d3c4
Formatting... 2023-02-02 21:41:01 +01:00
Raffson
4b8e7e972e
Relocate layouts.p 2022-12-19 19:08:25 +01:00
Raffson
a736bf9b09
"Optimize Imports" in game & qt-ui
Adjustments made by PyCharm
2022-10-24 18:54:41 +02:00
RndName
50b82f6383
Improve Layout loading and ForceGroup generation
- fix layout not preserving the correct group index
- fix ForceGroup generation merging preset_groups with generics
2022-05-14 16:13:09 +02:00
RndName
5cdfe62e2d Implement advanced skynet functions
- factor out own class for the iadsnetwork within the conflicttheater
- This class will handle all Skynet related things - no specific group_name handling necessary in future
- make iadsbuilding own TGO class because SAM & EWRs are Vehicle Groups. IADS Elements dont have any groups attached.
- added command center, connection node and power source as Ground objects which can be added by the campaign designer
- adjust lua generator to support new iads units
- parse the campaign yaml to get the iads network information
- use the range as fallback if no yaml information was found
- complete rewrite of the skynet lua script
- allow destruction of iads network to be persistent over all rounds
- modified the presetlocation handling: the wrapper PresetLocation for PointWithHeading now stores the original name from the campaign miz to have the ability to process campaign yaml configurations based on the ground unit
- Implementation of the UI representation for the IADS Network
- Give user the option to enable or disable advanced iads
- Extended the layout system: Implement Sub task handling to support PD
2022-04-19 10:41:16 +02:00
RndName
1e19afe0e5
Use Heading from Campaign miz for Buildings
Like with most other GroundObjects now the Buildings also will use the Heading defined in the campaign miz and will place and rotate the generated TGO accordingly there.
2022-03-23 18:02:34 +01:00
RndName
4ace13c857 Improve the optional unit handling in layouts
added the fill property to the layout groups which allows to specify if a optional layout group should be filled with a faction accessible unit if it was not defined by the preset groups. This is usefull to allow more generalized templates which for example may or may not have a Search Radar without adding one to all layouts (example: Rapier and Roland Sites which use the generic SHORAD layout)

this fixes an issue which prevented optional units like logistics to be added to the forcegroup if they were not defined in the preset group yaml
2022-03-23 17:26:47 +01:00
RndName
46694e458d
Fix for incorrect unit_count in layout
- Raise LayoutException if the unit_count in the layout is greater than the available units
- Fix Flak Layout to solve #2043
2022-03-16 22:10:19 +01:00
RndName
ff12b37431
Load TgoLayoutGroups in correct order
Add handling to insert the layout group at the correct index according to the order used in the layout yaml
2022-02-23 00:07:37 +01:00
RndName
54e24dff39 Improve Layout System and adopt to review
- adopted to review comments
- removed the role from layouts
- reworked the Groups within the layouts
- added more documentation
- rebased to latest changes
2022-02-21 20:45:41 +01:00
RndName
2c17a9a52e Refactor Templates to Layouts, Review and Cleanup
- 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
2022-02-21 20:45:41 +01:00