Permalink
Browse files

ezmorph won't choose locked morphs

  • Loading branch information...
sprunk committed Jan 24, 2019
1 parent 3a5844f commit c41c8ec5d59e42062c915ff5e1425e85c4cb30b9
Showing with 3 additions and 2 deletions.
  1. +3 −2 LuaRules/Gadgets/unit_morph.lua
@@ -1070,7 +1070,8 @@ local function handleEzMorph(unitID, unitDefID, teamID, targetDefID)
return true, true
end
for morphCmd, morphDef in pairs(morphSet) do
if not targetDefID or morphDef.into == targetDefID then
if (not targetDefID or morphDef.into == targetDefID)
and MorphRequirementsFulfilled(unitID, morphDef, teamTechLevel[teamID] or 0, TechReqList(teamID, morphDef.require)) then
StartMorph(unitID, unitDefID, teamID, morphDef)
break
end
@@ -1445,4 +1446,4 @@ end
end
--------------------------------------------------------------------------------
-- COMMON
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

0 comments on commit c41c8ec

Please sign in to comment.