Statistics: Posted by keyser — 28 Apr 2019, 18:22
function upgradeMexById(id)
local units = Units.Get()
for k, u in units do
if u:IsDead() then
units[k] = nil
end
end
if not units then return end
local all_mexes = EntityCategoryFilterDown(categories.MASSEXTRACTION * categories.STRUCTURE, units)
for _, m in all_mexes do
if m:GetEntityId() == id then
if not m:GetFocus() then
local data = Units.Data(m)
if (EntityCategoryContains(categories.TECH1, m) or data['bonus'] >= 1.5) then
upgradeMexes({m})
end
end
return
end
end
end
Statistics: Posted by PhilipJFry — 28 Apr 2019, 18:20
Statistics: Posted by Broco — 15 Feb 2019, 02:13
Statistics: Posted by AgedGouda — 10 Feb 2019, 18:22
Statistics: Posted by R_Charger — 23 Jan 2019, 22:34
Statistics: Posted by Crazy Cossack — 08 Oct 2018, 04:06
Statistics: Posted by Crazy Cossack — 07 Oct 2018, 00:04
Statistics: Posted by nine2 — 05 Oct 2018, 08:04