Sha256: 8760f3de9761c571ede718135b1971ad2ddf2876ba09db8cf345f1229d8596bc
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
import 'basics/entities/portal' class Room < Entity def connect(destination, direction, type = Portal, two_way = true) portal = type.new self.plot, :name => direction, :parent => self, :destination => destination if two_way == true reverse = Portal.reverse(direction) if reverse == nil raise "\"#{direction.cap_first}\" does not have an opposite direction" end portal2 = type.new(self.plot, { :name => reverse, :parent => destination, :destination => self }) end portal end def synonyms super.to_s + " around" end def tell(message, refresh = false) children.each { |c| c.tell message, refresh } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gamefic-0.2.0 | lib/gamefic/import/basics.old/entities/room.rb |