CoC-Calc 1.2.0 → 1.2.1
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 +9 -5
- 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: 11d20c4f1935260f813eae6e3af6501dbecadb09
|
4
|
+
data.tar.gz: 895ff9704218e2046177f2563916cf8ccb9c96ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46061cc66436bc7eeeb4dbaafdee8dba74f7d6defc880fa8133b1ac6fedbf055abd25510b701b8a7a4c0b86292f5f07bc9e9e1d3e22603b20113c292cb6fd1e7
|
7
|
+
data.tar.gz: f8eb4223868d05f0c7b6d27a39e17564b53420806ea1160cada52578798651f6bcc3cd30faa1b5f2a79090c7185ffab6985254203eef097efccd9b7bba63fb65
|
data/lib/CoC-Calc.rb
CHANGED
@@ -217,12 +217,16 @@ def get_troop_cost
|
|
217
217
|
end
|
218
218
|
|
219
219
|
def set_troop_lvl
|
220
|
-
if ARGV[1].
|
221
|
-
|
220
|
+
if ARGV[1].is_a? String
|
221
|
+
if ARGV[1].downcase == 'help'
|
222
|
+
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]'"
|
223
|
+
else
|
224
|
+
$lvls = [ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5],ARGV[6], ARGV[7], ARGV[8], ARGV[9], ARGV[10]]
|
225
|
+
$lvlSaveFile = File.new("/CoC-Calc-Saves/lvl.txt", "w")
|
226
|
+
$lvlSaveFile.puts $lvls.join('||')
|
227
|
+
end
|
222
228
|
else
|
223
|
-
|
224
|
-
$lvlSaveFile = File.new("/CoC-Calc-Saves/lvl.txt", "w")
|
225
|
-
$lvlSaveFile.puts $lvls.join('||')
|
229
|
+
puts "Run 'CoC-Calc set_troop_lvl help' for help on this command."
|
226
230
|
end
|
227
231
|
end
|
228
232
|
|