Sha256: 84c1a0ab1123b476abcffe8eb4c8ee8b078fc68e1f9dd6459f5c38c8b2ee5b6a

Contents?: true

Size: 880 Bytes

Versions: 32

Compression:

Stored size: 880 Bytes

Contents

require 'IFMapper/FXConnection'
require 'IFMapper/FXRoom'
require 'IFMapper/Section'

class FXSection < Section
  def new_connection( roomA, exitA, roomB, exitB = nil )
    # Verify rooms exist in section (ie. don't allow links across
    # sections)
    if not @rooms.include?(roomA)
      raise ConnectionError, "Room #{roomA} not in section #{self}"
    end
    if roomB and not @rooms.include?(roomB)
      raise ConnectionError, "Room #{roomB} not in section #{self}"
    end

    c = FXConnection.new( roomA, roomB )
    return _new_connection(c, roomA, exitA, roomB, exitB)
  end

  def new_room(x, y)
    r = FXRoom.new( x, y, MSG_NEW_LOCATION )
    return _new_room(r, x, y)
  end

  def properties(map)
    if not @win
      @win = FXSectionDialogBox.new(map)
    end
    @win.copy_from(self)
    @win.show
  end

  def initialize()
    super
    @win = nil
  end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ifmapper-2.3.0 lib/IFMapper/FXSection.rb
ifmapper-2.2.9 lib/IFMapper/FXSection.rb
ifmapper-2.2.8 lib/IFMapper/FXSection.rb
ifmapper-2.2.7 lib/IFMapper/FXSection.rb
ifmapper-2.2.5 lib/IFMapper/FXSection.rb
ifmapper-2.2.4 lib/IFMapper/FXSection.rb
ifmapper-2.2.3 lib/IFMapper/FXSection.rb
ifmapper-2.2.2 lib/IFMapper/FXSection.rb
ifmapper-2.2.1 lib/IFMapper/FXSection.rb
ifmapper-2.2.0 lib/IFMapper/FXSection.rb
ifmapper-2.0.9 lib/IFMapper/FXSection.rb
ifmapper-2.0.8 lib/IFMapper/FXSection.rb
ifmapper-2.0.7 lib/IFMapper/FXSection.rb
ifmapper-2.0.6 lib/IFMapper/FXSection.rb
ifmapper-2.0.4 lib/IFMapper/FXSection.rb
ifmapper-1.3.1 lib/IFMapper/FXSection.rb
ifmapper-1.3.0 lib/IFMapper/FXSection.rb
ifmapper-1.2.9 lib/IFMapper/FXSection.rb
ifmapper-1.2.8 lib/IFMapper/FXSection.rb
ifmapper-1.2.6 lib/IFMapper/FXSection.rb