steed/stead/hideinv.lua
2011-07-27 10:21:20 +00:00

16 lines
345 B
Lua

room = stead.inherit(room, function(v)
v.entered = stead.hook(v.entered, function(f, s, ...)
if stead.call_bool(s, 'hideinv') then
me():disable_all();
end
return f(s, ...)
end)
v.left = stead.hook(v.left, function(f, s, ...)
if stead.call_bool(s, 'hideinv') then
me():enable_all();
end
return f(s, ...)
end)
return v
end)