mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
fixes
This commit is contained in:
parent
5bae790dd8
commit
f4cd28cdb9
@ -2115,9 +2115,8 @@ function UTILS.LoadStationaryListOfGroups(Path,Filename,Reduce)
|
|||||||
local data = { groupname=groupname, size=size, coordinate=coordinate, group=GROUP:FindByName(groupname) }
|
local data = { groupname=groupname, size=size, coordinate=coordinate, group=GROUP:FindByName(groupname) }
|
||||||
if reduce then
|
if reduce then
|
||||||
local actualgroup = GROUP:FindByName(groupname)
|
local actualgroup = GROUP:FindByName(groupname)
|
||||||
local actualsize = actualgroup:CountAliveUnits()
|
if actualgroup and actualgroup:IsAlive() and actualgroup:CountAliveUnits() > size then
|
||||||
if actualsize > size then
|
local reduction = actualgroup:CountAliveUnits() - size
|
||||||
local reduction = actualsize-size
|
|
||||||
BASE:I("Reducing groupsize by ".. reduction .. " units!")
|
BASE:I("Reducing groupsize by ".. reduction .. " units!")
|
||||||
-- reduce existing group
|
-- reduce existing group
|
||||||
local units = actualgroup:GetUnits()
|
local units = actualgroup:GetUnits()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user