gemwarrior 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gemwarrior/misc/name_generator.rb +1 -1
- data/lib/gemwarrior/version.rb +1 -1
- data/lib/gemwarrior/world.rb +8 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dac84cb6be6c2deb411b2e3cb3753c725e50409
|
4
|
+
data.tar.gz: 24015aa5dccb120764bcc0be8703042701b18c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bbbb321bdb5c182bd65b357e98f3709f2915efddb4d77538d6259eba00a790e2669985732e4685f892e334e47d2605554ff7a5f0534dc8eae33f1cfc6249ef1
|
7
|
+
data.tar.gz: a94bb989a038f982b24edb879b27a68678a99b49fd452ea54e567224a0d45981ffa2b0080bdab61cf7d1dcca150ff6d8ca729ef2b861ef0b3ffc4aa6d9b4ee9c
|
@@ -17,7 +17,7 @@ class NameGenerator
|
|
17
17
|
# load sample names
|
18
18
|
def get_name_set(type)
|
19
19
|
names = []
|
20
|
-
names_data = YAML.load_file("data/#{type}_names.yml")
|
20
|
+
names_data = YAML.load_file(File.expand_path("../../../../data/#{type}_names.yml", __FILE__))
|
21
21
|
names_data.each do |n|
|
22
22
|
names.push(n)
|
23
23
|
end
|
data/lib/gemwarrior/version.rb
CHANGED
data/lib/gemwarrior/world.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
# World where the locations, monsters, items, etc. exist
|
3
3
|
|
4
4
|
require 'yaml'
|
5
|
+
require 'pry'
|
5
6
|
|
6
7
|
require_relative 'entities/item'
|
7
8
|
require_relative 'entities/location'
|
@@ -9,7 +10,7 @@ require_relative 'entities/location'
|
|
9
10
|
module Gemwarrior
|
10
11
|
class World
|
11
12
|
# CONSTANTS
|
12
|
-
LOCATION_DATA_FILE =
|
13
|
+
LOCATION_DATA_FILE = File.expand_path('../../../data/locations.yml', __FILE__)
|
13
14
|
WORLD_DIM_WIDTH = 10
|
14
15
|
WORLD_DIM_HEIGHT = 10
|
15
16
|
|
@@ -248,11 +249,11 @@ module Gemwarrior
|
|
248
249
|
end
|
249
250
|
|
250
251
|
def init_monsters
|
251
|
-
Dir.glob('
|
252
|
-
require_relative item
|
252
|
+
Dir.glob(File.expand_path('../entities/monsters/*.rb', __FILE__)).each do |item|
|
253
|
+
require_relative item
|
253
254
|
end
|
254
|
-
Dir.glob('
|
255
|
-
require_relative item
|
255
|
+
Dir.glob(File.expand_path('../entities/monsters/bosses/*.rb', __FILE__)).each do |item|
|
256
|
+
require_relative item
|
256
257
|
end
|
257
258
|
|
258
259
|
self.monsters = [
|
@@ -272,8 +273,8 @@ module Gemwarrior
|
|
272
273
|
end
|
273
274
|
|
274
275
|
def init_locations
|
275
|
-
Dir.glob('
|
276
|
-
require_relative item
|
276
|
+
Dir.glob(File.expand_path('../entities/items/*.rb', __FILE__)).each do |item|
|
277
|
+
require_relative item
|
277
278
|
end
|
278
279
|
|
279
280
|
locations = []
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemwarrior
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Chadwick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: os
|