exclude self and disabled generals from same generals

This commit is contained in:
notify 2023-03-19 02:28:09 +08:00
parent 36fa1de360
commit 4ad61cf70f
1 changed files with 2 additions and 1 deletions

View File

@ -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