look over diabled obj fix
This commit is contained in:
parent
80ed02ba34
commit
058d5a6876
|
@ -532,13 +532,13 @@ function list_save(self, name, h, need)
|
||||||
savemembers(h, self, name, need);
|
savemembers(h, self, name, need);
|
||||||
end
|
end
|
||||||
|
|
||||||
function list_name(self, name)
|
function list_name(self, name, dis)
|
||||||
local n, o, ii
|
local n, o, ii
|
||||||
for n,o,ii in opairs(self) do
|
for n,o,ii in opairs(self) do
|
||||||
o = ref(o);
|
o = ref(o);
|
||||||
if isObject(o) then
|
if isObject(o) then
|
||||||
local nam = call(o,'nam') ;
|
local nam = call(o,'nam') ;
|
||||||
if not isDisabled(o) and name == tostring(nam) then
|
if ( not isDisabled(o) or dis ) and name == tostring(nam) then
|
||||||
return ii;
|
return ii;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -561,7 +561,7 @@ function list_search(self, n, dis)
|
||||||
local i;
|
local i;
|
||||||
i = self:look(n);
|
i = self:look(n);
|
||||||
if not i then
|
if not i then
|
||||||
i = self:name(n);
|
i = self:name(n, dis);
|
||||||
end
|
end
|
||||||
if not i and tonumber(n) then
|
if not i and tonumber(n) then
|
||||||
i = self:byid(tonumber(n), dis);
|
i = self:byid(tonumber(n), dis);
|
||||||
|
|
Reference in a new issue