| 1 | classes.obj_door = |
| 2 | { |
| 3 | _properties = {name = "door", longname = "a door", desc = "You see a doorway, through which you can enter.", static = true } |
| 4 | } |
| 5 | |
| 6 | function classes.obj_door:_create(e) |
| 7 | local obj = classes.default._create(self, e); |
| 8 | obj._properties.to = e.ext.to; |
| 9 | obj._properties.longname = e.ext.longname; |
| 10 | return obj; |
| 11 | end |
| 12 | |
| 13 | function classes.obj_door:enter(e) |
| 14 | if not self._properties.to then e.person:_tell("You find it physically impossible to pass through the doorway!"); end |
| 15 | e.person:_say("/me enters "..self._properties.longname); |
| 16 | e.person:_sendto(self._properties.to); |
| 17 | end |