Merge branch 'main' into 486-add-more-advanced-effects

This commit is contained in:
Pax1601
2023-11-08 22:04:52 +01:00
42 changed files with 696 additions and 389 deletions

View File

@@ -1017,11 +1017,15 @@ function Olympus.setUnitsData(arg, time)
table["hasTask"] = controller:hasTask()
table["ammo"] = unit:getAmmo() --TODO remove a lot of stuff we don't really need
table["fuel"] = unit:getFuel()
table["life"] = unit:getLife() / unit:getLife0()
table["health"] = unit:getLife() / unit:getLife0() * 100
table["contacts"] = contacts
units[ID] = table
end
else
-- If the unit reference is nil it means the unit no longer exits
units[ID] = {isAlive = false}
Olympus.units[ID] = nil
end
end
else