Class: Lich::DragonRealms::DRRoom

Inherits:
Object
  • Object
show all
Defined in:
documented/dragonrealms/drinfomon/drroom.rb

Overview

Represents a room in the DragonRealms game. This class manages the state of the room, including NPCs, PCs, and room properties.

Examples:

Accessing room properties

room = Lich::DragonRealms::DRRoom
room.title = "A Dark Cave"
puts room.description

Constant Summary collapse

@@title =
''
@@description =
''

Class Method Summary collapse

Class Method Details

.dead_npcsArray

Returns the list of dead NPCs in the room.

Returns:

  • (Array)

    An array of dead NPCs.



112
113
114
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 112

def self.dead_npcs
  @@dead_npcs
end

.dead_npcs=(val) ⇒ Array

Sets the list of dead NPCs in the room.

Parameters:

  • val (Array)

    An array of dead NPCs to set.

Returns:

  • (Array)

    The updated list of dead NPCs.



119
120
121
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 119

def self.dead_npcs=(val)
  @@dead_npcs = val
end

.descriptionString

Returns the description of the room.

Returns:

  • (String)

    The description of the room.



65
66
67
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 65

def self.description
  XMLData.room_description
end

.exitsArray

Returns the exits available in the room.

Returns:

  • (Array)

    An array of exits.



53
54
55
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 53

def self.exits
  XMLData.room_exits
end

.group_membersArray

Returns the list of group members in the room.

Returns:

  • (Array)

    An array of group members.



71
72
73
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 71

def self.group_members
  @@group_members
end

.group_members=(val) ⇒ Array

Sets the list of group members in the room.

Examples:

Setting group members

Lich::DragonRealms::DRRoom.group_members = [member1, member2]

Parameters:

  • val (Array)

    An array of group members to set.

Returns:

  • (Array)

    The updated list of group members.



80
81
82
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 80

def self.group_members=(val)
  @@group_members = val
end

.npcsArray

Returns the list of NPCs in the room.

Returns:

  • (Array)

    An array of NPCs.



23
24
25
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 23

def self.npcs
  @@npcs
end

.npcs=(val) ⇒ Array

Sets the list of NPCs in the room.

Examples:

Setting NPCs

Lich::DragonRealms::DRRoom.npcs = [npc1, npc2]

Parameters:

  • val (Array)

    An array of NPCs to set.

Returns:

  • (Array)

    The updated list of NPCs.



32
33
34
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 32

def self.npcs=(val)
  @@npcs = val
end

.pcsArray

Returns the list of player characters (PCs) in the room.

Returns:

  • (Array)

    An array of PCs.



38
39
40
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 38

def self.pcs
  @@pcs
end

.pcs=(val) ⇒ Array

Sets the list of player characters (PCs) in the room.

Examples:

Setting PCs

Lich::DragonRealms::DRRoom.pcs = [pc1, pc2]

Parameters:

  • val (Array)

    An array of PCs to set.

Returns:

  • (Array)

    The updated list of PCs.



47
48
49
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 47

def self.pcs=(val)
  @@pcs = val
end

.pcs_proneArray

Returns the list of PCs that are prone in the room.

Returns:

  • (Array)

    An array of prone PCs.



86
87
88
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 86

def self.pcs_prone
  @@pcs_prone
end

.pcs_prone=(val) ⇒ Array

Sets the list of PCs that are prone in the room.

Parameters:

  • val (Array)

    An array of prone PCs to set.

Returns:

  • (Array)

    The updated list of prone PCs.



93
94
95
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 93

def self.pcs_prone=(val)
  @@pcs_prone = val
end

.pcs_sittingArray

Returns the list of PCs that are sitting in the room.

Returns:

  • (Array)

    An array of sitting PCs.



99
100
101
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 99

def self.pcs_sitting
  @@pcs_sitting
end

.pcs_sitting=(val) ⇒ Array

Sets the list of PCs that are sitting in the room.

Parameters:

  • val (Array)

    An array of sitting PCs to set.

Returns:

  • (Array)

    The updated list of sitting PCs.



106
107
108
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 106

def self.pcs_sitting=(val)
  @@pcs_sitting = val
end

.room_objsArray

Returns the list of objects in the room.

Returns:

  • (Array)

    An array of room objects.



125
126
127
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 125

def self.room_objs
  @@room_objs
end

.room_objs=(val) ⇒ Array

Sets the list of objects in the room.

Parameters:

  • val (Array)

    An array of room objects to set.

Returns:

  • (Array)

    The updated list of room objects.



132
133
134
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 132

def self.room_objs=(val)
  @@room_objs = val
end

.titleString

Returns the title of the room.

Returns:

  • (String)

    The title of the room.



59
60
61
# File 'documented/dragonrealms/drinfomon/drroom.rb', line 59

def self.title
  XMLData.room_title
end