This repository has been archived on 2019-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
adventin/stead/hideinv.lua

16 lines
345 B
Lua
Raw Permalink 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, ...)
2011-07-27 13:21:20 +03:00
if stead.call_bool(s, 'hideinv') then
2010-07-08 12:59:05 +03:00
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, ...)
2011-07-27 13:21:20 +03:00
if stead.call_bool(s, 'hideinv') then
2010-07-08 12:59:05 +03:00
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)