| Class | Exit |
| In: |
lib/core/exit.rb
|
| Parent: | GameObject |
# File lib/core/exit.rb, line 27 def initialize(name, owner, location, to_room) super(name, owner, location) self.to_room=to_room # The room the exit leads to # location is the room the exit starts in end
# File lib/core/exit.rb, line 36 def leave(e) ch = get_object(e.from) characters(e.from).each do |x| add_event(location, x.id,:show, ch.name + " has left #{e.msg}.") if x.account end # remove character get_object(location).delete_contents(ch.id) ch.location = nil add_event(id, to_room, :arrive, ch.id) end