tclog 0.2.3 → 0.2.4
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.
- data/VERSION +1 -1
- data/lib/tclog.rb +31 -30
- data/tclog.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/tclog.rb
CHANGED
@@ -327,6 +327,36 @@ module TCLog
|
|
327
327
|
case o[0]
|
328
328
|
when "Match"
|
329
329
|
if match_flag
|
330
|
+
if specops_total && match_wins
|
331
|
+
game.add_round specops_total, terrorists_total, match_wins
|
332
|
+
match_wins = nil
|
333
|
+
terrorists_total = nil
|
334
|
+
specops_total = nil
|
335
|
+
end
|
336
|
+
else
|
337
|
+
match_flag = true
|
338
|
+
end
|
339
|
+
if match[-1][0] == "Map"
|
340
|
+
game.add_map match[-1][1]
|
341
|
+
end
|
342
|
+
when "UnknownWin"
|
343
|
+
match_wins = :unknown if match_flag
|
344
|
+
when "TerroristsWin"
|
345
|
+
match_wins = :terrorists if match_flag
|
346
|
+
when "SpecopsWin"
|
347
|
+
match_wins = :specops if match_flag
|
348
|
+
when "Terrorists", "Specops"
|
349
|
+
if match_flag
|
350
|
+
unless game.players[o[1][:name]]
|
351
|
+
game.add_player(o[1][:name])
|
352
|
+
end
|
353
|
+
game.players[o[1][:name]].add_result(game.round_r+1,o[1])
|
354
|
+
end
|
355
|
+
when "TerroristsTotal"
|
356
|
+
terrorists_total = o[1] if match_flag
|
357
|
+
when "SpecopsTotal"
|
358
|
+
if match_flag
|
359
|
+
specops_total = o[1]
|
330
360
|
unless specops_total
|
331
361
|
specops_total = {
|
332
362
|
:name => "Totals",
|
@@ -359,36 +389,7 @@ module TCLog
|
|
359
389
|
:rate => 0,
|
360
390
|
}
|
361
391
|
end
|
362
|
-
|
363
|
-
game.add_round specops_total, terrorists_total, match_wins
|
364
|
-
match_wins = nil
|
365
|
-
terrorists_total = nil
|
366
|
-
specops_total = nil
|
367
|
-
end
|
368
|
-
else
|
369
|
-
match_flag = true
|
370
|
-
end
|
371
|
-
if match[-1][0] == "Map"
|
372
|
-
game.add_map match[-1][1]
|
373
|
-
end
|
374
|
-
when "UnknownWin"
|
375
|
-
match_wins = :unknown if match_flag
|
376
|
-
when "TerroristsWin"
|
377
|
-
match_wins = :terrorists if match_flag
|
378
|
-
when "SpecopsWin"
|
379
|
-
match_wins = :specops if match_flag
|
380
|
-
when "Terrorists", "Specops"
|
381
|
-
if match_flag
|
382
|
-
unless game.players[o[1][:name]]
|
383
|
-
game.add_player(o[1][:name])
|
384
|
-
end
|
385
|
-
game.players[o[1][:name]].add_result(game.round_r+1,o[1])
|
386
|
-
end
|
387
|
-
when "TerroristsTotal"
|
388
|
-
terrorists_total = o[1] if match_flag
|
389
|
-
when "SpecopsTotal"
|
390
|
-
if match_flag
|
391
|
-
specops_total = o[1]
|
392
|
+
|
392
393
|
match_wins = compare_score(terrorists_total, specops_total) if match_wins == :unknown
|
393
394
|
end
|
394
395
|
end
|
data/tclog.gemspec
CHANGED