Forged Alliance Forever Forums
Moderator: Morax
AgedGouda wrote:Hi, I was wondering where I can download this mod since I can't find it in the vault.
Thanks
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
Users browsing this forum: No registered users and 1 guest