Centralize Hunter interface strings and verify mobile HUD

This commit is contained in:
Leshyi committed 2026-11-30 01:35:03 +05:00
1 parent 16a359d4af
commit c88c3501b3
21 files changed
+752 -336

No files matched your search

+34 -33
View File
@@ -22,6 +22,7 @@ local objectiveCueConnection = objectiveCue.OnClientEvent:Connect(function(captu
end)
local Hunter = ReplicatedStorage:WaitForChild("Hunter")
local HunterStrings = require(Hunter:WaitForChild("Strings") :: ModuleScript)
local Text = HunterStrings.interface.ArenaRoundHud
local RoundStrings = HunterStrings.round
local SiegeResults = require(Hunter:WaitForChild("SiegeResults") :: ModuleScript)
local SiegeConfig = require(ReplicatedStorage:WaitForChild("CitadelAssaultConfig") :: ModuleScript)
@@ -429,10 +430,10 @@ local function refreshCapture()
captureCueTeam, captureCuePhase = if phase == "Captured" then nil else side, phase
local accent = if not side then UI.Gold elseif allied then allyCapture else enemyCapture
captureHud.Visible = true
captureLabel.Text = if phase == "Captured" then "ТОЧКА ЗАХВАЧЕНА · +1"
captureLabel.Text = if phase == "Captured" then Text.tochkaZakhvachena
elseif phase == "Contested" then HunterStrings.hotHints.contest
elseif phase == "UnderFire" then HunterStrings.hotHints.underFire
elseif allied then HunterStrings.hotHints.taking else "СОПЕРНИКИ ЗАХВАТЫВАЮТ"
elseif allied then HunterStrings.hotHints.taking else Text.sopernikiZakhvatyvayut
local percent = math.clamp((match:GetAttribute("HotPointProgress") :: number?) or 0, 0, 100)
captureValue.Text, captureValue.TextColor3 = string.format("%d%%", percent), accent
captureArc:SetAttribute("Accent", accent)
@@ -479,7 +480,7 @@ local function refreshObjective()
local role = if attacking then "▲ " .. RoundStrings.attack else "◆ " .. RoundStrings.defend
local point = (siege:GetAttribute("PointName") :: string?) or ""
local roleColor = if attacking then accent else UI.Gold
objectiveTitle.Text = if phase == "RoleSwap" then RoundStrings.swap else string.format("АТАКА %d/2 · %d:%02d",
objectiveTitle.Text = if phase == "RoleSwap" then RoundStrings.swap else string.format(Text.atakaDDD,
if phase == "Attack2" then 2 else 1, math.floor(seconds / 60), seconds % 60)
objectiveText.Text = role .. (if point ~= "" then " · " .. point else "")
objectiveTitle.TextColor3 = roleColor
@@ -540,15 +541,15 @@ local function refreshObjective()
tick.BackgroundTransparency = if progress + 1e-7 >= i / 10 then 0 else .8
end
end
rateLabel.Text = string.format("СИНИЕ +%d/с ОРАНЖЕВЫЕ +%d/с",
rateLabel.Text = string.format(Text.sinieDSOranzhevye,
(match:GetAttribute("ScoreRate_Blue") :: number?) or 0, (match:GetAttribute("ScoreRate_Orange") :: number?) or 0)
end
local modeHint = playerGui:GetAttribute("ModeHint")
if rule.id ~= "Siege" and typeof(modeHint) == "string" then text = modeHint end
local tokens = (player:GetAttribute("ArenaTokens") :: number?) or 0
if player:GetAttribute("ArenaFlag") and typeof(modeHint) ~= "string" then text = "У вас флаг · Несите его на свою базу"
elseif tokens > 0 and typeof(modeHint) ~= "string" then text = "Жетонов у вас: " .. tokens .. " · Вернитесь на базу"
elseif player:GetAttribute("ArenaLeader") and typeof(modeHint) ~= "string" then text = "Вы лидер · За вас дают 3 очка"
if player:GetAttribute("ArenaFlag") and typeof(modeHint) ~= "string" then text = Text.uVasFlagNesite
elseif tokens > 0 and typeof(modeHint) ~= "string" then text = Text.zhetonovUVas .. tokens .. Text.vernitesNaBazu
elseif player:GetAttribute("ArenaLeader") and typeof(modeHint) ~= "string" then text = Text.vyLiderZaVas
elseif rule.id == "TrophyHunt" and typeof(modeHint) ~= "string" then text = "" end
objectiveStatus.Visible = text ~= ""
objectiveStatus.Text = text
@@ -591,7 +592,7 @@ end
resultsShade:GetPropertyChangedSignal("AbsoluteSize"):Connect(fitResults)
fitResults()
local resultArc = UI.contour(resultsPanel, blue)
local resultTitle = UI.label(resultsPanel, "Title", "ИТОГИ РАУНДА", UDim2.fromOffset(26, 17), UDim2.fromOffset(510, 42), 31, ink)
local resultTitle = UI.label(resultsPanel, "Title", Text.itogiRaunda, UDim2.fromOffset(26, 17), UDim2.fromOffset(510, 42), 31, ink)
resultTitle.FontFace = UI.Display
resultTitle.TextXAlignment = Enum.TextXAlignment.Left
local resultWinner = UI.label(resultsPanel, "Winner", "", UDim2.fromOffset(27, 60), UDim2.fromOffset(510, 25), 17, UI.Gold)
@@ -610,7 +611,7 @@ lobbyButton.BorderSizePixel = 0
lobbyButton.FontFace = UI.Display
lobbyButton.TextSize = 14
lobbyButton.TextColor3 = ink
lobbyButton.Text = "ВЫЙТИ В ЛОББИ"
lobbyButton.Text = Text.vyytiVLobbi
lobbyButton.Visible = false
corners(lobbyButton, 5)
lobbyButton.Parent = resultsPanel
@@ -682,10 +683,10 @@ local function resultTeam(id: string, x: number, name: string, color: Color3, da
score.FontFace = UI.Display
local head = frame("Columns", card, UDim2.fromOffset(12, 73), UDim2.fromOffset(422, 25), panelColor)
head.BackgroundTransparency = 1
local playerHeader = UI.label(head, "Player", "ИГРОК", UDim2.fromOffset(8, 0), UDim2.fromOffset(200, 25), 12, muted)
local playerHeader = UI.label(head, "Player", Text.igrok, UDim2.fromOffset(8, 0), UDim2.fromOffset(200, 25), 12, muted)
playerHeader.TextXAlignment = Enum.TextXAlignment.Left
UI.label(head, "Kills", "УБИЙСТВА", UDim2.fromOffset(241, 0), UDim2.fromOffset(93, 25), 12, muted)
UI.label(head, "Deaths", "СМЕРТИ", UDim2.fromOffset(334, 0), UDim2.fromOffset(86, 25), 12, muted)
UI.label(head, "Kills", Text.ubiystva, UDim2.fromOffset(241, 0), UDim2.fromOffset(93, 25), 12, muted)
UI.label(head, "Deaths", Text.smerti, UDim2.fromOffset(334, 0), UDim2.fromOffset(86, 25), 12, muted)
local rows: {ResultRow} = {}
for i = 1, limit do
local row = UI.element("PlayerRow", card, UDim2.fromOffset(12, 102 + (i - 1) * 35), UDim2.fromOffset(422, 32))
@@ -700,12 +701,12 @@ local function resultTeam(id: string, x: number, name: string, color: Color3, da
kills.FontFace = UI.Display
rows[i] = {body = row, avatar = avatar, name = nameLabel, kills = kills, deaths = deaths}
end
local empty = UI.label(card, "Empty", "В команде не было игроков", UDim2.fromOffset(12, 105), UDim2.fromOffset(422, 54), 15, muted)
local empty = UI.label(card, "Empty", Text.vKomandeNeBylo, UDim2.fromOffset(12, 105), UDim2.fromOffset(422, 54), 15, muted)
return {card = card, score = score, empty = empty, accent = color, rows = rows}
end
local blueResult = resultTeam("Blue", 23, "СИНИЕ", blue, blueDark)
local orangeResult = resultTeam("Orange", 491, "ОРАНЖЕВЫЕ", orange, orangeDark)
local blueResult = resultTeam("Blue", 23, Text.sinie, blue, blueDark)
local orangeResult = resultTeam("Orange", 491, Text.oranzhevye, orange, orangeDark)
local siegeRecap = UI.label(resultsPanel, "SiegeTimes", "", UDim2.fromOffset(30, 0), UDim2.fromOffset(900, 84), 16, ink)
siegeRecap.TextWrapped = true
siegeRecap.TextXAlignment = Enum.TextXAlignment.Left
@@ -726,7 +727,7 @@ local resultFill = resultTrack:WaitForChild("Fill") :: Frame
UI.sheen(resultFill)
local resultEndsAt = 0
local lastResultSecond = -1
local resultsCountdown = "ГОЛОСОВАНИЕ ЧЕРЕЗ %d С"
local resultsCountdown = Text.golosovanieCherezDS
local summaryView: SummaryView? = nil
local resultSlide: Tween? = nil
local resultFade: Tween? = nil
@@ -735,7 +736,7 @@ local resultDrain: Tween? = nil
local function populateResults(team: ResultTeam, score: number, players: {ResultPlayer})
team.score.Text = tostring(score)
team.empty.Visible = #players == 0
team.empty.Text = if summaryView == "Live" then "В команде пока нет игроков" else "В команде не было игроков"
team.empty.Text = if summaryView == "Live" then Text.vKomandePokaNet else Text.vKomandeNeBylo
for i, row in team.rows do
local member = players[i]
row.body.Visible = member ~= nil
@@ -743,7 +744,7 @@ local function populateResults(team: ResultTeam, score: number, players: {Result
setPortrait(row.avatar, member and member.userId, member and member.displayName)
if member then
local self = member.userId == player.UserId
row.name.Text = (if self then "Вы · " else "") .. member.displayName
row.name.Text = (if self then Text.vy else "") .. member.displayName
row.kills.Text = tostring(member.kills)
row.deaths.Text = tostring(member.deaths)
row.body.BackgroundColor3 = panelColor:Lerp(team.accent, if self then .34 elseif i % 2 == 0 then .08 else .15)
@@ -777,11 +778,11 @@ local function startSummary(view: SummaryView, ruleId: unknown)
resultsExtra.Visible = view == "Final"
lobbyButton.Visible = view == "Live" and player:GetAttribute("InArena") == true
resultsGui:SetAttribute("LiveScoreboardOpen", view == "Live")
resultTitle.Text = if view == "Live" then "СТАТИСТИКА МАТЧА" else "ИТОГИ РАУНДА"
resultTitle.Text = if view == "Live" then Text.statistikaMatcha else Text.itogiRaunda
local rule = Rules.get(ruleId)
resultMode.Text = rule.title .. " · Динамическая арена"
resultMode.Text = rule.title .. Text.dinamicheskayaArena
if view == "Live" then
resultWinner.Text = "СЧЁТ · " .. rule.score
resultWinner.Text = Text.schyot .. rule.score
resultWinner.TextColor3 = muted
end
resultsPanel.Position = UDim2.fromScale(.5, .53)
@@ -868,8 +869,8 @@ local function remaining(): number
end
local function updateLiveClock(seconds: number, phase: string, duration: number)
local remainingText = if phase == "Round" then "ДО КОНЦА РАУНДА" else "ДО СЛЕДУЮЩЕГО РАУНДА"
nextRound.Text = string.format("%s %02d:%02d · ОТПУСТИТЕ TAB, ЧТОБЫ ЗАКРЫТЬ", remainingText, seconds // 60, seconds % 60)
local remainingText = if phase == "Round" then Text.doKontsaRaunda else Text.doSleduyuschegoRaunda
nextRound.Text = string.format(Text.sDDOtpustite, remainingText, seconds // 60, seconds % 60)
if resultDrain then resultDrain:Cancel() end
resultDrain = TweenService:Create(resultFill, TweenInfo.new(.22, Enum.EasingStyle.Linear), {
Size = UDim2.fromScale(math.clamp(seconds / math.max(duration, 1), 0, 1), 1),
@@ -961,8 +962,8 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
end
setSummaryTeams(result.blue, result.orange, result.blueScore, result.orangeScore)
local winnerColor = if result.winner == "Blue" then blue elseif result.winner == "Orange" then orange else UI.Gold
resultWinner.Text = if result.winner == "Blue" then "СИНИЕ ПОБЕДИЛИ"
elseif result.winner == "Orange" then "ОРАНЖЕВЫЕ ПОБЕДИЛИ" else "НИЧЬЯ"
resultWinner.Text = if result.winner == "Blue" then Text.siniePobedili
elseif result.winner == "Orange" then Text.oranzhevyePobedili else Text.nichYa
resultReason.Text = result.reason or result.siegeReason or ""
local personal = result.contributions and result.contributions[tostring(player.UserId)] or {}
local entries: {string} = {}
@@ -981,11 +982,11 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
highlights.Text = table.concat(entries, " / ")
if result.ruleset == "Siege" and (participantSide == "Blue" or participantSide == "Orange") then
if result.winner == "Draw" then
showOutcome("НИЧЬЯ", ink)
showOutcome(Text.nichYa, ink)
elseif result.winner == participantSide then
showOutcome("ПОБЕДА", UI.Gold)
showOutcome(Text.pobeda, UI.Gold)
else
showOutcome("ПОРАЖЕНИЕ", Color3.fromRGB(255, 105, 111))
showOutcome(Text.porazhenie, Color3.fromRGB(255, 105, 111))
end
end
resultWinner.TextColor3 = winnerColor
@@ -994,7 +995,7 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
resultFill.Size = UDim2.fromScale(math.clamp(left / result.duration, 0, 1), 1)
resultEndsAt = result.endsAt
lastResultSecond = math.ceil(left)
resultsCountdown = if result.allowModeChange == false then "СЛЕДУЮЩИЙ РАУНД ЧЕРЕЗ %d С" else "ГОЛОСОВАНИЕ ЧЕРЕЗ %d С"
resultsCountdown = if result.allowModeChange == false then Text.sleduyuschiyRaundCherezD else Text.golosovanieCherezDS
nextRound.Text = string.format(resultsCountdown, lastResultSecond)
resultDrain = TweenService:Create(resultFill, TweenInfo.new(left, Enum.EasingStyle.Linear), {Size = UDim2.fromScale(0, 1)})
resultDrain:Play()
@@ -1113,10 +1114,10 @@ local function updateClock()
local rule = Rules.get(activeState():GetAttribute("Ruleset"))
if inArena and (rule.id == "Siege" or rule.id == "Domination" or rule.id == "OneLife") then refreshObjective() end
mode.Visible = true
mode.Text = if intro then RoundStrings.untilStart elseif stage == "RoleSwap" then RoundStrings.swap elseif phase == "Vote" then "ГОЛОСОВАНИЕ" elseif phase == "Reveal" then "ДО НАЧАЛА РАУНДА"
elseif phase == "Break" then (if activeState():GetAttribute("AllowModeChange") == false then "ДО НАЧАЛА РАУНДА" else "ДО ГОЛОСОВАНИЯ")
elseif phase == "Round" then (if inArena then "ДО КОНЦА РАУНДА" else rule.title)
else "ПОДГОТОВКА АРЕНЫ"
mode.Text = if intro then RoundStrings.untilStart elseif stage == "RoleSwap" then RoundStrings.swap elseif phase == "Vote" then Text.golosovanie elseif phase == "Reveal" then Text.doNachalaRaunda
elseif phase == "Break" then (if activeState():GetAttribute("AllowModeChange") == false then Text.doNachalaRaunda else Text.doGolosovaniya)
elseif phase == "Round" then (if inArena then Text.doKontsaRaunda else rule.title)
else Text.podgotovkaAreny
clock.Position = UDim2.fromOffset(0, 14)
clock.TextSize = 32
clock.Text = string.format("%02d:%02d", seconds // 60, seconds % 60)