exclude self and disabled generals from same generals
This commit is contained in:
parent
36fa1de360
commit
4ad61cf70f
|
@ -165,7 +165,8 @@ function Engine:getSameGenerals(name)
|
||||||
local tName = tmp[#tmp]
|
local tName = tmp[#tmp]
|
||||||
local ret = self.same_generals[tName] or {}
|
local ret = self.same_generals[tName] or {}
|
||||||
return table.filter(ret, function(g)
|
return table.filter(ret, function(g)
|
||||||
return self.generals[g] ~= nil
|
return g ~= name and self.generals[g] ~= nil and not
|
||||||
|
table.contains(self.disabled_packs, self.generals[g].package.name)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue