Allow skynet properties override and improve dead unit handling

Now the user can override special skynet properties from the unit.yaml of the main Radar of the sam site. Which unit needs these overrides can be looked up over here: https://github.com/walder/Skynet-IADS/blob/develop/skynet-iads-source/skynet-iads-supported-types.lua

- fixed wrong exclusion of groups with the first unit dead but still able to participate
- added some exception handling in the lua script for groups which skynet is not able to control. preventing scripting errors
This commit is contained in:
RndName
2022-04-06 12:41:52 +02:00
parent 4664a7bbd4
commit 004bcce58e
6 changed files with 109 additions and 24 deletions

View File

@@ -46,8 +46,8 @@ class IadsConnectionJs(BaseModel):
node=tgo.id,
connected=connection.ground_object.id,
active=(
tgo.alive_unit_count > 0
and connection.ground_object.alive_unit_count > 0
network_node.group.alive_units > 0
and connection.alive_units > 0
),
blue=tgo.is_friendly(True),
is_power="power"