Module: Shop
- Defined in:
- lib/Olib/shops.rb
Defined Under Namespace
Classes: Container, Playershop
Constant Summary
collapse
- @@containers =
[]
Class Method Summary
collapse
Class Method Details
.cache ⇒ Object
26
27
28
|
# File 'lib/Olib/shops.rb', line 26
def Shop.cache
@@containers
end
|
.containers ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/Olib/shops.rb', line 11
def Shop.containers
@@containers = [
GameObj.loot,
GameObj.room_desc
]
.flatten
.compact
.select { |container| !(container.name =~ /^([A-z][a-z]+ disk$)/)}
.map { |container| Shop::Container.new(container) }
@@containers
end
|
.items ⇒ Object
7
8
9
|
# File 'lib/Olib/shops.rb', line 7
def Shop.items
Shop.containers.map { |container| container.contents }.flatten
end
|