gemwarrior 0.9.8 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcc91613e87044d4ca8e37b4f48753328182aa12
4
- data.tar.gz: 9625b1c5e5a0d8c0ee7d16ccf9f987f55c705239
3
+ metadata.gz: 2dac84cb6be6c2deb411b2e3cb3753c725e50409
4
+ data.tar.gz: 24015aa5dccb120764bcc0be8703042701b18c93
5
5
  SHA512:
6
- metadata.gz: 6ced97db17ce3a76c0a897d63ef2e53353c5592d0099860bda957b9d038d9c2b0eb6fcaa74912eb2711270897a7eec75e1c0bc45c05ca41b268400fce3d77f52
7
- data.tar.gz: 4af7edae449158ccf68f51fad445d7de226585c17a02358724a0b0a63703ced000a9268ad8b8c6609aa296c14fcd9dec644d30a21c93e0ae51cd257a8feb9089
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
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.9.8'
5
+ VERSION = '0.9.9'
6
6
  end
@@ -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 = "data/locations.yml"
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('lib/gemwarrior/entities/monsters/*.rb').each do |item|
252
- require_relative item[item.index('/', item.index('/')+1)+1..item.length]
252
+ Dir.glob(File.expand_path('../entities/monsters/*.rb', __FILE__)).each do |item|
253
+ require_relative item
253
254
  end
254
- Dir.glob('lib/gemwarrior/entities/monsters/bosses/*.rb').each do |item|
255
- require_relative item[item.index('/', item.index('/')+1)+1..item.length]
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('lib/gemwarrior/entities/items/*.rb').each do |item|
276
- require_relative item[item.index('/', item.index('/')+1)+1..item.length]
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.8
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-16 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os