27 lines
1.1 KiB
Luau
27 lines
1.1 KiB
Luau
--!strict
|
|
local rs = game:GetService("ReplicatedStorage")
|
|
local Hints = require(rs.Hunter.Hints)
|
|
local S = require(rs.Hunter.Strings).domination
|
|
local Provider = {}
|
|
|
|
function Provider.candidates(match: Instance, player: Player): {Hints.Hint}
|
|
local side = player:GetAttribute("ArenaTeam")
|
|
local zone = player:GetAttribute("DominationZone")
|
|
local out: {Hints.Hint} = {}
|
|
local function add(key: string, text: string, priority: number)
|
|
table.insert(out, {key = key, text = text, priority = priority, ttl = .4})
|
|
end
|
|
if zone == "Height" then add("dp_height", S.height, 80)
|
|
elseif zone == "Blocked" then add("dp_blocked", S.blocked, 80) end
|
|
for _, key in {"A", "B", "C"} do
|
|
if match:GetAttribute("ZoneContested_" .. key) == true then add("dp_contest_" .. key, S.contested(key), 60)
|
|
elseif match:GetAttribute("ZoneOwner_" .. key) == nil then add("dp_free_" .. key, S.free(key), 40) end
|
|
end
|
|
if typeof(side) == "string" then
|
|
local rate = match:GetAttribute("ScoreRate_" .. side)
|
|
if typeof(rate) == "number" and rate > 0 then add("dp_rate", S.hold(rate), 20) end
|
|
end
|
|
return out
|
|
end
|
|
return Provider
|