gemwarrior 0.12.1 → 0.12.2

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: a602b9554ac2652202951d150e7ee4cfd8b27aff
4
- data.tar.gz: acb430f7bfee61a5b97f27f811d84f8863ab6c91
3
+ metadata.gz: d6de5ba21233c7d213dd7111739323abb331cc7d
4
+ data.tar.gz: f71d96c8b7862d99d892b18f4bea174be7b5d932
5
5
  SHA512:
6
- metadata.gz: 46c9e9d1a246bb61f9700b2ca58ce6b607d758fccc98fc209672d0f48a3a34fd77743fa7c9ec476228d92ebb9dd7358ae5b36b375e16ab741b8bdc4426eafee3
7
- data.tar.gz: 8be49993ada5536ac37d6882c400540047322e970c485faf441cad9fcf265088e35c9809f8b649aa0334c0ea40f405e52a47797eec7be035630710b5e96e5034
6
+ metadata.gz: e6ca8c23dac748338f3c9a4db3e3385c2d4e295890f9bb2c38d7758b9333a5674f62bbf42e8cd02e845c3eb79dfbd4298e513a434bb41bd0dbd3ab453b96f3e9
7
+ data.tar.gz: 44e7684ac47d46169367689cb6d67ec912d04b59f3f7d5e79c613503fdfeaf56d5e51b465627fe744bdb035560d9398dedb9fddcf3ef8296df9f961caa9e2566
data/bin/gemwarrior CHANGED
@@ -107,7 +107,9 @@ def read_options_file
107
107
  File.open(GameOptions.data['options_file_path']).readlines.each do |line|
108
108
  options << line.chomp.split(':')
109
109
  end
110
- return options
110
+
111
+ # check for null
112
+ return options[0][0].eql?('sound_enabled') ? options : nil
111
113
  end
112
114
  nil
113
115
  end
@@ -9,8 +9,8 @@ module Gemwarrior
9
9
  class Evaluator
10
10
  # CONSTANTS
11
11
  PROGRAM_NAME = 'Gem Warrior'
12
- QUIT_MESSAGE = 'Thanks for playing the game. Until next time...'.colorize(:yellow)
13
- RESUME_MESSAGE = 'Back to adventuring!'.colorize(:green)
12
+ QUIT_MESSAGE = 'Thanks for playing the game. Until next time...'
13
+ RESUME_MESSAGE = 'Back to adventuring!'
14
14
 
15
15
  GO_PARAMS = 'Options: north, east, south, west'
16
16
  CHANGE_PARAMS = 'Options: name'
@@ -689,13 +689,13 @@ module Gemwarrior
689
689
 
690
690
  case answer
691
691
  when 'y', 'yes'
692
- puts QUIT_MESSAGE
692
+ puts QUIT_MESSAGE.colorize(:yellow)
693
693
  return 'exit'
694
694
  else
695
- puts RESUME_MESSAGE
695
+ puts RESUME_MESSAGE.colorize(:green)
696
696
  end
697
697
  when 'quit!', 'exit!', 'qq', 'xx'
698
- puts QUIT_MESSAGE
698
+ puts QUIT_MESSAGE.colorize(:yellow)
699
699
  return 'exit'
700
700
  else
701
701
  return
@@ -12,6 +12,28 @@ module Gemwarrior
12
12
  @@cues ||= {}
13
13
  end
14
14
 
15
+ self.add :bg1, {
16
+ synth: [
17
+ { frequencies: 'C4', duration: 400 },
18
+ { frequencies: 'C5', duration: 400 },
19
+ { frequencies: 'C4', duration: 400 },
20
+ { frequencies: 'C5', duration: 400 },
21
+ { frequencies: 'C4', duration: 400 },
22
+ { frequencies: 'C5', duration: 400 },
23
+ { frequencies: 'G4', duration: 400 },
24
+ { frequencies: 'A4', duration: 400 },
25
+ { frequencies: 'C4', duration: 400 },
26
+ { frequencies: 'C5', duration: 400 },
27
+ { frequencies: 'C4', duration: 400 },
28
+ { frequencies: 'C5', duration: 400 },
29
+ { frequencies: 'C4', duration: 400 },
30
+ { frequencies: 'C5', duration: 400 },
31
+ { frequencies: 'B4', duration: 400 },
32
+ { frequencies: 'A4', duration: 400 },
33
+ ],
34
+ sample: 'bg1.wav'
35
+ }
36
+
15
37
  self.add :battle_start, {
16
38
  synth: [
17
39
  { frequencies: 'G4', duration: 50 },
@@ -451,10 +451,6 @@ module Gemwarrior
451
451
  end
452
452
  end
453
453
 
454
- def play_intro_tune
455
- Audio.play_synth(:intro)
456
- end
457
-
458
454
  def setup_screen(initial_command = nil, extra_command = nil, new_skip = false, resume_skip = false)
459
455
  # welcome player to game
460
456
  clear_screen
@@ -462,7 +458,7 @@ module Gemwarrior
462
458
 
463
459
  # main menu loop until new game or exit
464
460
  if new_skip
465
- play_intro_tune
461
+ Audio.play_synth(:intro)
466
462
  print_splash_message
467
463
  print_fortune
468
464
  elsif resume_skip
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.12.1'
5
+ VERSION = '0.12.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemwarrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick