Skip to content

Commit

Permalink
fixing factory queue for alt faction
Browse files Browse the repository at this point in the history
  • Loading branch information
CommonPlayer committed Sep 14, 2019
1 parent 061ccad commit c01e5c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LuaUI/Widgets_Evo/keep_morphed_selected.lua
Expand Up @@ -44,8 +44,6 @@ function widget:GameFrame(frameNum)
if c.x==d.x and c.z==d.z and c.t==d.t then
for i = 1, #d.queue do
for k, v in pairs(d.queue[i]) do
for _ = 1, v do Spring.GiveOrderToUnit(c.u, -UnitDefs[k].id, {}, 0) end

local oldName = UnitDefs[k].name
local newName = oldName .. "_up1"
if oldName:find("_up1") then newName = oldName:gsub("_up1", "_up2")
Expand All @@ -55,6 +53,8 @@ function widget:GameFrame(frameNum)
for _ = 1, v do Spring.GiveOrderToUnit(c.u, -uDefName.id, {}, 0) end
--Spring.Echo(UnitDefs[k].name .. "___" .. v)
--Spring.Echo(uDefName.id)
else
for _ = 1, v do Spring.GiveOrderToUnit(c.u, -UnitDefs[k].id, {}, 0) end
end
end
end
Expand Down

0 comments on commit c01e5c7

Please sign in to comment.