Add round stages, respawn protection and match highlights
This commit is contained in:
1 parent
b87a3770a1
commit
d1c42a36b8
28 files changed
+753
-45
No files matched your search
@@ -0,0 +1,7 @@
|
||||
--!strict
|
||||
return function(stats: any)
|
||||
assert(stats.mvp({}, {kills = 1}) == nil)
|
||||
local rows = {{userId = 9, stats = {kills = 2}}, {userId = 3, stats = {captures = 1}}, {userId = 2, stats = {kills = 2}}}
|
||||
assert(stats.mvp(rows, {kills = 1, captures = 3}) == 3)
|
||||
assert(stats.mvp(rows, {kills = 1}) == 2)
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
--!strict
|
||||
return function(timeline: any)
|
||||
local expected = {{0,"Briefing",5},{5,"Countdown",8},{8,"Live",78},{77.99,"Live",78},{78,"FinalPush",108},{108,"Ended",108}}
|
||||
for _, row in expected do
|
||||
local stage, boundary = timeline.stage(0,108,5,3,30,row[1])
|
||||
assert(stage == row[2] and boundary == row[3])
|
||||
end
|
||||
assert(timeline.stage(0,12,5,3,30,7) == "Countdown")
|
||||
assert(timeline.stage(0,12,5,3,30,8) == "FinalPush")
|
||||
end
|
||||
Reference in new issue
Block a user