File: hideinv.lua

package info (click to toggle)
instead 1.6.0-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,220 kB
  • sloc: ansic: 26,619; makefile: 247; sh: 207; cpp: 93
file content (15 lines) | stat: -rw-r--r-- 345 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)