CoC-Calc 1.1.0 → 1.2.0
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 +4 -4
- data/lib/CoC-Calc.rb +7 -7
- 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: c7fce4dcf11a917eeb4e9d39983d5f67648c84b6
|
4
|
+
data.tar.gz: 0262ce3c1bfc6a4a138caba868f2d45c6df718ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84016e2091f95419ce27e644e4a3fe17b95ac05762322af5869cf4039f22284054b2e9a94db2539792e03a42715e9d5e4bbaad3c2f397ccedf4339eac900d059
|
7
|
+
data.tar.gz: d95aedab042fca20543640f47ccf325db541a831a96ecbaae9424e9b830cc8c6b80e1a311b7221dca65a3d3b7a97401204d9ad5a9b8150307766b9bb09606d06
|
data/lib/CoC-Calc.rb
CHANGED
@@ -26,12 +26,12 @@ def initPuts
|
|
26
26
|
$lvlSaveContent = File.read("/CoC-Calc-Saves/lvl.txt")
|
27
27
|
else
|
28
28
|
$lvlSaveFile = File.new("/CoC-Calc-Saves/lvl.txt", "w")
|
29
|
-
puts "You need to enter the levels of your troops by running '
|
29
|
+
puts "You need to enter the levels of your troops by running 'CoC-Calc set_troop_lvl' if you need futher help run 'CoC-Calc set_troop_lvl help'!"
|
30
30
|
$lvlSaveContent = ""
|
31
31
|
end
|
32
32
|
|
33
33
|
if $lvlSaveContent == ""
|
34
|
-
puts "You need to enter the levels of your troops by running '
|
34
|
+
puts "You need to enter the levels of your troops by running 'CoC-Calc set_troop_lvl' if you need futher help run 'CoC-Calc set_troop_lvl help'!"
|
35
35
|
else
|
36
36
|
puts "Tests were successful!"
|
37
37
|
end
|
@@ -218,7 +218,7 @@ end
|
|
218
218
|
|
219
219
|
def set_troop_lvl
|
220
220
|
if ARGV[1].downcase == 'help'
|
221
|
-
puts "To save the lvl of your troop enter '
|
221
|
+
puts "To save the lvl of your troop enter 'CoC-Calc set_troop_lvl [lvl of barbarians] [lvl of archers] [lvl of goblins] [lvl of giants] [lvl of wallbreakers] [lvl of ballons] [lvl of wizards] [lvl of healers] [lvl of dragons] [lvl of pekkas]'"
|
222
222
|
else
|
223
223
|
$lvls = [ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5],ARGV[6], ARGV[7], ARGV[8], ARGV[9], ARGV[10]]
|
224
224
|
$lvlSaveFile = File.new("/CoC-Calc-Saves/lvl.txt", "w")
|
@@ -229,7 +229,7 @@ end
|
|
229
229
|
def calc
|
230
230
|
if ARGV[1].is_a? String
|
231
231
|
if ARGV[1].downcase == 'help'
|
232
|
-
puts 'Calc the training time and cost of your troops run "
|
232
|
+
puts 'Calc the training time and cost of your troops run "CoC-Calc.rb calc [amount of barbarians] [amount of archers] [amount of goblins] [amount of giants] [amount of wallbreakers] [amount of ballons] [amount of wizards] [amount of healers] [amount of dragons] [amount of pekkas]"'
|
233
233
|
elsif File.file? "/CoC-Calc-Saves/lvl.txt"
|
234
234
|
totalCost = 0
|
235
235
|
totalTime = 0
|
@@ -265,10 +265,10 @@ def calc
|
|
265
265
|
puts "Your total training time is #{totalTime}s."
|
266
266
|
end
|
267
267
|
else
|
268
|
-
puts "You need to enter the levels of your troops by running '
|
268
|
+
puts "You need to enter the levels of your troops by running 'CoC-Calc set_troop_lvl' if you need futher help run 'CoC-Calc set_troop_lvl help'!"
|
269
269
|
end
|
270
270
|
else
|
271
|
-
puts "You need to supply an argument (run 'CoC-Calc
|
271
|
+
puts "You need to supply an argument (run 'CoC-Calc calc help' for help)"
|
272
272
|
end
|
273
273
|
end
|
274
274
|
|
@@ -281,5 +281,5 @@ elsif ARGV[0] == 'set_troop_lvl'
|
|
281
281
|
elsif ARGV[0]== 'calc'
|
282
282
|
calc
|
283
283
|
else
|
284
|
-
puts "CoC-Calc up and running, Sir!"
|
284
|
+
puts "CoC-Calc up and running, Sir! Version: 1.2"
|
285
285
|
end
|