Polish Team Deathmatch streaks and comeback hints
This commit is contained in:
1 parent
7a1c80c22a
commit
6bb5fba771
8 files changed
+56
-4
No files matched your search
@@ -0,0 +1,14 @@
|
||||
--!strict
|
||||
local rs=game:GetService("ReplicatedStorage")
|
||||
local H=require(rs.Hunter.Hints)
|
||||
local Rules=require(rs.Hunter.TeamDeathmatchRules)
|
||||
local S=require(rs.Hunter.Strings).teamDeathmatch
|
||||
return {candidates=function(match: Instance, player: Player): {H.Hint}
|
||||
if match:GetAttribute("RoundStage")~="FinalPush" then return {} end
|
||||
local own=player:GetAttribute("ArenaTeam")
|
||||
if own~="Blue" and own~="Orange" then return {} end
|
||||
local rival=if own=="Blue" then "Orange" else "Blue"
|
||||
local n=Rules.chaseGap((match:GetAttribute(own.."Score") :: number?) or 0,(match:GetAttribute(rival.."Score") :: number?) or 0)
|
||||
if n then return {{key="tdm_gap",text=string.format(S.chase,n),priority=60,ttl=.4}} end
|
||||
return {}
|
||||
end}
|
||||
@@ -62,6 +62,12 @@ local function event(kind: string, p: any)
|
||||
elseif p.side == player:GetAttribute("ArenaTeam") then S.flagHints.picked else S.flagHints.enemyPicked
|
||||
bannerUntil = workspace:GetServerTimeNow() + 2.7
|
||||
end
|
||||
if id == "TeamDeathmatch" and kind == Kinds.Streak then
|
||||
contour:SetAttribute("Accent",tone)
|
||||
title.Text=string.format(S.teamDeathmatch.streak,p.text or "",p.value or 0)
|
||||
bannerUntil=workspace:GetServerTimeNow()+2.7
|
||||
if p.userId~=player.UserId then Sounds.sound("RoundStart") end
|
||||
end
|
||||
if id == "HuntLeader" and (kind == Kinds.LeaderAssigned or kind == Kinds.LeaderDown) then
|
||||
local now=workspace:GetServerTimeNow()
|
||||
if kind == Kinds.LeaderDown or now>=bannerUntil then
|
||||
|
||||
Reference in new issue
Block a user