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

+6 -4
View File
@@ -1,4 +1,6 @@
--!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.CitadelScoreService
local Score = {}
export type Side = "Blue" | "Orange"
export type Ledger = {[Side]: {number}}
@@ -13,16 +15,16 @@ function Score.winner(ledger: Ledger, epsilon: number): (string, string)
local b, o = #ledger.Blue, #ledger.Orange
if b ~= o then
local side = if b > o then "Blue" else "Orange"
return side, side .. " взяли больше рубежей"
return side, side .. Text.vzyaliBolSheRubezhey
end
if b == 0 then return "Draw", "Ничья: обе команды без захватов" end
if b == 0 then return "Draw", Text.nichYaObeKomandy end
local blue, orange = ledger.Blue[b], ledger.Orange[o]
if math.abs(blue - orange) <= epsilon then return "Draw", "Ничья: время захвата совпало" end
if math.abs(blue - orange) <= epsilon then return "Draw", Text.nichYaVremyaZakhvata end
local side = if blue < orange then "Blue" else "Orange"
local function clock(t: number): string
return string.format("%d:%05.2f", math.floor(t / 60), t % 60)
end
return side, string.format("Победа по скорости: %s, рубеж %d (Blue %s, Orange %s)", side, b, clock(blue), clock(orange))
return side, string.format(Text.pobedaPoSkorostiS, side, b, clock(blue), clock(orange))
end
return Score