steed/stead/hideinv.lua

16 lines
333 B
Lua
Raw Normal View History

2010-07-08 12:59:05 +03:00
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
2011-02-23 12:11:27 +02:00
return f(s, ...)
2010-07-07 16:48:15 +03:00
end)
2010-07-08 12:59:05 +03:00
v.left = stead.hook(v.left, function(f, s, ...)
if call_bool(s, 'hideinv') then
me():enable_all();
end
2011-02-23 12:11:27 +02:00
return f(s, ...)
2010-07-07 16:48:15 +03:00
end)
return v
end)