gemwarrior 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gemwarrior +3 -1
- data/lib/gemwarrior/evaluator.rb +5 -5
- data/lib/gemwarrior/misc/audio_cues.rb +22 -0
- data/lib/gemwarrior/repl.rb +1 -5
- data/lib/gemwarrior/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6de5ba21233c7d213dd7111739323abb331cc7d
|
4
|
+
data.tar.gz: f71d96c8b7862d99d892b18f4bea174be7b5d932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
110
|
+
|
111
|
+
# check for null
|
112
|
+
return options[0][0].eql?('sound_enabled') ? options : nil
|
111
113
|
end
|
112
114
|
nil
|
113
115
|
end
|
data/lib/gemwarrior/evaluator.rb
CHANGED
@@ -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...'
|
13
|
-
RESUME_MESSAGE = 'Back to adventuring!'
|
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 },
|
data/lib/gemwarrior/repl.rb
CHANGED
@@ -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
|
-
|
461
|
+
Audio.play_synth(:intro)
|
466
462
|
print_splash_message
|
467
463
|
print_fortune
|
468
464
|
elsif resume_skip
|
data/lib/gemwarrior/version.rb
CHANGED