hideinv is now more useful

This commit is contained in:
p.kosyh 2010-07-08 09:59:05 +00:00
parent 8fc6274234
commit 2b6d0df3da

View file

@ -1,12 +1,15 @@
dlg = stead.inherit(dlg, function(v)
v.entered = stead.hook(v.entered, function(f, ...)
local r,v = f(unpack(arg))
me():disable_all();
return r,v
room = stead.inherit(room, function(v)
v.entered = stead.hook(v.entered, function(f, s, ...)
if call_bool(s, 'hideinv') then
me():disable_all();
end
return f(s, unpack(arg))
end)
v.left = stead.hook(v.left, function(f, ...)
me():enable_all();
return f(unpack(arg))
v.left = stead.hook(v.left, function(f, s, ...)
if call_bool(s, 'hideinv') then
me():enable_all();
end
return f(s, unpack(arg))
end)
return v
end)