Compare commits

..
3 Commits
Author SHA1 Message Date
Leshyi c88c3501b3 Centralize Hunter interface strings and verify mobile HUD 2026-11-30 01:35:03 +05:00
Leshyi 16a359d4af Polish arena effects, audio and diagnostics 2026-11-30 01:26:42 +05:00
Leshyi 2774e625c1 45 2026-11-30 00:19:33 +05:00
45 changed files with 1364 additions and 586 deletions

No files matched your search

BIN
View File
Binary file not shown.
+2
View File
@@ -28,6 +28,8 @@
"$ignoreUnknownInstances": true, "$ignoreUnknownInstances": true,
"ArenaRoundHud": { "$path": "scripts/ArenaRoundHud.client.luau" }, "ArenaRoundHud": { "$path": "scripts/ArenaRoundHud.client.luau" },
"HealthBar": { "$path": "scripts/HealthBar.client.luau" }, "HealthBar": { "$path": "scripts/HealthBar.client.luau" },
"ObjectiveArrows": { "$path": "scripts/ObjectiveArrows.client.luau" },
"OwnMovementAudio": { "$path": "scripts/OwnMovementAudio.client.luau" },
"ArenaClient": { "$path": "scripts/ArenaClient" } "ArenaClient": { "$path": "scripts/ArenaClient" }
} }
} }
+46
View File
@@ -0,0 +1,46 @@
# Режимы Hunter
Синие играют против оранжевых на процедурной арене. Общий профиль задаёт 5 секунд на брифинг, 3 на отсчёт, 300 на матч и 30 на финальный рывок. Обычное возрождение и защита после него занимают по 2 секунды. Индивидуальные настройки приведены ниже. Сервер рассчитывает счёт и состояние целей, клиент показывает события и воспроизводит сигналы.
| Режим и профиль | Цель и правила | События и подсказки | Статистика |
| --- | --- | --- | --- |
| Командный бой · `TeamDeathmatch` | Больше устранений за матч. Устранение даёт очко, при равном счёте объявляется ничья. | Лента серий и подсказка о задаче в брифинге. | Командный счёт, убийства и смерти. |
| Горячая точка · `HotPoint` | Захватить текущую зону. Одному нужно 10 секунд, с союзником захват в 1,5 раза быстрее. Соперник оспаривает захват. После захвата цель перемещается. | Начало и оспаривание захвата, схлопывание кольца с дымом, уведомления о захвате и смене точки, указатель направления. | Очки команды и вклад в захват. |
| Три точки · `Domination` | Взять точку за 3 секунды без противника. Каждая удерживаемая точка даёт очко в секунду. | Захват, оспаривание, потеря и полный контроль. Подсказка сообщает состояние зоны. | Командные очки и вклад в контроль. |
| Захват флага · `CaptureFlag` | Забрать флаг с крыши и донести до своей базы. После смерти носителя флаг падает, через 20 секунд возвращается. Доставка даёт очко и возвращает флаг на крышу. | Подбор, падение, возврат и доставка. Маркер носителя и аура свободного флага. | Командный счёт и доставки флага. |
| Охота за жетонами · `TrophyHunt` | Собирать жетоны после устранений и сдавать на своей базе. Жетоны выпадают при гибели носителя. Сданный жетон даёт очко. | Подбор, выпадение, потеря и сдача. На панели виден запас, жетоны на земле мерцают перед исчезновением. | Командный счёт и число сданных жетонов. |
| Штурм · `Siege` | Атакующие удерживают круг 4 секунды и берут рубежи по очереди. Затем команды меняются ролями. Длительность задаёт `CitadelAssaultConfig.MATCH_DURATION`. | Захват рубежа, взятие всех рубежей, смена ролей. Указатель рубежа и подсказки о положении в зоне. | Число рубежей и времена захвата каждой стороны. |
| Одна жизнь · `OneLife` | Выиграть три мини-раунда. В каждом одна жизнь и до 45 секунд. Преимущество получает команда с большим числом живых. Финальный рывок отключён. | Начало и конец мини-раунда, подсказка об одной жизни. | Счёт мини-раундов, обычная статистика боя. |
| Охота на лидера · `HuntLeader` | Защитить своего лидера и устранить вражеского. Обычное устранение даёт одно очко, лидер даёт три. После смерти назначается новый лидер. | Назначение и гибель лидера, маркер цели. | Командные очки и устранения лидеров. |
## Как добавить новый режим
1. Добавить модуль в `scripts/ModeRuntime/Modes` с уникальным `id` и методами из `Types.Mode`. Использовать контекст режима для счёта и очистки.
2. Зарегистрировать режим в `MatchRules.All`.
3. Добавить профиль в `Hunter/ModeProfiles`. Указать цель, три правила и отклонения от общего тайминга.
4. Добавить тексты в `Hunter/Strings` и профиль режима.
5. Подключить провайдер подсказок через `Hunter/Hints` и проверить длину строки.
6. Описать события в `Hunter/EventKinds` и обработать их в `ArenaClient/ModeFeedback`. Для важных переходов использовать два канала из трёх.
7. Покрыть чистую логику тестами и прогнать полный матч, выход и вход, итоги и голосование в Studio.
## QA этапа 4
✓ означает пройденную проверку, ☐ означает отсутствие прогона, — обозначает неприменимый сценарий.
| Сценарий | TDM | HotPoint | Domination | CTF | Trophy | Siege | OneLife | Leader |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Выход среди раунда | ✓ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Вход среди раунда | ✓ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Смерть во время выполнения цели | — | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Команда опустела | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Брифинг блокирует стрельбу и движение | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Начало и конец финального рывка | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | — | ☐ |
| Читаемость HUD и FPS в мобильном эмуляторе | ✓ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Десять полных раундов и проверка соединений и Tween | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ |
| Десять ускоренных серверных циклов режима без игроков | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
В одиночной сессии Play проверены модульные тесты бюджетов и подсказок. После 100 повторов кольца, столба и частиц число эмиттеров осталось 20. При 30 запросах одного звукового эффекта осталось 6 активных экземпляров. В каждом из восьми режимов десять раз вызван серверный шаг с шагом игрового времени 0,1 или 0,2 секунды до завершения режима или истечения его таймера. После очистки число объектов арены возвращалось к исходному и запись матча удалялась. Этот тест не измеряет клиентские соединения и Tween в полных матчах.
В эмуляторе iPhone 17 Pro проверены боевой HUD «Командного боя» в альбомной и портретной ориентациях, выход в лобби и повторный вход посреди раунда. В четырёхсекундной выборке в альбомной ориентации средняя частота составила 60 FPS, самый длинный кадр занял 19 мс. Мобильный пул содержал 10 эмиттеров из допустимых 80. Выборка относится к одиночной сессии Studio и одному режиму.
Оставшиеся русские подписи интерфейса и режимов перенесены в `Hunter/Strings`. Формулировки и порядок подстановки значений сохранены.
+112
View File
@@ -0,0 +1,112 @@
--!strict
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local Input = game:GetService("UserInputService")
local Config = require(RS.Hunter.EffectsConfig)
local Budget = require(RS.Hunter.EffectsBudget)
local profile = Budget.profile(Input.TouchEnabled, Input.KeyboardEnabled)
local localPlayer = Players.LocalPlayer
local root = Instance.new("Folder")
root.Name = "HunterClientVfx"
root.Parent = workspace
type Slot = {part: Part, tween: Tween?, effect: ParticleEmitter?}
local rotation = CFrame.Angles(0, 0, math.pi / 2)
local function pool(name: string, size: number, particles: boolean): () -> Slot
local slots: {Slot} = {}
local cursor = 0
for i = 1, size do
local part = Instance.new("Part")
part.Name = name
part.Anchored, part.CanCollide, part.CanQuery, part.CanTouch = true, false, false, false
part.CastShadow = false
part.Shape, part.Material, part.Transparency = Enum.PartType.Cylinder, Enum.Material.Neon, 1
part.Size = Vector3.one
part.Parent = root
local emitter: ParticleEmitter? = nil
if particles then
emitter = Instance.new("ParticleEmitter")
emitter.Texture = "rbxasset://textures/particles/sparkles_main.dds"
emitter.Rate = 0
emitter.Lifetime = NumberRange.new(.3, .65)
emitter.Speed = NumberRange.new(9, 24)
emitter.SpreadAngle = Vector2.new(145, 145)
emitter.Size = NumberSequence.new(.42, 0)
emitter.LightEmission, emitter.LightInfluence = 1, 0
emitter.Parent = part
end
slots[i] = {part = part, effect = emitter, tween = nil}
end
return function()
cursor = cursor % size + 1
local slot = slots[cursor]
if slot.tween then slot.tween:Cancel(); slot.tween = nil end
if slot.effect then slot.effect:Clear() end
slot.part.Transparency = 1
return slot
end
end
local rings = pool("Ring", profile.worldSlots, false)
local columns = pool("Column", profile.worldSlots, false)
local bursts = pool("Burst", math.min(profile.burstSlots, profile.maxEmitters), true)
local gui = Instance.new("ScreenGui")
gui.Name = "ArenaScreenVfx"
gui.DisplayOrder = 7
gui.ResetOnSpawn = false
gui.Parent = localPlayer:WaitForChild("PlayerGui")
local flash = Instance.new("Frame")
flash.BorderSizePixel = 0
flash.Size = UDim2.fromScale(1, 1)
flash.BackgroundTransparency = 1
flash.Parent = gui
local flashTween: Tween? = nil
local ArenaVfx = {}
local function animate(slot: Slot, seconds: number, props: {[string]: any})
local tween = TweenService:Create(slot.part, TweenInfo.new(math.clamp(seconds, .05, .6), Enum.EasingStyle.Quad, Enum.EasingDirection.Out), props)
slot.tween = tween
tween:Play()
end
function ArenaVfx.ring(at: Vector3, radius: number, color: Color3, seconds: number, inward: boolean?)
local slot = rings()
slot.part.CFrame = CFrame.new(at + Vector3.yAxis * .24) * rotation
local diameter = radius * 2
local start = if inward then diameter else diameter * .55
local finish = if inward then .1 else diameter * 1.6
slot.part.Size = Vector3.new(.1, start, start)
slot.part.Color, slot.part.Transparency = color, .7
animate(slot, seconds, {Size = Vector3.new(.1, finish, finish), Transparency = 1})
end
function ArenaVfx.burst(at: Vector3, color: Color3, count: number, smoke: boolean?)
local amount = Budget.particles(count, profile.scale)
if amount == 0 then return end
local slot = bursts()
slot.part.CFrame = CFrame.new(at + Vector3.yAxis)
local emitter = assert(slot.effect)
emitter.Texture = if smoke then "rbxasset://textures/particles/smoke_main.dds" else "rbxasset://textures/particles/sparkles_main.dds"
emitter.Size = if smoke then NumberSequence.new(2, 8) else NumberSequence.new(.42, 0)
emitter.Transparency = if smoke then NumberSequence.new(.35, 1) else NumberSequence.new(.06, 1)
emitter.Color = ColorSequence.new(color, Color3.new(1, 1, 1))
emitter:Emit(amount)
end
function ArenaVfx.column(at: Vector3, color: Color3)
local slot = columns()
slot.part.CFrame = CFrame.new(at + Vector3.yAxis) * rotation
slot.part.Size = Vector3.new(1, 3, 3)
slot.part.Color, slot.part.Transparency = color, .72
animate(slot, Config.FeedbackSeconds, {CFrame = CFrame.new(at + Vector3.yAxis * 22) * rotation,
Size = Vector3.new(44, 4, 4), Transparency = 1})
end
function ArenaVfx.flash(color: Color3)
if flashTween then flashTween:Cancel() end
flash.BackgroundColor3, flash.BackgroundTransparency = color, .93
flashTween = TweenService:Create(flash, TweenInfo.new(.32), {BackgroundTransparency = 1})
flashTween:Play()
end
return ArenaVfx
@@ -189,6 +189,7 @@ local function update()
elseif stage == "Live" or stage == "FinalPush" then elseif stage == "Live" or stage == "FinalPush" then
if final then if final then
showBanner(Strings.round.final, Strings.round.finalPush[id] or "", now + Config.finalBannerSeconds) showBanner(Strings.round.final, Strings.round.finalPush[id] or "", now + Config.finalBannerSeconds)
Sounds.sound("FinalPush")
elseif oldStage == "Countdown" and wasInArena then elseif oldStage == "Countdown" and wasInArena then
showBanner(Strings.round.fight, "", now + Config.startBannerSeconds) showBanner(Strings.round.fight, "", now + Config.startBannerSeconds)
Sounds.sound("RoundStart") Sounds.sound("RoundStart")
+3 -1
View File
@@ -4,6 +4,8 @@ local rs = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService") local RunService = game:GetService("RunService")
local UI = require(rs:WaitForChild("HunterUI") :: ModuleScript) local UI = require(rs:WaitForChild("HunterUI") :: ModuleScript)
local Sounds = require(rs:WaitForChild("SniperEffects") :: ModuleScript) local Sounds = require(rs:WaitForChild("SniperEffects") :: ModuleScript)
local Input = game:GetService("UserInputService")
local mobile = Input.TouchEnabled and not Input.KeyboardEnabled
local Config = require(rs.CitadelAssaultConfig) local Config = require(rs.CitadelAssaultConfig)
local Strings = require(rs.Hunter.Strings) local Strings = require(rs.Hunter.Strings)
local Hints = require(rs.Hunter.Hints) local Hints = require(rs.Hunter.Hints)
@@ -114,7 +116,7 @@ local function update()
}) })
if pending then table.insert(candidates, pending); pending = nil end if pending then table.insert(candidates, pending); pending = nil end
local chosen = if Config.HintsEnabled then Hints.pick(hints, candidates, workspace:GetServerTimeNow()) else nil local chosen = if Config.HintsEnabled then Hints.pick(hints, candidates, workspace:GetServerTimeNow()) else nil
pg:SetAttribute("SiegeHint", if chosen then chosen.text else nil) pg:SetAttribute("SiegeHint", if chosen then (if mobile then Hints.compact(chosen.text) else chosen.text) else nil)
if zone == "Inside" and previousZone ~= zone then Sounds.sound("SiegeEnter") end if zone == "Inside" and previousZone ~= zone then Sounds.sound("SiegeEnter") end
if zone == "Inside" and status == "Capturing" and attacking then if zone == "Inside" and status == "Capturing" and attacking then
+68 -19
View File
@@ -9,6 +9,10 @@ local S = require(rs.Hunter.Strings)
local Hints = require(rs.Hunter.Hints) local Hints = require(rs.Hunter.Hints)
local Kinds = require(rs.Hunter.EventKinds) local Kinds = require(rs.Hunter.EventKinds)
local Router = require(script.Parent.EventRouter) local Router = require(script.Parent.EventRouter)
local Vfx = require(script.Parent.ArenaVfx)
local Config = require(rs.Hunter.EffectsConfig)
local Input = game:GetService("UserInputService")
local mobile = Input.TouchEnabled and not Input.KeyboardEnabled
local player = Players.LocalPlayer local player = Players.LocalPlayer
local pg = player:WaitForChild("PlayerGui") local pg = player:WaitForChild("PlayerGui")
@@ -25,13 +29,6 @@ local title = UI.label(banner,"Title","",UDim2.fromScale(.02,0),UDim2.fromScale(
title.FontFace = UI.Display title.FontFace = UI.Display
banner.Visible = false banner.Visible = false
local wave = Instance.new("Part")
wave.Name = "LocalObjectiveWave"
wave.Shape, wave.Material = Enum.PartType.Cylinder, Enum.Material.Neon
wave.Anchored, wave.CanCollide, wave.CanTouch, wave.CanQuery = true, false, false, false
wave.Transparency = 1
wave.Parent = workspace
local effect: Tween? = nil
local pending: Hints.Hint? = nil local pending: Hints.Hint? = nil
local activeMode: string? = nil local activeMode: string? = nil
local provider: any = nil local provider: any = nil
@@ -43,19 +40,53 @@ local function tint(side: string?): Color3
end end
local function showWave(at: Vector3, color: Color3) local function showWave(at: Vector3, color: Color3)
if effect then effect:Cancel() end Vfx.ring(at, 18, color, Config.FeedbackSeconds)
wave.CFrame = CFrame.new(at + Vector3.yAxis*.3) * CFrame.Angles(0, 0, math.pi/2)
wave.Size = Vector3.new(.1,12,12)
wave.Color, wave.Transparency = color, .64
effect = TweenService:Create(wave,TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),
{Size=Vector3.new(.1,42,42),Transparency=1})
effect:Play()
end end
local lastFlagAura = 0
local roleColumnAt = 0
local bannerScale = Instance.new("UIScale", banner)
local bannerTween: Tween? = nil
local function adjustScale() bannerScale.Scale = UI.combatScale(gui) end
local resize = gui:GetPropertyChangedSignal("AbsoluteSize"):Connect(adjustScale)
adjustScale()
banner:GetPropertyChangedSignal("Visible"):Connect(function()
if bannerTween then bannerTween:Cancel() end
if not banner.Visible then return end
banner.Position = UDim2.fromScale(.5, .365)
bannerTween = TweenService:Create(banner, TweenInfo.new(Config.BannerMotionSeconds, Enum.EasingStyle.Quart), {Position = UDim2.fromScale(.5, .34)})
bannerTween:Play()
end)
local function event(kind: string, p: any) local function event(kind: string, p: any)
if player:GetAttribute("InArena") ~= true or match:GetAttribute("Phase") ~= "Round" then return end if player:GetAttribute("InArena") ~= true or match:GetAttribute("Phase") ~= "Round" then return end
local id = match:GetAttribute("Ruleset") local id = match:GetAttribute("Ruleset")
local tone = tint(p.side) local tone = tint(p.side)
local at = p.at
if typeof(at) == "Vector3" then
if kind == Kinds.ZoneCaptured and id == "HotPoint" then
Vfx.ring(at, 18, tone, Config.FeedbackSeconds, true)
Vfx.burst(at, tone, 30, true)
elseif kind == Kinds.ZoneCaptured and id == "Siege" then
Vfx.ring(at, 11, tone, Config.FeedbackSeconds)
Vfx.burst(at, tone, 24)
Vfx.flash(UI.Ink)
elseif kind == Kinds.ZoneStarted and id == "Siege" then
Vfx.column(at, UI.Gold)
elseif kind == Kinds.ZoneContested then
Vfx.ring(at, if id == "Siege" then 11 else 18, Config.Danger, .35)
elseif kind == Kinds.FlagDropped or kind == Kinds.FlagReturned or kind == Kinds.FlagScored or kind == Kinds.TokensBanked then
Vfx.burst(at, tone, 16)
elseif kind == Kinds.TokenDropped then
Vfx.burst(at, UI.Gold, 12)
end
end
if kind == Kinds.AllObjectivesTaken then Sounds.sound("AllTaken") end
if kind == Kinds.RoleSwap then Sounds.sound("RoleSwap") end
if kind == Kinds.FlagPicked then Sounds.sound("FlagPicked") end
if kind == Kinds.TokenPicked then Sounds.sound("TokenPick") end
if kind == Kinds.FlagScored then Sounds.sound("FlagScored") end
if kind == Kinds.TokensBanked and p.userId == player.UserId then Sounds.sound("TokensBanked") end
if id == "CaptureFlag" and (kind == Kinds.FlagPicked or kind == Kinds.FlagScored) then if id == "CaptureFlag" and (kind == Kinds.FlagPicked or kind == Kinds.FlagScored) then
contour:SetAttribute("Accent", tone) contour:SetAttribute("Accent", tone)
title.Text = if kind == Kinds.FlagScored then S.flagHints.scored title.Text = if kind == Kinds.FlagScored then S.flagHints.scored
@@ -76,7 +107,7 @@ local function event(kind: string, p: any)
bannerUntil=now+2.5 bannerUntil=now+2.5
end end
if kind==Kinds.LeaderDown then if kind==Kinds.LeaderDown then
Sounds.sound("HotPointCaptured") Sounds.sound("LeaderDown")
if typeof(p.at)=="Vector3" then showWave(p.at,tone) end if typeof(p.at)=="Vector3" then showWave(p.at,tone) end
end end
end end
@@ -87,7 +118,7 @@ local function event(kind: string, p: any)
title.Text=if kind == Kinds.MiniRoundStarted then string.format(copy.begin,p.index or 1,blue,orange) title.Text=if kind == Kinds.MiniRoundStarted then string.format(copy.begin,p.index or 1,blue,orange)
elseif not p.side then copy.draw else string.format(copy.win,S.team(p.side),math.max(blue,orange),math.min(blue,orange)) elseif not p.side then copy.draw else string.format(copy.win,S.team(p.side),math.max(blue,orange),math.min(blue,orange))
bannerUntil=workspace:GetServerTimeNow()+2.8 bannerUntil=workspace:GetServerTimeNow()+2.8
Sounds.sound(if kind==Kinds.MiniRoundStarted then "RoundStart" else "HotPointCaptured") Sounds.sound(if kind==Kinds.MiniRoundStarted then "MiniRoundStart" else "ZoneCaptured")
end end
if id == "TrophyHunt" and p.userId == player.UserId then if id == "TrophyHunt" and p.userId == player.UserId then
if kind == Kinds.TokensBanked then if kind == Kinds.TokensBanked then
@@ -121,6 +152,24 @@ local heartbeat = RunService.Heartbeat:Connect(function(dt)
local now = workspace:GetServerTimeNow() local now = workspace:GetServerTimeNow()
local mode = match:GetAttribute("Ruleset") local mode = match:GetAttribute("Ruleset")
local playing = player:GetAttribute("InArena") == true and match:GetAttribute("Phase")=="Round" local playing = player:GetAttribute("InArena") == true and match:GetAttribute("Phase")=="Round"
if playing and mode == "CaptureFlag" and now - lastFlagAura >= .8 and match:GetAttribute("FlagCarrierSide") == nil then
local at = match:GetAttribute("FlagPosition")
if typeof(at) == "Vector3" then
Vfx.burst(at, UI.Gold, 14)
lastFlagAura = now
end
end
if playing and mode == "Siege" and now - roleColumnAt >= .75 then
local data = match:FindFirstChild("CitadelMatchState")
local at = data and data:GetAttribute("Point")
if data and typeof(at) == "Vector3" and data:GetAttribute("Phase") ~= "RoleSwap" then
local status = data:GetAttribute("Status")
local hue = if status == "Contested" then Config.Danger elseif status == "Idle" then UI.Gold
elseif status == "Decaying" then UI.Muted else tint(data:GetAttribute("Attacker"))
Vfx.column(at, hue)
roleColumnAt = now
end
end
if not playing or typeof(mode)~="string" or mode=="Siege" then if not playing or typeof(mode)~="string" or mode=="Siege" then
activeMode, provider, pending, bannerUntil = nil,nil,nil,0 activeMode, provider, pending, bannerUntil = nil,nil,nil,0
pg:SetAttribute("ModeHint",nil) pg:SetAttribute("ModeHint",nil)
@@ -135,14 +184,14 @@ local heartbeat = RunService.Heartbeat:Connect(function(dt)
local candidates = if provider then provider.candidates(match,player) else {} local candidates = if provider then provider.candidates(match,player) else {}
if pending then table.insert(candidates,pending);pending=nil end if pending then table.insert(candidates,pending);pending=nil end
local hint = Hints.pick(selection,candidates,now) local hint = Hints.pick(selection,candidates,now)
pg:SetAttribute("ModeHint",if hint then hint.text else nil) pg:SetAttribute("ModeHint",if hint then (if mobile then Hints.compact(hint.text) else hint.text) else nil)
local results = pg:FindFirstChild("ArenaResults") local results = pg:FindFirstChild("ArenaResults")
banner.Visible = now<bannerUntil and pg:GetAttribute("HunterVoting")~=true and (not results or results:GetAttribute("LiveScoreboardOpen")~=true) banner.Visible = now<bannerUntil and pg:GetAttribute("HunterVoting")~=true and (not results or results:GetAttribute("LiveScoreboardOpen")~=true)
end) end)
script.Destroying:Once(function() script.Destroying:Once(function()
heartbeat:Disconnect() heartbeat:Disconnect()
for _, remove in subscriptions do remove() end for _, remove in subscriptions do remove() end
if effect then effect:Cancel() end resize:Disconnect()
wave:Destroy() if bannerTween then bannerTween:Cancel() end
gui:Destroy() gui:Destroy()
end) end)
+22 -2
View File
@@ -11,8 +11,8 @@ local match=rs:WaitForChild("ArenaRound"):WaitForChild("Procedural")
local gui=Instance.new("ScreenGui") local gui=Instance.new("ScreenGui")
gui.Name,gui.DisplayOrder,gui.ResetOnSpawn="TrophyCounter",23,false gui.Name,gui.DisplayOrder,gui.ResetOnSpawn="TrophyCounter",23,false
gui.Parent=player:WaitForChild("PlayerGui") gui.Parent=player:WaitForChild("PlayerGui")
local plate=UI.plate(gui,"Coins",UDim2.new(1,-16,1,-80),UDim2.fromOffset(106,48),UI.Gold) local plate=UI.plate(gui,"Coins",UDim2.new(.5,0,1,-85),UDim2.fromOffset(106,48),UI.Gold)
plate.AnchorPoint=Vector2.new(1,1) plate.AnchorPoint=Vector2.new(.5,1)
local art=UI.element("GoldCoin",plate,UDim2.fromOffset(6,4),UDim2.fromOffset(40,40)) :: Frame local art=UI.element("GoldCoin",plate,UDim2.fromOffset(6,4),UDim2.fromOffset(40,40)) :: Frame
local rig=UI.bindCoin(art) local rig=UI.bindCoin(art)
local label=UI.label(plate,"Count","×0",UDim2.fromOffset(47,0),UDim2.fromOffset(52,48),24,UI.Gold) local label=UI.label(plate,"Count","×0",UDim2.fromOffset(47,0),UDim2.fromOffset(52,48),24,UI.Gold)
@@ -35,7 +35,24 @@ local function update()
end end
local connections={player:GetAttributeChangedSignal("ArenaTokens"):Connect(update),player:GetAttributeChangedSignal("InArena"):Connect(update), local connections={player:GetAttributeChangedSignal("ArenaTokens"):Connect(update),player:GetAttributeChangedSignal("InArena"):Connect(update),
match:GetAttributeChangedSignal("Ruleset"):Connect(update),match:GetAttributeChangedSignal("Phase"):Connect(update)} match:GetAttributeChangedSignal("Ruleset"):Connect(update),match:GetAttributeChangedSignal("Phase"):Connect(update)}
local tokens: {[BasePart]: boolean} = {}
local arena = workspace:WaitForChild("ProceduralArena")
local function add(item: Instance)
if item:IsA("BasePart") and item.Name == "Tokens" then tokens[item] = true end
end
for _, item in arena:GetDescendants() do add(item) end
local created = arena.DescendantAdded:Connect(add)
local removed = arena.DescendantRemoving:Connect(function(item)
if item:IsA("BasePart") then tokens[item] = nil end
end)
local draw=RunService.RenderStepped:Connect(function() local draw=RunService.RenderStepped:Connect(function()
local now = workspace:GetServerTimeNow()
for token in tokens do
local deadline = token:GetAttribute("TokenExpiresAt")
local flashSeconds = token:GetAttribute("TokenFlashSeconds")
local flashing = typeof(deadline) == "number" and typeof(flashSeconds) == "number" and deadline - now <= flashSeconds
token.LocalTransparencyModifier = if flashing then .32 + .26 * math.sin(now * math.pi * 2 / .76) else 0
end
if not gui.Enabled then return end if not gui.Enabled then return end
local t=os.clock() local t=os.clock()
UI.spinCoin(rig,t*2,math.max(0,math.cos(t*2))*.55,t%1) UI.spinCoin(rig,t*2,math.max(0,math.cos(t*2))*.55,t%1)
@@ -70,6 +87,9 @@ end)
update() update()
script.Destroying:Once(function() script.Destroying:Once(function()
draw:Disconnect() draw:Disconnect()
created:Disconnect()
removed:Disconnect()
for token in tokens do token.LocalTransparencyModifier = 0 end
for _, cn in connections do cn:Disconnect() end for _, cn in connections do cn:Disconnect() end
off() off()
for _, coin in pool do for _, coin in pool do
+53
View File
@@ -0,0 +1,53 @@
--!strict
local RS = game:GetService("ReplicatedStorage")
local Config = require(RS.Hunter.EffectsConfig)
if not Config.Debug then return end
local Players = game:GetService("Players")
local UI = require(RS:WaitForChild("HunterUI") :: ModuleScript)
local player = Players.LocalPlayer
local match = RS:WaitForChild("ArenaRound"):WaitForChild("Procedural")
local gui = Instance.new("ScreenGui")
gui.Name = "ArenaZoneDebug"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
local label = UI.label(gui, "Metrics", "", UDim2.new(.5, -180, 0, 10), UDim2.fromOffset(360, 25), 15, UI.Gold)
local function part(name: string): Part
local p = Instance.new("Part")
p.Name = name
p.Transparency = 1
p.Anchored, p.CanCollide, p.CanTouch, p.CanQuery = true, false, false, false
p.Parent = workspace
return p
end
local line, bounds = part("DebugSight"), part("DebugRadius")
bounds.Shape = Enum.PartType.Cylinder
local running = true
task.spawn(function()
while running do
local siege = match:FindFirstChild("CitadelMatchState")
local position = if siege then siege:GetAttribute("Point") else match:GetAttribute("HotPointPosition")
local root = player.Character and player.Character.PrimaryPart
label.Text = string.format("Ray %d / %d · Events/s %d · %s", match:GetAttribute("DebugRays") or 0,
match:GetAttribute("DebugFighters") or 0, match:GetAttribute("DebugEvents") or 0, player:GetAttribute("CitadelZone") or "—")
if root and typeof(position) == "Vector3" then
local r = if siege then siege:GetAttribute("Radius") or 11 else 18
bounds.Size = Vector3.new(.12,r*2,r*2)
bounds.CFrame = CFrame.new(position + Vector3.yAxis * .1) * CFrame.Angles(0,0,math.pi/2)
bounds.Color, bounds.Transparency = UI.Gold, .82
local target = position + Vector3.yAxis * 2
line.CFrame = CFrame.lookAt((root.Position + target) / 2,target)
line.Size = Vector3.new(.07,.07,(root.Position-target).Magnitude)
line.Color = if player:GetAttribute("CitadelZone") == "Blocked" then Config.Danger else UI.Mint
line.Transparency = .3
else
bounds.Transparency, line.Transparency = 1, 1
end
task.wait(.2)
end
end)
script.Destroying:Once(function()
running = false
line:Destroy()
bounds:Destroy()
gui:Destroy()
end)
+9 -7
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.ArenaObjectiveSites
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Modes = require(ReplicatedStorage:WaitForChild("ArenaModes") :: ModuleScript) local Modes = require(ReplicatedStorage:WaitForChild("ArenaModes") :: ModuleScript)
@@ -32,13 +34,13 @@ function Sites.resolve(id: string): Map
local gallery = {Vector3.new(0, level, 44), Vector3.new(0, level, -44)} local gallery = {Vector3.new(0, level, 44), Vector3.new(0, level, -44)}
local roof = {Vector3.yAxis * level * 2, Vector3.new(0, level * 2, 12)} local roof = {Vector3.yAxis * level * 2, Vector3.new(0, level * 2, 12)}
return { return {
blue = find("База синих", {-base}).position, blue = find(Text.bazaSinikh, {-base}).position,
orange = find("База оранжевых", {base}).position, orange = find(Text.bazaOranzhevykh, {base}).position,
ground = find("Нижний проход", {Vector3.zero, Vector3.new(0, 0, 6)}), ground = find(Text.nizhniyProkhod, {Vector3.zero, Vector3.new(0, 0, 6)}),
gallery = find("Средняя галерея", gallery), gallery = find(Text.srednyayaGalereya, gallery),
roof = find("Крыша цитадели", roof), roof = find(Text.kryshaTsitadeli, roof),
west = find("Западный фланг", {Vector3.new(-162.6, 0, 0), Vector3.new(-145, 0, 0), Vector3.new(-120, 0, 0)}), west = find(Text.zapadnyyFlang, {Vector3.new(-162.6, 0, 0), Vector3.new(-145, 0, 0), Vector3.new(-120, 0, 0)}),
east = find("Восточный фланг", {Vector3.new(162.6, 0, 0), Vector3.new(145, 0, 0), Vector3.new(120, 0, 0)}), east = find(Text.vostochnyyFlang, {Vector3.new(162.6, 0, 0), Vector3.new(145, 0, 0), Vector3.new(120, 0, 0)}),
} }
end end
+12 -1
View File
@@ -4,6 +4,8 @@ local Runtime = script.Parent:WaitForChild("ModeRuntime")
local Types = require(Runtime:WaitForChild("Types") :: ModuleScript) local Types = require(Runtime:WaitForChild("Types") :: ModuleScript)
local Context = require(Runtime:WaitForChild("Context") :: ModuleScript) local Context = require(Runtime:WaitForChild("Context") :: ModuleScript)
local Diagnostics = require(Runtime:WaitForChild("ZoneDiagnostics") :: ModuleScript)
export type Match = { export type Match = {
step: (number) -> boolean, kill: (Player, Player, Vector3, number) -> (), step: (number) -> boolean, kill: (Player, Player, Vector3, number) -> (),
hit: ((Player, number, boolean) -> ())?, hit: ((Player, number, boolean) -> ())?,
@@ -41,6 +43,7 @@ function Objectives.start(config: Types.Config): Match
end end
local instance = result :: Types.ModeInstance local instance = result :: Types.ModeInstance
local lastStep = ctx.liveAt local lastStep = ctx.liveAt
local profileLabel = "Mode." .. mode.id .. ".step"
local destroyed = false local destroyed = false
local match: Match local match: Match
match = { match = {
@@ -48,7 +51,14 @@ function Objectives.start(config: Types.Config): Match
if destroyed then return false end if destroyed then return false end
local elapsed = math.max(0, now - lastStep) local elapsed = math.max(0, now - lastStep)
lastStep = now lastStep = now
return instance.step(now, math.min(elapsed, .5), Context.collect(ctx.members()), elapsed) debug.profilebegin(profileLabel)
Diagnostics.begin()
local fighters = Context.collect(ctx.members())
local ok, ended = pcall(instance.step, now, math.min(elapsed, .5), fighters, elapsed)
Diagnostics.finish(ctx.state, #fighters, now)
debug.profileend()
if not ok then error(ended, 0) end
return ended
end, end,
kill = instance.kill, hit = instance.hit, death = instance.death, leaving = instance.leaving, kill = instance.kill, hit = instance.hit, death = instance.death, leaving = instance.leaving,
winner = function() winner = function()
@@ -65,6 +75,7 @@ function Objectives.start(config: Types.Config): Match
ctx.folder:Destroy() ctx.folder:Destroy()
ctx.status("") ctx.status("")
ctx.state:SetAttribute("RoundStage", nil) ctx.state:SetAttribute("RoundStage", nil)
for _, attr in {"DebugRays", "DebugFighters", "DebugEvents"} do ctx.state:SetAttribute(attr, nil) end
if not ok then warn(issue) end if not ok then warn(issue) end
end, end,
} }
+36 -34
View File
@@ -22,6 +22,7 @@ local objectiveCueConnection = objectiveCue.OnClientEvent:Connect(function(captu
end) end)
local Hunter = ReplicatedStorage:WaitForChild("Hunter") local Hunter = ReplicatedStorage:WaitForChild("Hunter")
local HunterStrings = require(Hunter:WaitForChild("Strings") :: ModuleScript) local HunterStrings = require(Hunter:WaitForChild("Strings") :: ModuleScript)
local Text = HunterStrings.interface.ArenaRoundHud
local RoundStrings = HunterStrings.round local RoundStrings = HunterStrings.round
local SiegeResults = require(Hunter:WaitForChild("SiegeResults") :: ModuleScript) local SiegeResults = require(Hunter:WaitForChild("SiegeResults") :: ModuleScript)
local SiegeConfig = require(ReplicatedStorage:WaitForChild("CitadelAssaultConfig") :: ModuleScript) local SiegeConfig = require(ReplicatedStorage:WaitForChild("CitadelAssaultConfig") :: ModuleScript)
@@ -332,7 +333,7 @@ local function showCountdownBeat(seconds: number)
digitMotion:Play() digitMotion:Play()
echoMotion:Play() echoMotion:Play()
echoFade:Play() echoFade:Play()
countdownSound = Sounds.sound("RoundCountdown") countdownSound = Sounds.sound("Countdown")
end end
local teamStats = UI.plate(hudLayout, "TeamKillStats", UDim2.fromOffset(15, 74), UDim2.fromOffset(widthOfCard, 55), UI.Outline) local teamStats = UI.plate(hudLayout, "TeamKillStats", UDim2.fromOffset(15, 74), UDim2.fromOffset(widthOfCard, 55), UI.Outline)
@@ -429,10 +430,10 @@ local function refreshCapture()
captureCueTeam, captureCuePhase = if phase == "Captured" then nil else side, phase captureCueTeam, captureCuePhase = if phase == "Captured" then nil else side, phase
local accent = if not side then UI.Gold elseif allied then allyCapture else enemyCapture local accent = if not side then UI.Gold elseif allied then allyCapture else enemyCapture
captureHud.Visible = true 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 == "Contested" then HunterStrings.hotHints.contest
elseif phase == "UnderFire" then HunterStrings.hotHints.underFire 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) local percent = math.clamp((match:GetAttribute("HotPointProgress") :: number?) or 0, 0, 100)
captureValue.Text, captureValue.TextColor3 = string.format("%d%%", percent), accent captureValue.Text, captureValue.TextColor3 = string.format("%d%%", percent), accent
captureArc:SetAttribute("Accent", accent) captureArc:SetAttribute("Accent", accent)
@@ -479,7 +480,7 @@ local function refreshObjective()
local role = if attacking then "▲ " .. RoundStrings.attack else "◆ " .. RoundStrings.defend local role = if attacking then "▲ " .. RoundStrings.attack else "◆ " .. RoundStrings.defend
local point = (siege:GetAttribute("PointName") :: string?) or "" local point = (siege:GetAttribute("PointName") :: string?) or ""
local roleColor = if attacking then accent else UI.Gold 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) if phase == "Attack2" then 2 else 1, math.floor(seconds / 60), seconds % 60)
objectiveText.Text = role .. (if point ~= "" then " · " .. point else "") objectiveText.Text = role .. (if point ~= "" then " · " .. point else "")
objectiveTitle.TextColor3 = roleColor objectiveTitle.TextColor3 = roleColor
@@ -540,15 +541,15 @@ local function refreshObjective()
tick.BackgroundTransparency = if progress + 1e-7 >= i / 10 then 0 else .8 tick.BackgroundTransparency = if progress + 1e-7 >= i / 10 then 0 else .8
end end
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) (match:GetAttribute("ScoreRate_Blue") :: number?) or 0, (match:GetAttribute("ScoreRate_Orange") :: number?) or 0)
end end
local modeHint = playerGui:GetAttribute("ModeHint") local modeHint = playerGui:GetAttribute("ModeHint")
if rule.id ~= "Siege" and typeof(modeHint) == "string" then text = modeHint end if rule.id ~= "Siege" and typeof(modeHint) == "string" then text = modeHint end
local tokens = (player:GetAttribute("ArenaTokens") :: number?) or 0 local tokens = (player:GetAttribute("ArenaTokens") :: number?) or 0
if player:GetAttribute("ArenaFlag") and typeof(modeHint) ~= "string" then text = "У вас флаг · Несите его на свою базу" if player:GetAttribute("ArenaFlag") and typeof(modeHint) ~= "string" then text = Text.uVasFlagNesite
elseif tokens > 0 and typeof(modeHint) ~= "string" then text = "Жетонов у вас: " .. tokens .. " · Вернитесь на базу" elseif tokens > 0 and typeof(modeHint) ~= "string" then text = Text.zhetonovUVas .. tokens .. Text.vernitesNaBazu
elseif player:GetAttribute("ArenaLeader") and typeof(modeHint) ~= "string" then text = "Вы лидер · За вас дают 3 очка" elseif player:GetAttribute("ArenaLeader") and typeof(modeHint) ~= "string" then text = Text.vyLiderZaVas
elseif rule.id == "TrophyHunt" and typeof(modeHint) ~= "string" then text = "" end elseif rule.id == "TrophyHunt" and typeof(modeHint) ~= "string" then text = "" end
objectiveStatus.Visible = text ~= "" objectiveStatus.Visible = text ~= ""
objectiveStatus.Text = text objectiveStatus.Text = text
@@ -591,7 +592,7 @@ end
resultsShade:GetPropertyChangedSignal("AbsoluteSize"):Connect(fitResults) resultsShade:GetPropertyChangedSignal("AbsoluteSize"):Connect(fitResults)
fitResults() fitResults()
local resultArc = UI.contour(resultsPanel, blue) 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.FontFace = UI.Display
resultTitle.TextXAlignment = Enum.TextXAlignment.Left resultTitle.TextXAlignment = Enum.TextXAlignment.Left
local resultWinner = UI.label(resultsPanel, "Winner", "", UDim2.fromOffset(27, 60), UDim2.fromOffset(510, 25), 17, UI.Gold) 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.FontFace = UI.Display
lobbyButton.TextSize = 14 lobbyButton.TextSize = 14
lobbyButton.TextColor3 = ink lobbyButton.TextColor3 = ink
lobbyButton.Text = "ВЫЙТИ В ЛОББИ" lobbyButton.Text = Text.vyytiVLobbi
lobbyButton.Visible = false lobbyButton.Visible = false
corners(lobbyButton, 5) corners(lobbyButton, 5)
lobbyButton.Parent = resultsPanel lobbyButton.Parent = resultsPanel
@@ -682,10 +683,10 @@ local function resultTeam(id: string, x: number, name: string, color: Color3, da
score.FontFace = UI.Display score.FontFace = UI.Display
local head = frame("Columns", card, UDim2.fromOffset(12, 73), UDim2.fromOffset(422, 25), panelColor) local head = frame("Columns", card, UDim2.fromOffset(12, 73), UDim2.fromOffset(422, 25), panelColor)
head.BackgroundTransparency = 1 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 playerHeader.TextXAlignment = Enum.TextXAlignment.Left
UI.label(head, "Kills", "УБИЙСТВА", UDim2.fromOffset(241, 0), UDim2.fromOffset(93, 25), 12, muted) UI.label(head, "Kills", Text.ubiystva, 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, "Deaths", Text.smerti, UDim2.fromOffset(334, 0), UDim2.fromOffset(86, 25), 12, muted)
local rows: {ResultRow} = {} local rows: {ResultRow} = {}
for i = 1, limit do for i = 1, limit do
local row = UI.element("PlayerRow", card, UDim2.fromOffset(12, 102 + (i - 1) * 35), UDim2.fromOffset(422, 32)) 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 kills.FontFace = UI.Display
rows[i] = {body = row, avatar = avatar, name = nameLabel, kills = kills, deaths = deaths} rows[i] = {body = row, avatar = avatar, name = nameLabel, kills = kills, deaths = deaths}
end 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} return {card = card, score = score, empty = empty, accent = color, rows = rows}
end end
local blueResult = resultTeam("Blue", 23, "СИНИЕ", blue, blueDark) local blueResult = resultTeam("Blue", 23, Text.sinie, blue, blueDark)
local orangeResult = resultTeam("Orange", 491, "ОРАНЖЕВЫЕ", orange, orangeDark) 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) local siegeRecap = UI.label(resultsPanel, "SiegeTimes", "", UDim2.fromOffset(30, 0), UDim2.fromOffset(900, 84), 16, ink)
siegeRecap.TextWrapped = true siegeRecap.TextWrapped = true
siegeRecap.TextXAlignment = Enum.TextXAlignment.Left siegeRecap.TextXAlignment = Enum.TextXAlignment.Left
@@ -726,7 +727,7 @@ local resultFill = resultTrack:WaitForChild("Fill") :: Frame
UI.sheen(resultFill) UI.sheen(resultFill)
local resultEndsAt = 0 local resultEndsAt = 0
local lastResultSecond = -1 local lastResultSecond = -1
local resultsCountdown = "ГОЛОСОВАНИЕ ЧЕРЕЗ %d С" local resultsCountdown = Text.golosovanieCherezDS
local summaryView: SummaryView? = nil local summaryView: SummaryView? = nil
local resultSlide: Tween? = nil local resultSlide: Tween? = nil
local resultFade: Tween? = nil local resultFade: Tween? = nil
@@ -735,7 +736,7 @@ local resultDrain: Tween? = nil
local function populateResults(team: ResultTeam, score: number, players: {ResultPlayer}) local function populateResults(team: ResultTeam, score: number, players: {ResultPlayer})
team.score.Text = tostring(score) team.score.Text = tostring(score)
team.empty.Visible = #players == 0 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 for i, row in team.rows do
local member = players[i] local member = players[i]
row.body.Visible = member ~= nil 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) setPortrait(row.avatar, member and member.userId, member and member.displayName)
if member then if member then
local self = member.userId == player.UserId 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.kills.Text = tostring(member.kills)
row.deaths.Text = tostring(member.deaths) 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) 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" resultsExtra.Visible = view == "Final"
lobbyButton.Visible = view == "Live" and player:GetAttribute("InArena") == true lobbyButton.Visible = view == "Live" and player:GetAttribute("InArena") == true
resultsGui:SetAttribute("LiveScoreboardOpen", view == "Live") 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) local rule = Rules.get(ruleId)
resultMode.Text = rule.title .. " · Динамическая арена" resultMode.Text = rule.title .. Text.dinamicheskayaArena
if view == "Live" then if view == "Live" then
resultWinner.Text = "СЧЁТ · " .. rule.score resultWinner.Text = Text.schyot .. rule.score
resultWinner.TextColor3 = muted resultWinner.TextColor3 = muted
end end
resultsPanel.Position = UDim2.fromScale(.5, .53) resultsPanel.Position = UDim2.fromScale(.5, .53)
@@ -868,8 +869,8 @@ local function remaining(): number
end end
local function updateLiveClock(seconds: number, phase: string, duration: number) local function updateLiveClock(seconds: number, phase: string, duration: number)
local remainingText = if phase == "Round" then "ДО КОНЦА РАУНДА" else "ДО СЛЕДУЮЩЕГО РАУНДА" local remainingText = if phase == "Round" then Text.doKontsaRaunda else Text.doSleduyuschegoRaunda
nextRound.Text = string.format("%s %02d:%02d · ОТПУСТИТЕ TAB, ЧТОБЫ ЗАКРЫТЬ", remainingText, seconds // 60, seconds % 60) nextRound.Text = string.format(Text.sDDOtpustite, remainingText, seconds // 60, seconds % 60)
if resultDrain then resultDrain:Cancel() end if resultDrain then resultDrain:Cancel() end
resultDrain = TweenService:Create(resultFill, TweenInfo.new(.22, Enum.EasingStyle.Linear), { resultDrain = TweenService:Create(resultFill, TweenInfo.new(.22, Enum.EasingStyle.Linear), {
Size = UDim2.fromScale(math.clamp(seconds / math.max(duration, 1), 0, 1), 1), Size = UDim2.fromScale(math.clamp(seconds / math.max(duration, 1), 0, 1), 1),
@@ -952,6 +953,7 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
if left <= 0 then return end if left <= 0 then return end
if resultsShade.Visible then hideResults() end if resultsShade.Visible then hideResults() end
startSummary("Final", result.ruleset) startSummary("Final", result.ruleset)
Sounds.sound("Results")
if result.ruleset == "Siege" and result.siegeTimes then if result.ruleset == "Siege" and result.siegeTimes then
local lines = SiegeResults.rows(result.siegeTimes, SiegeConfig.MAX_OBJECTIVES) local lines = SiegeResults.rows(result.siegeTimes, SiegeConfig.MAX_OBJECTIVES)
table.insert(lines, SiegeResults.tiebreak) table.insert(lines, SiegeResults.tiebreak)
@@ -960,8 +962,8 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
end end
setSummaryTeams(result.blue, result.orange, result.blueScore, result.orangeScore) 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 local winnerColor = if result.winner == "Blue" then blue elseif result.winner == "Orange" then orange else UI.Gold
resultWinner.Text = if result.winner == "Blue" then "СИНИЕ ПОБЕДИЛИ" resultWinner.Text = if result.winner == "Blue" then Text.siniePobedili
elseif result.winner == "Orange" then "ОРАНЖЕВЫЕ ПОБЕДИЛИ" else "НИЧЬЯ" elseif result.winner == "Orange" then Text.oranzhevyePobedili else Text.nichYa
resultReason.Text = result.reason or result.siegeReason or "" resultReason.Text = result.reason or result.siegeReason or ""
local personal = result.contributions and result.contributions[tostring(player.UserId)] or {} local personal = result.contributions and result.contributions[tostring(player.UserId)] or {}
local entries: {string} = {} local entries: {string} = {}
@@ -980,11 +982,11 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
highlights.Text = table.concat(entries, " / ") highlights.Text = table.concat(entries, " / ")
if result.ruleset == "Siege" and (participantSide == "Blue" or participantSide == "Orange") then if result.ruleset == "Siege" and (participantSide == "Blue" or participantSide == "Orange") then
if result.winner == "Draw" then if result.winner == "Draw" then
showOutcome("НИЧЬЯ", ink) showOutcome(Text.nichYa, ink)
elseif result.winner == participantSide then elseif result.winner == participantSide then
showOutcome("ПОБЕДА", UI.Gold) showOutcome(Text.pobeda, UI.Gold)
else else
showOutcome("ПОРАЖЕНИЕ", Color3.fromRGB(255, 105, 111)) showOutcome(Text.porazhenie, Color3.fromRGB(255, 105, 111))
end end
end end
resultWinner.TextColor3 = winnerColor resultWinner.TextColor3 = winnerColor
@@ -993,7 +995,7 @@ results.OnClientEvent:Connect(function(result: RoundResult, participantSide: str
resultFill.Size = UDim2.fromScale(math.clamp(left / result.duration, 0, 1), 1) resultFill.Size = UDim2.fromScale(math.clamp(left / result.duration, 0, 1), 1)
resultEndsAt = result.endsAt resultEndsAt = result.endsAt
lastResultSecond = math.ceil(left) 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) nextRound.Text = string.format(resultsCountdown, lastResultSecond)
resultDrain = TweenService:Create(resultFill, TweenInfo.new(left, Enum.EasingStyle.Linear), {Size = UDim2.fromScale(0, 1)}) resultDrain = TweenService:Create(resultFill, TweenInfo.new(left, Enum.EasingStyle.Linear), {Size = UDim2.fromScale(0, 1)})
resultDrain:Play() resultDrain:Play()
@@ -1112,10 +1114,10 @@ local function updateClock()
local rule = Rules.get(activeState():GetAttribute("Ruleset")) local rule = Rules.get(activeState():GetAttribute("Ruleset"))
if inArena and (rule.id == "Siege" or rule.id == "Domination" or rule.id == "OneLife") then refreshObjective() end if inArena and (rule.id == "Siege" or rule.id == "Domination" or rule.id == "OneLife") then refreshObjective() end
mode.Visible = true mode.Visible = true
mode.Text = if intro then RoundStrings.untilStart elseif stage == "RoleSwap" then RoundStrings.swap elseif phase == "Vote" then "ГОЛОСОВАНИЕ" elseif phase == "Reveal" then "ДО НАЧАЛА РАУНДА" 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 "ДО НАЧАЛА РАУНДА" else "ДО ГОЛОСОВАНИЯ") elseif phase == "Break" then (if activeState():GetAttribute("AllowModeChange") == false then Text.doNachalaRaunda else Text.doGolosovaniya)
elseif phase == "Round" then (if inArena then "ДО КОНЦА РАУНДА" else rule.title) elseif phase == "Round" then (if inArena then Text.doKontsaRaunda else rule.title)
else "ПОДГОТОВКА АРЕНЫ" else Text.podgotovkaAreny
clock.Position = UDim2.fromOffset(0, 14) clock.Position = UDim2.fromOffset(0, 14)
clock.TextSize = 32 clock.TextSize = 32
clock.Text = string.format("%02d:%02d", seconds // 60, seconds % 60) clock.Text = string.format("%02d:%02d", seconds // 60, seconds % 60)
+4 -3
View File
@@ -13,6 +13,7 @@ local Timeline = require(Hunter:WaitForChild("Timeline") :: ModuleScript)
local Stage = require(Hunter:WaitForChild("Stage") :: ModuleScript) local Stage = require(Hunter:WaitForChild("Stage") :: ModuleScript)
local RoundConfig = require(Hunter:WaitForChild("RoundConfig") :: ModuleScript) local RoundConfig = require(Hunter:WaitForChild("RoundConfig") :: ModuleScript)
local Strings = require(Hunter:WaitForChild("Strings") :: ModuleScript) local Strings = require(Hunter:WaitForChild("Strings") :: ModuleScript)
local Text = Strings.interface.ArenaRounds
local Runtime = script.Parent:WaitForChild("ModeRuntime") local Runtime = script.Parent:WaitForChild("ModeRuntime")
local RoundPlayer = require(Runtime:WaitForChild("PlayerRoundState") :: ModuleScript) local RoundPlayer = require(Runtime:WaitForChild("PlayerRoundState") :: ModuleScript)
local Stats = require(Runtime:WaitForChild("Stats") :: ModuleScript) local Stats = require(Runtime:WaitForChild("Stats") :: ModuleScript)
@@ -70,8 +71,8 @@ local pendingJoins: {[Player]: PendingJoin} = {}
local matches: {[string]: Match} = { local matches: {[string]: Match} = {
[Modes.Procedural] = { [Modes.Procedural] = {
id = Modes.Procedural, state = randomState, id = Modes.Procedural, state = randomState,
blue = makeTeam("Синие", BrickColor.new("Cyan")), blue = makeTeam(Text.sinie, BrickColor.new("Cyan")),
orange = makeTeam("Оранжевые", BrickColor.new("Deep orange")), orange = makeTeam(Text.oranzhevye, BrickColor.new("Deep orange")),
phase = "Setup", endsAt = 0, order = 0, rule = Rules.Default, allowModeChange = true, eligible = {}, ballots = {}, phase = "Setup", endsAt = 0, order = 0, rule = Rules.Default, allowModeChange = true, eligible = {}, ballots = {},
}, },
} }
@@ -305,7 +306,7 @@ local function spawnCharacter(player: Player, previous: Model?)
if player.Parent ~= Players or player.Character ~= previous then return end if player.Parent ~= Players or player.Character ~= previous then return end
local ok, issue = pcall(player.LoadCharacterAsync, player) local ok, issue = pcall(player.LoadCharacterAsync, player)
if ok then return end if ok then return end
warn("Не удалось возродить игрока:", issue) warn(Text.neUdalosVozroditIgroka, issue)
if attempt == 1 then task.wait(1) end if attempt == 1 then task.wait(1) end
end end
end end
+6 -4
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.CitadelScoreService
local Score = {} local Score = {}
export type Side = "Blue" | "Orange" export type Side = "Blue" | "Orange"
export type Ledger = {[Side]: {number}} 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 local b, o = #ledger.Blue, #ledger.Orange
if b ~= o then if b ~= o then
local side = if b > o then "Blue" else "Orange" local side = if b > o then "Blue" else "Orange"
return side, side .. " взяли больше рубежей" return side, side .. Text.vzyaliBolSheRubezhey
end 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] 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 side = if blue < orange then "Blue" else "Orange"
local function clock(t: number): string local function clock(t: number): string
return string.format("%d:%05.2f", math.floor(t / 60), t % 60) return string.format("%d:%05.2f", math.floor(t / 60), t % 60)
end 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 end
return Score return Score
+4 -2
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.DamageNumbers
-- LocalScript in StarterPlayerScripts. -- LocalScript in StarterPlayerScripts.
-- Floating damage numbers for the shooter: the server confirms each hit -- Floating damage numbers for the shooter: the server confirms each hit
-- (ReplicatedStorage.SniperHit: position, damage, zone, killed) and the number pops out where the -- (ReplicatedStorage.SniperHit: position, damage, zone, killed) and the number pops out where the
@@ -132,11 +134,11 @@ local function popup(position: Vector3, damage: number, zone: string, killed: bo
else else
skullIcon(group).LayoutOrder = 0 skullIcon(group).LayoutOrder = 0
end end
local caption = textLabel(group, if zone == "Head" then "Хедшот!" else "Убит!", 22, Color3.new(1, 1, 1), Color3.fromRGB(20, 20, 28), 2.5) local caption = textLabel(group, if zone == "Head" then Text.khedshot else Text.ubit, 22, Color3.new(1, 1, 1), Color3.fromRGB(20, 20, 28), 2.5)
caption.Font = Enum.Font.GothamBlack caption.Font = Enum.Font.GothamBlack
caption.LayoutOrder = 1 caption.LayoutOrder = 1
elseif zone == "Head" then elseif zone == "Head" then
local crit = textLabel(group, "КРИТ", 24, CRIT_COLOR, Color3.new(1, 1, 1), 2.5) local crit = textLabel(group, Text.krit, 24, CRIT_COLOR, Color3.new(1, 1, 1), 2.5)
crit.Rotation = -8 crit.Rotation = -8
crit.LayoutOrder = 1 crit.LayoutOrder = 1
end end
+60 -58
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.HostedArenaHud
local GuiService = game:GetService("GuiService") local GuiService = game:GetService("GuiService")
local Players = game:GetService("Players") local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
@@ -87,18 +89,18 @@ local function makeList(parent: Instance, name: string, position: UDim2, size: U
return scroll return scroll
end end
local launch = button(gui, "OpenArenaCreator", if hosted then "‹ В ОБЩЕЕ ЛОББИ" else "+ СОЗДАТЬ АРЕНУ", local launch = button(gui, "OpenArenaCreator", if hosted then Text.vObscheeLobbi else Text.sozdatArenu,
UDim2.new(1, -24, 1, -42), UDim2.fromOffset(264, 52), violet, true) UDim2.new(1, -24, 1, -42), UDim2.fromOffset(264, 52), violet, true)
launch.AnchorPoint = Vector2.new(1, 1) launch.AnchorPoint = Vector2.new(1, 1)
launch.Modal = true launch.Modal = true
local browser = UI.plate(gui, "PublicArenas", UDim2.new(1, -24, 1, -104), UDim2.fromOffset(264, 432), UI.Blue, dark) local browser = UI.plate(gui, "PublicArenas", UDim2.new(1, -24, 1, -104), UDim2.fromOffset(264, 432), UI.Blue, dark)
browser.AnchorPoint = Vector2.new(1, 1) browser.AnchorPoint = Vector2.new(1, 1)
local browserTitle = leftLabel(browser, "Heading", if hosted then "АРЕНА СЕССИИ" else "ПУБЛИЧНЫЕ АРЕНЫ", 13, 7, 173, 34, 16, UI.Ink) local browserTitle = leftLabel(browser, "Heading", if hosted then Text.arenaSessii else Text.publichnyeAreny, 13, 7, 173, 34, 16, UI.Ink)
browserTitle.FontFace = UI.Display browserTitle.FontFace = UI.Display
local ownerLabel = leftLabel(browser, "Owner", "", 13, 38, 237, 21, 12, UI.Muted) local ownerLabel = leftLabel(browser, "Owner", "", 13, 38, 237, 21, 12, UI.Muted)
ownerLabel.Visible = hosted ownerLabel.Visible = hosted
local refreshDirectory = button(browser, "Refresh", "ОБНОВИТЬ", UDim2.fromOffset(191, 9), UDim2.fromOffset(61, 31), UI.Blue) local refreshDirectory = button(browser, "Refresh", Text.obnovit, UDim2.fromOffset(191, 9), UDim2.fromOffset(61, 31), UI.Blue)
refreshDirectory.TextSize = 10 refreshDirectory.TextSize = 10
refreshDirectory.Visible = not hosted and not localPreview refreshDirectory.Visible = not hosted and not localPreview
local listTop = if hosted then 64 else 47 local listTop = if hosted then 64 else 47
@@ -106,7 +108,7 @@ local cardHeight, moreHeight = 184, 37
local browserChrome = listTop + 10 local browserChrome = listTop + 10
local contentHeight = cardHeight local contentHeight = cardHeight
local arenaList = makeList(browser, "List", UDim2.fromOffset(10, listTop), UDim2.new(0, 244, 1, -browserChrome), UI.Blue) local arenaList = makeList(browser, "List", UDim2.fromOffset(10, listTop), UDim2.new(0, 244, 1, -browserChrome), UI.Blue)
local moreArenas = button(arenaList, "More", "ПОКАЗАТЬ ЕЩЁ", UDim2.new(), UDim2.new(1, -13, 0, moreHeight), UI.Blue) local moreArenas = button(arenaList, "More", Text.pokazatEschyo, UDim2.new(), UDim2.new(1, -13, 0, moreHeight), UI.Blue)
moreArenas.Visible = false moreArenas.Visible = false
local shade = UI.frame("CreatorShade", gui, UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.fromRGB(5, 10, 20)) local shade = UI.frame("CreatorShade", gui, UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.fromRGB(5, 10, 20))
@@ -131,14 +133,14 @@ end
shade:GetPropertyChangedSignal("AbsoluteSize"):Connect(fit) shade:GetPropertyChangedSignal("AbsoluteSize"):Connect(fit)
fit() fit()
local header = leftLabel(panel, "Title", "СОЗДАНИЕ АРЕНЫ", 26, 15, 520, 45, 31, UI.Ink) local header = leftLabel(panel, "Title", Text.sozdanieAreny, 26, 15, 520, 45, 31, UI.Ink)
header.FontFace = UI.Display header.FontFace = UI.Display
local close = button(panel, "Close", "×", UDim2.fromOffset(568, 19), UDim2.fromOffset(48, 37), UI.Orange) local close = button(panel, "Close", "×", UDim2.fromOffset(568, 19), UDim2.fromOffset(48, 37), UI.Orange)
close.TextSize, close.Modal = 23, true close.TextSize, close.Modal = 23, true
local public = button(panel, "Public", "ПУБЛИЧНАЯ", UDim2.fromOffset(26, 74), UDim2.fromOffset(284, 44), UI.Blue) local public = button(panel, "Public", Text.publichnaya, UDim2.fromOffset(26, 74), UDim2.fromOffset(284, 44), UI.Blue)
local private = button(panel, "Private", "ПРИВАТНАЯ", UDim2.fromOffset(322, 74), UDim2.fromOffset(294, 44), violet) local private = button(panel, "Private", Text.privatnaya, UDim2.fromOffset(322, 74), UDim2.fromOffset(294, 44), violet)
local explanation = leftLabel(panel, "Description", "", 26, 129, 590, 28, 14, UI.Muted) local explanation = leftLabel(panel, "Description", "", 26, 129, 590, 28, 14, UI.Muted)
local modesHeading = leftLabel(panel, "ModesHeading", "СТАРТОВЫЙ РЕЖИМ", 26, 154, 590, 25, 15, UI.Ink) local modesHeading = leftLabel(panel, "ModesHeading", Text.startovyyRezhim, 26, 154, 590, 25, 15, UI.Ink)
modesHeading.FontFace = UI.Display modesHeading.FontFace = UI.Display
local modeChoices = UI.frame("InitialModeChoices", panel, UDim2.fromOffset(26, 184), UDim2.fromOffset(590, 174), dark) local modeChoices = UI.frame("InitialModeChoices", panel, UDim2.fromOffset(26, 184), UDim2.fromOffset(590, 174), dark)
modeChoices.BackgroundTransparency = 1 modeChoices.BackgroundTransparency = 1
@@ -153,7 +155,7 @@ for index, rule in Rules.All do
modeCards[rule.id] = card modeCards[rule.id] = card
end end
local modeDescription = leftLabel(panel, "ModeDescription", "", 26, 361, 590, 24, 13, UI.Muted) local modeDescription = leftLabel(panel, "ModeDescription", "", 26, 361, 590, 24, 13, UI.Muted)
local changeLabel = leftLabel(panel, "ModeChangeHeading", "Разрешить смену режимов", 26, 391, 375, 22, 16, UI.Ink) local changeLabel = leftLabel(panel, "ModeChangeHeading", Text.razreshitSmenuRezhimov, 26, 391, 375, 22, 16, UI.Ink)
changeLabel.FontFace = UI.Display changeLabel.FontFace = UI.Display
local changeHint = leftLabel(panel, "ModeChangeHint", "", 26, 413, 375, 20, 12, UI.Muted) local changeHint = leftLabel(panel, "ModeChangeHint", "", 26, 413, 375, 20, 12, UI.Muted)
local changeToggle = button(panel, "AllowModeChange", "", UDim2.fromOffset(430, 391), UDim2.fromOffset(186, 41), UI.Mint, true) local changeToggle = button(panel, "AllowModeChange", "", UDim2.fromOffset(430, 391), UDim2.fromOffset(186, 41), UI.Mint, true)
@@ -171,7 +173,7 @@ detailsTitle.FontFace = UI.Display
local detailsClose = button(detailsPanel, "Close", "×", UDim2.fromOffset(568, 19), UDim2.fromOffset(48, 37), UI.Orange) local detailsClose = button(detailsPanel, "Close", "×", UDim2.fromOffset(568, 19), UDim2.fromOffset(48, 37), UI.Orange)
detailsClose.TextSize, detailsClose.Modal = 23, true detailsClose.TextSize, detailsClose.Modal = 23, true
local detailsStatus = leftLabel(detailsPanel, "Status", "", 26, 357, 590, 32, 14, UI.Muted) local detailsStatus = leftLabel(detailsPanel, "Status", "", 26, 357, 590, 32, 14, UI.Muted)
local connect = button(detailsPanel, "Connect", "ПОДКЛЮЧИТЬСЯ ›", UDim2.fromOffset(26, 397), UDim2.fromOffset(590, 43), UI.Blue, true) local connect = button(detailsPanel, "Connect", Text.podklyuchitSya, UDim2.fromOffset(26, 397), UDim2.fromOffset(590, 43), UI.Blue, true)
local function teamColumn(name: string, text: string, x: number, accent: Color3) local function teamColumn(name: string, text: string, x: number, accent: Color3)
local body = UI.plate(detailsPanel, name, UDim2.fromOffset(x + 144.5, 212), UDim2.fromOffset(289, 274), accent, dark:Lerp(accent, .08)) local body = UI.plate(detailsPanel, name, UDim2.fromOffset(x + 144.5, 212), UDim2.fromOffset(289, 274), accent, dark:Lerp(accent, .08))
@@ -191,7 +193,7 @@ local function teamColumn(name: string, text: string, x: number, accent: Color3)
heading.FontFace = UI.Display heading.FontFace = UI.Display
local count = UI.label(body, "Count", "", UDim2.fromOffset(188, 8), UDim2.fromOffset(86, 31), 14, UI.Ink) local count = UI.label(body, "Count", "", UDim2.fromOffset(188, 8), UDim2.fromOffset(86, 31), 14, UI.Ink)
local scroll = makeList(body, "Players", UDim2.fromOffset(9, 47), UDim2.fromOffset(271, 177), accent) local scroll = makeList(body, "Players", UDim2.fromOffset(9, 47), UDim2.fromOffset(271, 177), accent)
local marker = UI.label(body, "ChoiceLabel", "ВЫБРАТЬ", UDim2.fromOffset(9, 232), UDim2.fromOffset(271, 32), 13, accent) local marker = UI.label(body, "ChoiceLabel", Text.vybrat, UDim2.fromOffset(9, 232), UDim2.fromOffset(271, 32), 13, accent)
marker.FontFace = UI.Display marker.FontFace = UI.Display
local dimmer = UI.frame("SelectionDimmer", body, UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), dark) local dimmer = UI.frame("SelectionDimmer", body, UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), dark)
dimmer.BackgroundTransparency, dimmer.ZIndex = 1, 3 dimmer.BackgroundTransparency, dimmer.ZIndex = 1, 3
@@ -204,8 +206,8 @@ local function teamColumn(name: string, text: string, x: number, accent: Color3)
zoom = zoom, glow = glow, shine = shine, border = border, dimmer = dimmer, hit = hit, marker = marker, zoom = zoom, glow = glow, shine = shine, border = border, dimmer = dimmer, hit = hit, marker = marker,
hovered = false, focused = false, pressed = false, feedbackTween = nil :: Tween?} hovered = false, focused = false, pressed = false, feedbackTween = nil :: Tween?}
end end
local blueTeam = teamColumn("Blue", "СИНИЕ", 26, UI.Blue) local blueTeam = teamColumn("Blue", Text.sinie, 26, UI.Blue)
local orangeTeam = teamColumn("Orange", "ОРАНЖЕВЫЕ", 327, UI.Orange) local orangeTeam = teamColumn("Orange", Text.oranzhevye, 327, UI.Orange)
type TeamColumn = typeof(blueTeam) type TeamColumn = typeof(blueTeam)
local teamColumns: {[Side]: TeamColumn} = {Blue = blueTeam, Orange = orangeTeam} local teamColumns: {[Side]: TeamColumn} = {Blue = blueTeam, Orange = orangeTeam}
shade:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() shade:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
@@ -220,15 +222,15 @@ noticeText.TextWrapped = true
local invitation = UI.plate(gui, "ArenaInvitation", UDim2.fromOffset(24, 163), UDim2.fromOffset(354, 166), violet, dark) local invitation = UI.plate(gui, "ArenaInvitation", UDim2.fromOffset(24, 163), UDim2.fromOffset(354, 166), violet, dark)
invitation.Visible = false invitation.Visible = false
UI.contour(invitation, violet) UI.contour(invitation, violet)
local inviteTitle = leftLabel(invitation, "Title", "ПРИГЛАШЕНИЕ НА АРЕНУ", 14, 7, 282, 27, 17, UI.Ink) local inviteTitle = leftLabel(invitation, "Title", Text.priglashenieNaArenu, 14, 7, 282, 27, 17, UI.Ink)
inviteTitle.FontFace = UI.Display inviteTitle.FontFace = UI.Display
local inviteTimer = UI.label(invitation, "Timer", "", UDim2.fromOffset(297, 7), UDim2.fromOffset(44, 27), 14, violet) local inviteTimer = UI.label(invitation, "Timer", "", UDim2.fromOffset(297, 7), UDim2.fromOffset(44, 27), 14, violet)
local portrait = UI.portrait(invitation, UDim2.fromOffset(15, 43), 51, violet) local portrait = UI.portrait(invitation, UDim2.fromOffset(15, 43), 51, violet)
portrait.Name = "CreatorPortrait" portrait.Name = "CreatorPortrait"
local hostLabel = leftLabel(invitation, "CreatorName", "", 78, 42, 261, 24, 17, UI.Ink) local hostLabel = leftLabel(invitation, "CreatorName", "", 78, 42, 261, 24, 17, UI.Ink)
local hostAccount = leftLabel(invitation, "CreatorAccount", "", 78, 67, 261, 22, 13, UI.Muted) local hostAccount = leftLabel(invitation, "CreatorAccount", "", 78, 67, 261, 22, 13, UI.Muted)
local accept = button(invitation, "Accept", "ПРИНЯТЬ [Y]", UDim2.fromOffset(14, 109), UDim2.fromOffset(156, 41), UI.Mint, true) local accept = button(invitation, "Accept", Text.prinyatY, UDim2.fromOffset(14, 109), UDim2.fromOffset(156, 41), UI.Mint, true)
local decline = button(invitation, "Decline", "ОТКЛОНИТЬ [U]", UDim2.fromOffset(181, 109), UDim2.fromOffset(159, 41), violet) local decline = button(invitation, "Decline", Text.otklonitU, UDim2.fromOffset(181, 109), UDim2.fromOffset(159, 41), violet)
local isPrivate = false local isPrivate = false
local roundOptions: Hosting.RoundOptions = {initialMode = Rules.Default, allowModeChange = true} local roundOptions: Hosting.RoundOptions = {initialMode = Rules.Default, allowModeChange = true}
@@ -339,7 +341,7 @@ local function refreshSelection()
changeToggle.Interactable = not busy changeToggle.Interactable = not busy
local count = 0 local count = 0
for _ in selected do count += 1 end for _ in selected do count += 1 end
selectionCount.Text = string.format("ВЫБРАНО %d / %d", count, Hosting.MaxPlayers - 1) selectionCount.Text = string.format(Text.vybranoDD, count, Hosting.MaxPlayers - 1)
for id, row in rows do for id, row in rows do
local active = selected[id] == true local active = selected[id] == true
row.button.BackgroundColor3 = dark:Lerp(violet, if active then .45 else .15) row.button.BackgroundColor3 = dark:Lerp(violet, if active then .45 else .15)
@@ -374,9 +376,9 @@ local function request(actionName: string, data: any?, extra: (Side | Hosting.Ro
detailsClose.Interactable = true detailsClose.Interactable = true
resetTeamReveal() resetTeamReveal()
if shade.Visible then if shade.Visible then
local message = "Ответ задержался. Попробуйте снова." local message = Text.otvetZaderzhalsyaPoprobuyteSnova
if arena then joinNote, detailsStatus.Text = message, message else status.Text = message end if arena then joinNote, detailsStatus.Text = message, message else status.Text = message end
else showNotice("Ответ задержался. Попробуйте снова.") end else showNotice(Text.otvetZaderzhalsyaPoprobuyteSnova) end
end) end)
end end
@@ -424,16 +426,16 @@ local function updatePanel()
private.BackgroundColor3 = dark:Lerp(violet, if isPrivate then .58 else .17) private.BackgroundColor3 = dark:Lerp(violet, if isPrivate then .58 else .17)
selectionCount.Visible, list.Visible = showPlayers, showPlayers selectionCount.Visible, list.Visible = showPlayers, showPlayers
modeDescription.Text = Rules.get(roundOptions.initialMode).detail modeDescription.Text = Rules.get(roundOptions.initialMode).detail
changeToggle.Text = if roundOptions.allowModeChange then "ВКЛЮЧЕНО" else "ВЫКЛЮЧЕНО" changeToggle.Text = if roundOptions.allowModeChange then Text.vklyucheno else Text.vyklyucheno
changeToggle.BackgroundColor3 = if roundOptions.allowModeChange then UI.Mint else dark:Lerp(UI.Muted, .23) changeToggle.BackgroundColor3 = if roundOptions.allowModeChange then UI.Mint else dark:Lerp(UI.Muted, .23)
changeToggle.TextColor3 = if roundOptions.allowModeChange then dark else UI.Ink changeToggle.TextColor3 = if roundOptions.allowModeChange then dark else UI.Ink
changeHint.Text = if roundOptions.allowModeChange then "Голосование после раунда" else "Один режим на все раунды" changeHint.Text = if roundOptions.allowModeChange then Text.golosovaniePosleRaunda else Text.odinRezhimNaVse
explanation.Text = if showPlayers then "Выберите игроков с этого сервера и отправьте приглашения." explanation.Text = if showPlayers then Text.vyberiteIgrokovSEtogo
elseif isPrivate then "На сервере пока нет других игроков." elseif isPrivate then Text.naServerePokaNet
elseif localPreview then "В локальном тесте публичная арена доступна игрокам этого сеанса Studio." elseif localPreview then Text.vLokalNomTeste
else "Любой игрок сможет подключиться через список публичных арен." else Text.lyuboyIgrokSmozhetPodklyuchit
action.Text = if party then "ОТМЕНИТЬ ПРИГЛАШЕНИЯ" action.Text = if party then Text.otmenitPriglasheniya
elseif isPrivate then "ОТПРАВИТЬ ПРИГЛАШЕНИЯ" else "СОЗДАТЬ АРЕНУ" elseif isPrivate then Text.otpravitPriglasheniya else Text.sozdatArenu2
refreshSelection() refreshSelection()
end end
@@ -522,7 +524,7 @@ local function renderTeam(column: TeamColumn, members: {Hosting.Member})
column.count.Text = string.format("%d / %d", #members, Hosting.MaxPlayers // 2) column.count.Text = string.format("%d / %d", #members, Hosting.MaxPlayers // 2)
clearList(column.scroll) clearList(column.scroll)
if #members == 0 then if #members == 0 then
leftLabel(column.scroll, "Empty", "Пока никого", 8, 0, 249, 34, 14, UI.Muted) leftLabel(column.scroll, "Empty", Text.pokaNikogo, 8, 0, 249, 34, 14, UI.Muted)
return return
end end
for index, member in members do for index, member in members do
@@ -553,28 +555,28 @@ local function redrawDetails(now: number)
local teamIssue = if side == "Blue" then blueIssue else orangeIssue local teamIssue = if side == "Blue" then blueIssue else orangeIssue
team.hit.Interactable = ready and teamIssue == nil team.hit.Interactable = ready and teamIssue == nil
if not team.hit.Interactable then team.pressed = false end if not team.hit.Interactable then team.pressed = false end
team.marker.Text = if confirmedSide == side then "ВАША КОМАНДА" team.marker.Text = if confirmedSide == side then Text.vashaKomanda
elseif teamIssue == "Full" then "НЕТ МЕСТ" elseif teamIssue == "Balance" then "БАЛАНС КОМАНД" elseif teamIssue == "Full" then Text.netMest elseif teamIssue == "Balance" then Text.balansKomand
elseif preferredSide == side then "ВЫБРАНО" else "ВЫБРАТЬ" elseif preferredSide == side then Text.vybrano else Text.vybrat
team.marker.TextColor3 = if teamIssue then UI.Muted else team.accent team.marker.TextColor3 = if teamIssue then UI.Muted else team.accent
showTeamFeedback(team, side) showTeamFeedback(team, side)
end end
connect.Interactable = ready and preferredSide ~= nil and issue == nil connect.Interactable = ready and preferredSide ~= nil and issue == nil
detailsClose.Interactable = not sending detailsClose.Interactable = not sending
connect.Text = if confirmedSide then "ВХОД НА АРЕНУ…" connect.Text = if confirmedSide then Text.vkhodNaArenu
elseif sending and localMode then "ПРОВЕРЯЕМ КОМАНДУ…" elseif sending and localMode then Text.proveryaemKomandu
elseif preferredSide == "Blue" then "ПОДКЛЮЧИТЬСЯ ЗА СИНИХ ›" elseif preferredSide == "Blue" then Text.podklyuchitSyaZaSinikh
elseif preferredSide == "Orange" then "ПОДКЛЮЧИТЬСЯ ЗА ОРАНЖЕВЫХ ›" else "ПОДКЛЮЧИТЬСЯ ›" elseif preferredSide == "Orange" then Text.podklyuchitSyaZaOranzhevykh else Text.podklyuchitSya
local accent = if preferredSide == "Orange" then UI.Orange else UI.Blue local accent = if preferredSide == "Orange" then UI.Orange else UI.Blue
connect.BackgroundColor3 = if connect.Interactable then accent else dark:Lerp(UI.Muted, .18) connect.BackgroundColor3 = if connect.Interactable then accent else dark:Lerp(UI.Muted, .18)
connect.TextColor3 = if connect.Interactable then dark else UI.Muted connect.TextColor3 = if connect.Interactable then dark else UI.Muted
detailsStatus.Text = joinNote or (if confirmedSide == "Blue" then "ВЫ В КОМАНДЕ СИНИХ" detailsStatus.Text = joinNote or (if confirmedSide == "Blue" then Text.vyVKomandeSinikh
elseif confirmedSide == "Orange" then "ВЫ В КОМАНДЕ ОРАНЖЕВЫХ" elseif confirmedSide == "Orange" then Text.vyVKomandeOranzhevykh
elseif sending then "Подключаемся…" elseif sending then Text.podklyuchaemsya
elseif not data then "Загружаем составы…" elseif full then "Арена заполнена." elseif not data then Text.zagruzhaemSostavy elseif full then Text.arenaZapolnena
elseif not isOpen then "Подключение откроется с началом раунда." elseif not isOpen then Text.podklyuchenieOtkroetsyaSNachalom
elseif preferredSide and issue then "Выбранная команда пока недоступна." elseif preferredSide and issue then Text.vybrannayaKomandaPokaNedostupna
elseif not preferredSide then "Выберите команду." else "") elseif not preferredSide then Text.vyberiteKomandu else "")
end end
for side, team in teamColumns do for side, team in teamColumns do
@@ -648,7 +650,7 @@ local function localChoice(ownerOverride: Player?): Choice
local mode = Modes.Procedural local mode = Modes.Procedural
local ownerId = remote:GetAttribute("LocalPublicOwnerUserId") local ownerId = remote:GetAttribute("LocalPublicOwnerUserId")
local owner = ownerOverride or (if typeof(ownerId) == "number" then Players:GetPlayerByUserId(ownerId) else nil) local owner = ownerOverride or (if typeof(ownerId) == "number" then Players:GetPlayerByUserId(ownerId) else nil)
return {id = mode, name = if owner then owner.DisplayName else "Динамическая арена", return {id = mode, name = if owner then owner.DisplayName else Text.dinamicheskayaArena,
mode = mode, hostId = if owner then owner.UserId else nil, players = localTeams(mode).players, mode = mode, hostId = if owner then owner.UserId else nil, players = localTeams(mode).players,
ruleset = Rules.get(Modes.state(roundState, mode):GetAttribute("Ruleset")).id} ruleset = Rules.get(Modes.state(roundState, mode):GetAttribute("Ruleset")).id}
end end
@@ -729,9 +731,9 @@ local function showInvite()
local invite = currentInvite local invite = currentInvite
invitation.Visible = invite ~= nil and not transferring invitation.Visible = invite ~= nil and not transferring
if not invite then return end if not invite then return end
inviteTitle.Text = if accepted then "ПРИГЛАШЕНИЕ ПРИНЯТО" else "ПРИГЛАШЕНИЕ НА АРЕНУ" inviteTitle.Text = if accepted then Text.priglasheniePrinyato else Text.priglashenieNaArenu
accept.Visible = not accepted accept.Visible = not accepted
decline.Text = if accepted then "ОТМЕНИТЬ [U]" else "ОТКЛОНИТЬ [U]" decline.Text = if accepted then Text.otmenitU else Text.otklonitU
end end
local function respond(agree: boolean) local function respond(agree: boolean)
@@ -751,7 +753,7 @@ local messageConnection = remote.OnClientEvent:Connect(function(event: string, d
if event == "Invite" then if event == "Invite" then
local invite: Invite = data local invite: Invite = data
currentInvite, accepted = invite, false currentInvite, accepted = invite, false
hostLabel.Text, hostAccount.Text = invite.hostName, "Создатель · @" .. invite.hostUsername hostLabel.Text, hostAccount.Text = invite.hostName, Text.sozdatel .. invite.hostUsername
showAvatar(portrait, invite.hostId, invite.hostName) showAvatar(portrait, invite.hostId, invite.hostName)
showInvite() showInvite()
elseif event == "Accepted" and currentInvite and currentInvite.id == data then elseif event == "Accepted" and currentInvite and currentInvite.id == data then
@@ -781,14 +783,14 @@ local messageConnection = remote.OnClientEvent:Connect(function(event: string, d
renderDirectory() renderDirectory()
elseif event == "ListUnavailable" then elseif event == "ListUnavailable" then
listingPending = false listingPending = false
if browser.Visible then showNotice("Список публичных арен временно недоступен.") end if browser.Visible then showNotice(Text.spisokPublichnykhArenVremenno) end
elseif event == "PublicDetails" and arena and data.id == arena.id then elseif event == "PublicDetails" and arena and data.id == arena.id then
if not arenaDetails then joinNote = nil end if not arenaDetails then joinNote = nil end
arenaDetails = data arenaDetails = data
redrawDetails(workspace:GetServerTimeNow()) redrawDetails(workspace:GetServerTimeNow())
elseif event == "DetailsUnavailable" and arena and data == arena.id then elseif event == "DetailsUnavailable" and arena and data == arena.id then
arenaDetails = nil arenaDetails = nil
joinNote = "Арена закрылась или составы временно недоступны." joinNote = Text.arenaZakrylasIliSostavy
redrawDetails(workspace:GetServerTimeNow()) redrawDetails(workspace:GetServerTimeNow())
elseif event == "LocalPublicReady" then elseif event == "LocalPublicReady" then
sending = false sending = false
@@ -812,11 +814,11 @@ local messageConnection = remote.OnClientEvent:Connect(function(event: string, d
end) end)
local joinErrors: {[string]: string} = { local joinErrors: {[string]: string} = {
Full = "В выбранной команде нет мест.", Full = Text.vVybrannoyKomandeNet,
Balance = "Составы изменились. Подключитесь ещё раз.", Balance = Text.sostavyIzmenilisPodklyuchitesEschyo,
BetweenRounds = "Дождитесь начала следующего раунда.", BetweenRounds = Text.dozhditesNachalaSleduyuschegoRaunda,
Spawning = "Персонаж ещё загружается. Попробуйте снова.", Spawning = Text.personazhEschyoZagruzhaetsyaPoprobuyte,
AwaitingAdmission = "Проверяем доступ к арене. Попробуйте через секунду.", AwaitingAdmission = Text.proveryaemDostupKArene,
} }
local joinConnection = join.OnClientEvent:Connect(function(result: string, side: Side?) local joinConnection = join.OnClientEvent:Connect(function(result: string, side: Side?)
if not sending or not arena or not arena.mode then return end if not sending or not arena or not arena.mode then return end
@@ -830,14 +832,14 @@ local joinConnection = join.OnClientEvent:Connect(function(result: string, side:
setOpen(false) setOpen(false)
else else
resetTeamReveal() resetTeamReveal()
joinNote = joinErrors[result] or "Не удалось подключиться." joinNote = joinErrors[result] or Text.neUdalosPodklyuchitSya
redrawDetails(workspace:GetServerTimeNow()) redrawDetails(workspace:GetServerTimeNow())
end end
end) end)
local launcherConnection = roundHud:GetAttributeChangedSignal("LobbyAvailable"):Connect(refreshLaunch) local launcherConnection = roundHud:GetAttributeChangedSignal("LobbyAvailable"):Connect(refreshLaunch)
local function refreshOwner() local function refreshOwner()
local name = remote:GetAttribute("OwnerName") local name = remote:GetAttribute("OwnerName")
ownerLabel.Text = if typeof(name) == "string" then "Владелец · " .. name else "" ownerLabel.Text = if typeof(name) == "string" then Text.vladelets .. name else ""
end end
local ownerConnection = remote:GetAttributeChangedSignal("OwnerName"):Connect(refreshOwner) local ownerConnection = remote:GetAttributeChangedSignal("OwnerName"):Connect(refreshOwner)
local votingConnection = pg:GetAttributeChangedSignal("HunterVoting"):Connect(function() local votingConnection = pg:GetAttributeChangedSignal("HunterVoting"):Connect(function()
@@ -850,13 +852,13 @@ local teamConnection = player:GetAttributeChangedSignal("ArenaTeam"):Connect(fun
end end
end) end)
local function showFull() local function showFull()
if player:GetAttribute("HostedArenaFull") then showNotice("Арена заполнена. Можно вернуться в общее лобби.", true) end if player:GetAttribute("HostedArenaFull") then showNotice(Text.arenaZapolnenaMozhnoVernut, true) end
end end
local fullConnection = player:GetAttributeChangedSignal("HostedArenaFull"):Connect(showFull) local fullConnection = player:GetAttributeChangedSignal("HostedArenaFull"):Connect(showFull)
showFull() showFull()
local function showTeamNotice() local function showTeamNotice()
local issue = player:GetAttribute("HostedArenaTeamNotice") local issue = player:GetAttribute("HostedArenaTeamNotice")
if typeof(issue) == "string" then showNotice(joinErrors[issue] or "Выбранная команда недоступна.") end if typeof(issue) == "string" then showNotice(joinErrors[issue] or Text.vybrannayaKomandaNedostupna) end
end end
local arrivalTeamConnection = player:GetAttributeChangedSignal("HostedArenaTeamNotice"):Connect(showTeamNotice) local arrivalTeamConnection = player:GetAttributeChangedSignal("HostedArenaTeamNotice"):Connect(showTeamNotice)
showTeamNotice() showTeamNotice()
@@ -900,7 +902,7 @@ local clock = RunService.Heartbeat:Connect(function()
local pending = party local pending = party
if pending then if pending then
local left = math.max(0, math.ceil(pending.expires - now)) local left = math.max(0, math.ceil(pending.expires - now))
status.Text = string.format("Приняли %d · Ждём %d · %02d с", pending.accepted, pending.pending, left) status.Text = string.format(Text.prinyaliDZhdyomD, pending.accepted, pending.pending, left)
if not shade.Visible then showNotice(status.Text, true) end if not shade.Visible then showNotice(status.Text, true) end
end end
end) end)
+25 -23
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.HostedArenaService
local HttpService = game:GetService("HttpService") local HttpService = game:GetService("HttpService")
local MemoryStoreService = game:GetService("MemoryStoreService") local MemoryStoreService = game:GetService("MemoryStoreService")
local Players = game:GetService("Players") local Players = game:GetService("Players")
@@ -81,18 +83,18 @@ end
local function createLocalPublic(player: Player, options: RoundOptions) local function createLocalPublic(player: Player, options: RoundOptions)
if previewOwner and previewOwner ~= player then if previewOwner and previewOwner ~= player then
fail(player, "На этом тестовом сервере уже есть публичная арена. Откройте её карточку.") fail(player, Text.naEtomTestovomServere)
return return
end end
if configuringPreview then if configuringPreview then
fail(player, "Тестовая арена уже готовится.") fail(player, Text.testovayaArenaUzheGotovitsya)
return return
end end
configuringPreview = true configuringPreview = true
local ok, configured = pcall(configureRound, options) local ok, configured = pcall(configureRound, options)
configuringPreview = false configuringPreview = false
if not ok or not configured then if not ok or not configured then
fail(player, "Дождитесь, пока тестовая арена освободится.") fail(player, Text.dozhditesPokaTestovayaArena)
return return
end end
if not inLobby(player) then return end if not inLobby(player) then return end
@@ -103,7 +105,7 @@ end
local function transferFailed(player: Player) local function transferFailed(player: Player)
if not transfers[player] then return end if not transfers[player] then return end
transfers[player] = nil transfers[player] = nil
fail(player, "Переход не удался. Попробуйте снова.") fail(player, Text.perekhodNeUdalsyaPoprobuyte)
end end
local function teleport(group: {Player}, destination: string?, side: Side?): boolean local function teleport(group: {Player}, destination: string?, side: Side?): boolean
@@ -119,7 +121,7 @@ local function transfer(group: {Player}, destination: string?, side: Side?)
for _, player in group do for _, player in group do
local pending = {destination = destination, side = side, attempts = 1} local pending = {destination = destination, side = side, attempts = 1}
transfers[player] = pending transfers[player] = pending
send(player, "Transfer", if destination then "Загружаем арену…" else "Возвращаем в общее лобби…") send(player, "Transfer", if destination then Text.zagruzhaemArenu else Text.vozvraschaemVObscheeLobbi)
task.delay(25, function() task.delay(25, function()
if transfers[player] == pending and present(player) then transferFailed(player) end if transfers[player] == pending and present(player) then transferFailed(player) end
end) end)
@@ -180,7 +182,7 @@ local function launch(host: Player, guests: {Player}?, access: "Public" | "Priva
end end
for _, player in members do for _, player in members do
transfers[player] = {destination = destination, attempts = 1} transfers[player] = {destination = destination, attempts = 1}
if access == "Private" then send(player, "Transfer", "Готовим арену…") end if access == "Private" then send(player, "Transfer", Text.gotovimArenu) end
end end
local record: Session = { local record: Session = {
hostId = host.UserId, hostName = host.DisplayName, access = access, hostId = host.UserId, hostName = host.DisplayName, access = access,
@@ -195,9 +197,9 @@ local function launch(host: Player, guests: {Player}?, access: "Public" | "Priva
if not saved or not hostHere or (access == "Private" and #members < 2) then if not saved or not hostHere or (access == "Private" and #members < 2) then
for _, player in members do for _, player in members do
transfers[player] = nil transfers[player] = nil
fail(player, if not hostHere then "Создатель вышел с сервера." fail(player, if not hostHere then Text.sozdatelVyshelSServera
elseif not saved then "Сервис арен Roblox временно недоступен. Попробуйте позже." elseif not saved then Text.servisArenRobloxVremenno
else "Подтвердившие игроки вышли с сервера.") else Text.podtverdivshieIgrokiVyshliS)
end end
if saved and sessions then if saved and sessions then
pcall(sessions.RemoveAsync, sessions, destination) pcall(sessions.RemoveAsync, sessions, destination)
@@ -232,7 +234,7 @@ local function updateParty(party: Party, expired: boolean?)
return return
end end
if #accepted == 0 or not inLobby(party.host) then if #accepted == 0 or not inLobby(party.host) then
closeParty(party, if #accepted == 0 then "Никто не подтвердил приглашение." else "Создатель покинул лобби.") closeParty(party, if #accepted == 0 then Text.niktoNePodtverdilPriglashenie else Text.sozdatelPokinulLobbi)
return return
end end
closeParty(party) closeParty(party)
@@ -246,18 +248,18 @@ local function invite(host: Player, selection: unknown, options: RoundOptions)
for _, userId in selection do for _, userId in selection do
checked += 1 checked += 1
if checked >= Hosting.MaxPlayers or typeof(userId) ~= "number" or userId % 1 ~= 0 or math.abs(userId) >= 2^53 then if checked >= Hosting.MaxPlayers or typeof(userId) ~= "number" or userId % 1 ~= 0 or math.abs(userId) >= 2^53 then
fail(host, "Выберите до 19 игроков.") fail(host, Text.vyberiteDoIgrokov)
return return
end end
local player = Players:GetPlayerByUserId(userId) local player = Players:GetPlayerByUserId(userId)
if player == host or not player or not present(player) or invitations[player] or parties[player] or transfers[player] then if player == host or not player or not present(player) or invitations[player] or parties[player] or transfers[player] then
fail(host, "Кто-то из выбранных уже недоступен. Проверьте список игроков.") fail(host, Text.ktoToIzVybrannykh)
return return
end end
answers[player] = "Pending" answers[player] = "Pending"
end end
if not next(answers) then if not next(answers) then
fail(host, "Выберите хотя бы одного игрока.") fail(host, Text.vyberiteKhotyaByOdnogo)
return return
end end
local party = {id = HttpService:GenerateGUID(false), host = host, answers = answers, roundOptions = options, local party = {id = HttpService:GenerateGUID(false), host = host, answers = answers, roundOptions = options,
@@ -350,7 +352,7 @@ local function joinPublic(player: Player, id: unknown, preference: unknown)
if not inLobby(player) then transfers[player] = nil return end if not inLobby(player) then transfers[player] = nil return end
if not ok or not row or row.players >= Hosting.MaxPlayers then if not ok or not row or row.players >= Hosting.MaxPlayers then
transfers[player] = nil transfers[player] = nil
fail(player, "Арена закрылась или уже заполнена.") fail(player, Text.arenaZakrylasIliUzhe)
return return
end end
if preference then if preference then
@@ -358,7 +360,7 @@ local function joinPublic(player: Player, id: unknown, preference: unknown)
local issue = if preference == "Blue" then Hosting.teamJoinError(blue, orange) else Hosting.teamJoinError(orange, blue) local issue = if preference == "Blue" then Hosting.teamJoinError(blue, orange) else Hosting.teamJoinError(orange, blue)
if issue then if issue then
transfers[player] = nil transfers[player] = nil
fail(player, if issue == "Full" then "В этой команде нет мест." else "Составы изменились. Выберите другую команду.") fail(player, if issue == "Full" then Text.vEtoyKomandeNet else Text.sostavyIzmenilisVyberiteDruguyu)
return return
end end
end end
@@ -382,29 +384,29 @@ remote.OnServerEvent:Connect(function(player: Player, action: unknown, value: un
if action == "Answer" then answer(player, value, extra) return end if action == "Answer" then answer(player, value, extra) return end
if action == "Cancel" then if action == "Cancel" then
local party = parties[player] local party = parties[player]
if party then closeParty(party, "Приглашения отменены.") end if party then closeParty(party, Text.priglasheniyaOtmeneny) end
return return
end end
if not inLobby(player) then return end if not inLobby(player) then return end
if parties[player] or invitations[player] then if parties[player] or invitations[player] then
fail(player, "Сначала завершите текущее приглашение.") fail(player, Text.snachalaZavershiteTekuscheePriglashenie)
return return
end end
if action == "JoinPublic" then joinPublic(player, value, extra) return end if action == "JoinPublic" then joinPublic(player, value, extra) return end
if action ~= "CreatePublic" and action ~= "InvitePrivate" then return end if action ~= "CreatePublic" and action ~= "InvitePrivate" then return end
local options = Hosting.readRoundOptions(if action == "CreatePublic" then value else extra) local options = Hosting.readRoundOptions(if action == "CreatePublic" then value else extra)
if not options then if not options then
fail(player, "Проверьте выбранный режим и настройки арены.") fail(player, Text.proverTeVybrannyyRezhim)
return return
end end
if now - (lastCreate[player] or -math.huge) < 3 then if now - (lastCreate[player] or -math.huge) < 3 then
fail(player, "Подождите несколько секунд перед повторной попыткой.") fail(player, Text.podozhditeNeskolKoSekund)
return return
end end
lastCreate[player] = now lastCreate[player] = now
if localPreview then if localPreview then
if action == "CreatePublic" then createLocalPublic(player, options) if action == "CreatePublic" then createLocalPublic(player, options)
else fail(player, "Для приватной арены нужен плейс, сохранённый в Roblox.") end else fail(player, Text.dlyaPrivatnoyArenyNuzhen) end
return return
end end
if action == "CreatePublic" then launch(player, nil, "Public", options) else invite(player, value, options) end if action == "CreatePublic" then launch(player, nil, "Public", options) else invite(player, value, options) end
@@ -442,7 +444,7 @@ Players.PlayerRemoving:Connect(function(player)
lastAction[player], lastCreate[player], lastList[player], transfers[player] = nil, nil, nil, nil lastAction[player], lastCreate[player], lastList[player], transfers[player] = nil, nil, nil, nil
lastDetails[player], moreFrom[player] = nil, nil lastDetails[player], moreFrom[player] = nil, nil
local sent = parties[player] local sent = parties[player]
if sent then closeParty(sent, "Создатель вышел с сервера.") end if sent then closeParty(sent, Text.sozdatelVyshelSServera) end
local received = invitations[player] local received = invitations[player]
if received then if received then
invitations[player], received.answers[player] = nil, nil invitations[player], received.answers[player] = nil, nil
@@ -563,11 +565,11 @@ if hosted then
if not present(player) or admitted[player] then return end if not present(player) or admitted[player] then return end
local record = session local record = session
if not record or closing then if not record or closing then
player:Kick("Эта арена больше недоступна.") player:Kick(Text.etaArenaBolShe)
return return
end end
if not allowed(record, player) then if not allowed(record, player) then
player:Kick("Эта арена доступна только участникам с подтверждённым приглашением.") player:Kick(Text.etaArenaDostupnaTol)
return return
end end
local count = 0 local count = 0
+13 -66
View File
@@ -1,5 +1,7 @@
--!strict --!strict
local TweenService = game:GetService("TweenService") local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.HotPoint
local Diagnostics = require(script.Parent.ModeRuntime.ZoneDiagnostics)
local Credit = require(script.Parent.ModeRuntime.HotPointCredit) local Credit = require(script.Parent.ModeRuntime.HotPointCredit)
local Sites = require(script.Parent:WaitForChild("ArenaObjectiveSites") :: ModuleScript) local Sites = require(script.Parent:WaitForChild("ArenaObjectiveSites") :: ModuleScript)
@@ -26,7 +28,7 @@ local TEAM_SPEED = 1.5
local HIT_WINDOW = 1.2 local HIT_WINDOW = 1.2
local HIT_DECAY = .8 local HIT_DECAY = .8
local neutral = Color3.fromRGB(183, 132, 255) local neutral = Color3.fromRGB(255, 220, 96)
local contested = Color3.fromRGB(255, 211, 124) local contested = Color3.fromRGB(255, 211, 124)
local teamColor: {[Side]: Color3} = {Blue = Color3.fromRGB(76, 228, 255), Orange = Color3.fromRGB(255, 81, 105)} local teamColor: {[Side]: Color3} = {Blue = Color3.fromRGB(76, 228, 255), Orange = Color3.fromRGB(255, 81, 105)}
@@ -35,7 +37,6 @@ function HotPoint.attachRing(mark: Marker, radius: number?): (Color3) -> ()
local body = mark.body local body = mark.body
body.Transparency = .92 body.Transparency = .92
local beams: {Beam} = {} local beams: {Beam} = {}
local sparks: {ParticleEmitter} = {}
local function anchor(angle: number, height: number): Attachment local function anchor(angle: number, height: number): Attachment
local radial = Vector3.new(math.cos(angle), 0, math.sin(angle)) local radial = Vector3.new(math.cos(angle), 0, math.sin(angle))
local tangent = Vector3.new(-radial.Z, 0, radial.X) local tangent = Vector3.new(-radial.Z, 0, radial.X)
@@ -81,22 +82,6 @@ function HotPoint.attachRing(mark: Marker, radius: number?): (Color3) -> ()
veil.Parent = body veil.Parent = body
table.insert(beams, veil) table.insert(beams, veil)
end end
local emitter = Instance.new("ParticleEmitter")
emitter.Name = "RisingSparks"
emitter.Texture = "rbxasset://textures/particles/sparkles_main.dds"
emitter.EmissionDirection = Enum.NormalId.Top
emitter.Rate, emitter.Speed = 12, NumberRange.new(16.5, 27)
emitter.Lifetime, emitter.SpreadAngle = NumberRange.new(.6, 1.08), Vector2.new(8, 8)
emitter.Rotation, emitter.RotSpeed = NumberRange.new(-180, 180), NumberRange.new(-95, 95)
emitter.LightEmission, emitter.LightInfluence, emitter.Brightness = 1, 0, 2
emitter.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, .16), NumberSequenceKeypoint.new(.25, .55), NumberSequenceKeypoint.new(1, .08),
})
emitter.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(.22, .12), NumberSequenceKeypoint.new(1, 1),
})
emitter.Parent = source
table.insert(sparks, emitter)
end end
return function(tint: Color3) return function(tint: Color3)
body.Color, mark.label.TextColor3 = tint, tint body.Color, mark.label.TextColor3 = tint, tint
@@ -107,50 +92,12 @@ function HotPoint.attachRing(mark: Marker, radius: number?): (Color3) -> ()
ColorSequenceKeypoint.new(1, tint), ColorSequenceKeypoint.new(1, tint),
}) })
for _, beam in beams do beam.Color = spectrum end for _, beam in beams do beam.Color = spectrum end
for _, emitter in sparks do emitter.Color = spectrum end
end end
end end
local function collapse(mark: Marker) local function closeMarker(mark: Marker)
local body = mark.body mark.body:SetAttribute("ObjectiveArrowHidden", true)
local motion = TweenInfo.new(COLLAPSE_SECONDS, Enum.EasingStyle.Quad, Enum.EasingDirection.In) mark.body.Parent = nil
local center = body.CFrame:PointToObjectSpace(mark.origin + Vector3.yAxis * .29)
body:SetAttribute("ObjectiveArrowHidden", true)
mark.label.Visible = false
TweenService:Create(body, motion, {Size = Vector3.new(body.Size.X, .1, .1), Transparency = 1}):Play()
for _, item in body:GetDescendants() do
if item:IsA("Attachment") then
TweenService:Create(item, motion, {Position = center}):Play()
elseif item:IsA("Beam") then
TweenService:Create(item, motion, {Width0 = 0, Width1 = 0, CurveSize0 = 0, CurveSize1 = 0}):Play()
elseif item:IsA("ParticleEmitter") then
item.Enabled = false
elseif item:IsA("PointLight") then
TweenService:Create(item, motion, {Brightness = 0, Range = 0}):Play()
end
end
local source = Instance.new("Attachment")
source.CFrame = body.CFrame:ToObjectSpace(CFrame.new(mark.origin + Vector3.yAxis * .65))
source.Parent = body
local smoke = Instance.new("ParticleEmitter")
smoke.Name = "CaptureSmoke"
smoke.Texture = "rbxasset://textures/particles/smoke_main.dds"
smoke.Rate = 0
smoke.Lifetime = NumberRange.new(.8, 1.45)
smoke.Speed = NumberRange.new(7, 16)
smoke.SpreadAngle = Vector2.new(68, 68)
smoke.Rotation = NumberRange.new(-180, 180)
smoke.Acceleration = Vector3.yAxis * 6
smoke.Color = ColorSequence.new(body.Color:Lerp(Color3.fromRGB(215, 222, 236), .65))
smoke.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 2), NumberSequenceKeypoint.new(.5, 6), NumberSequenceKeypoint.new(1, 10),
})
smoke.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, .28), NumberSequenceKeypoint.new(.42, .46), NumberSequenceKeypoint.new(1, 1),
})
smoke.Parent = source
smoke:Emit(32)
end end
function HotPoint.start(config: Config): Capture function HotPoint.start(config: Config): Capture
@@ -185,11 +132,11 @@ function HotPoint.start(config: Config): Capture
if delta.Y < -.5 or delta.Y > 60 or delta.X * delta.X + delta.Z * delta.Z > HotPoint.Radius ^ 2 then return false end if delta.Y < -.5 or delta.Y > 60 or delta.X * delta.X + delta.Z * delta.Z > HotPoint.Radius ^ 2 then return false end
if delta.Y > 8 then if delta.Y > 8 then
-- A jump over the point still counts when the first floor below is the capture floor. -- A jump over the point still counts when the first floor below is the capture floor.
local floor = workspace:Raycast(fighter.root.Position, -Vector3.yAxis * (delta.Y + .8), config.geometry) local floor = Diagnostics.raycast(fighter.root.Position, -Vector3.yAxis * (delta.Y + .8), config.geometry)
return floor ~= nil and math.abs(floor.Position.Y - origin.Y) < .65 return floor ~= nil and math.abs(floor.Position.Y - origin.Y) < .65
end end
local to = origin + Vector3.yAxis * 2.7 - fighter.root.Position local to = origin + Vector3.yAxis * 2.7 - fighter.root.Position
return workspace:Raycast(fighter.root.Position, to, config.geometry) == nil return Diagnostics.raycast(fighter.root.Position, to, config.geometry) == nil
end end
local function step(fighters: {Fighter}, now: number, dt: number) local function step(fighters: {Fighter}, now: number, dt: number)
@@ -210,10 +157,10 @@ function HotPoint.start(config: Config): Capture
local since = now - capturedAt local since = now - capturedAt
if since >= COLLAPSE_SECONDS + CAPTURE_NOTICE_SECONDS then if since >= COLLAPSE_SECONDS + CAPTURE_NOTICE_SECONDS then
publish(nil, 0, nil) publish(nil, 0, nil)
config.status("Скоро появится новая точка") config.status(Text.skoroPoyavitsyaNovayaTochka)
elseif since >= COLLAPSE_SECONDS then elseif since >= COLLAPSE_SECONDS then
publish(capturedSide, 100, "Captured") publish(capturedSide, 100, "Captured")
config.status("Точка захвачена") config.status(Text.tochkaZakhvachena)
end end
return return
end end
@@ -228,7 +175,7 @@ function HotPoint.start(config: Config): Capture
if fighter.side == "Blue" then blue += 1 else orange += 1 end if fighter.side == "Blue" then blue += 1 else orange += 1 end
end end
local remaining = math.ceil(movesAt - now) local remaining = math.ceil(movesAt - now)
config.status(site.name .. " · Смена точки через " .. remaining .. " с") config.status(site.name .. Text.smenaTochkiCherez .. remaining .. Text.s)
local soleSide: Side? = if blue > 0 and orange == 0 then "Blue" elseif orange > 0 and blue == 0 then "Orange" else nil local soleSide: Side? = if blue > 0 and orange == 0 then "Blue" elseif orange > 0 and blue == 0 then "Orange" else nil
local isContested = blue > 0 and orange > 0 local isContested = blue > 0 and orange > 0
if soleSide then if soleSide then
@@ -264,7 +211,7 @@ function HotPoint.start(config: Config): Capture
state:SetAttribute("HotPointPosition", nil) state:SetAttribute("HotPointPosition", nil)
state:SetAttribute("HotPointMovesAt", movesAt) state:SetAttribute("HotPointMovesAt", movesAt)
paintRing(teamColor[side]) paintRing(teamColor[side])
if mark then collapse(mark) end if mark then closeMarker(mark) end
else else
local phase = if isContested then "Contested" elseif underFire then "UnderFire" else "Capturing" local phase = if isContested then "Contested" elseif underFire then "UnderFire" else "Capturing"
publish(side, math.floor(100 * credit / CAPTURE_SECONDS), phase) publish(side, math.floor(100 * credit / CAPTURE_SECONDS), phase)
+6 -4
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.HotPointGuide
local Players = game:GetService("Players") local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService") local RunService = game:GetService("RunService")
@@ -26,7 +28,7 @@ sizeLimit.MaxSize = Vector2.new(326, 60)
sizeLimit.Parent = panel sizeLimit.Parent = panel
local contour = UI.contour(panel, UI.Blue) local contour = UI.contour(panel, UI.Blue)
local arrow = UI.label(panel, "Arrow", "▲", UDim2.fromOffset(12, 8), UDim2.fromOffset(44, 44), 29, UI.Blue) local arrow = UI.label(panel, "Arrow", "▲", UDim2.fromOffset(12, 8), UDim2.fromOffset(44, 44), 29, UI.Blue)
local title = UI.label(panel, "Title", "К ГОРЯЧЕЙ ТОЧКЕ", UDim2.fromOffset(63, 7), UDim2.new(1, -72, 0, 23), 18, UI.Ink) local title = UI.label(panel, "Title", Text.kGoryacheyTochke, UDim2.fromOffset(63, 7), UDim2.new(1, -72, 0, 23), 18, UI.Ink)
title.TextXAlignment = Enum.TextXAlignment.Left title.TextXAlignment = Enum.TextXAlignment.Left
local detail = UI.label(panel, "Detail", "", UDim2.fromOffset(63, 31), UDim2.new(1, -72, 0, 20), 15, UI.Muted) local detail = UI.label(panel, "Detail", "", UDim2.fromOffset(63, 31), UDim2.new(1, -72, 0, 20), 15, UI.Muted)
detail.TextXAlignment = Enum.TextXAlignment.Left detail.TextXAlignment = Enum.TextXAlignment.Left
@@ -81,9 +83,9 @@ local function update()
arrow.TextColor3 = tint arrow.TextColor3 = tint
local localDirection = camera.CFrame:VectorToObjectSpace(flat) local localDirection = camera.CFrame:VectorToObjectSpace(flat)
arrow.Rotation = math.deg(math.atan2(localDirection.X, -localDirection.Z)) arrow.Rotation = math.deg(math.atan2(localDirection.X, -localDirection.Z))
title.Text = if moving then ("НОВАЯ ТОЧКА · %d С"):format(math.ceil(remaining)) else "К ГОРЯЧЕЙ ТОЧКЕ" title.Text = if moving then (Text.novayaTochkaDS):format(math.ceil(remaining)) else Text.kGoryacheyTochke
local floor = if delta.Y > 8 then " · ВЫШЕ" elseif delta.Y < -8 then " · НИЖЕ" else "" local floor = if delta.Y > 8 then Text.vyshe elseif delta.Y < -8 then Text.nizhe else ""
detail.Text = ("%d СТУДОВ%s"):format(math.floor(delta.Magnitude + .5), floor) detail.Text = (Text.dStudovS):format(math.floor(delta.Magnitude + .5), floor)
end end
local connection = RunService.RenderStepped:Connect(update) local connection = RunService.RenderStepped:Connect(update)
+10
View File
@@ -0,0 +1,10 @@
--!strict
local Config = require(script.Parent.EffectsConfig)
local Budget = {}
function Budget.profile(touch: boolean, keyboard: boolean)
return if touch and not keyboard then Config.Mobile else Config.Desktop
end
function Budget.particles(requested: number, scale: number): number
return if requested <= 0 then 0 else math.max(1, math.floor(requested * scale))
end
return table.freeze(Budget)
+29
View File
@@ -0,0 +1,29 @@
--!strict
local tick = "rbxassetid://113416294133952"
local ready = "rbxassetid://2789428506"
local success = "rbxassetid://4612374036"
export type Cue = {id: string, volume: number, speed: number}
local function cue(id: string, volume: number, speed: number): Cue
return table.freeze({id = id, volume = volume, speed = speed})
end
return table.freeze({
Debug = false, SoundLimit = 6, HintLimit = 60,
Danger = Color3.fromRGB(255, 81, 105),
FeedbackSeconds = .55, BannerMotionSeconds = .22,
Desktop = table.freeze({scale = 1, maxEmitters = 200, burstSlots = 10, worldSlots = 8}),
Mobile = table.freeze({scale = .4, maxEmitters = 80, burstSlots = 4, worldSlots = 4}),
Cues = table.freeze({
RoundStart = cue(success,.27,1.15), Countdown = cue(tick,.25,1), Tick = cue(tick,.22,1.12),
FinalPush = cue(ready,.25,.9), ZoneEnter = cue(tick,.23,1.30), ZoneCharge = cue(ready,.22,1),
ZoneBlocked = cue(ready,.25,.70), ZoneDecay = cue(ready,.20,.58), ZoneCaptured = cue(success,.28,1),
AllTaken = cue(success,.27,1.18), FlagPicked = cue(ready,.25,1), FlagDropped = cue(ready,.23,.72),
FlagScored = cue(success,.28,1.06), TokenPick = cue(tick,.22,1.21), TokensBanked = cue(success,.27,1.2),
LeaderDown = cue(success,.28,.94), RoleSwap = cue(ready,.25,1.18),
MiniRoundStart = cue(success,.26,1.24), Results = cue(success,.25,.92),
}),
Aliases = table.freeze({
RoundCountdown = "Countdown", SiegeEnter = "ZoneEnter", SiegeCharge = "ZoneCharge",
SiegeTick = "Tick", SiegeBlocked = "ZoneBlocked", SiegeDecay = "ZoneDecay",
HotPointStart = "ZoneCharge", HotPointCaptured = "ZoneCaptured", HotPointMove = "Countdown",
}),
})
+1 -1
View File
@@ -2,7 +2,7 @@
return table.freeze({ return table.freeze({
ZoneStarted = "ZoneStarted", ZoneCaptured = "ZoneCaptured", ZoneContested = "ZoneContested", ZoneLost = "ZoneLost", ZoneStarted = "ZoneStarted", ZoneCaptured = "ZoneCaptured", ZoneContested = "ZoneContested", ZoneLost = "ZoneLost",
FullControl = "FullControl", AllObjectivesTaken = "AllObjectivesTaken", FlagPicked = "FlagPicked", FlagDropped = "FlagDropped", FullControl = "FullControl", AllObjectivesTaken = "AllObjectivesTaken", FlagPicked = "FlagPicked", FlagDropped = "FlagDropped",
FlagReturned = "FlagReturned", FlagScored = "FlagScored", TokenDropped = "TokenDropped", TokensBanked = "TokensBanked", TokensLost = "TokensLost", FlagReturned = "FlagReturned", FlagScored = "FlagScored", TokenPicked = "TokenPicked", TokenDropped = "TokenDropped", TokensBanked = "TokensBanked", TokensLost = "TokensLost",
LeaderAssigned = "LeaderAssigned", LeaderDown = "LeaderDown", MiniRoundStarted = "MiniRoundStarted", LeaderAssigned = "LeaderAssigned", LeaderDown = "LeaderDown", MiniRoundStarted = "MiniRoundStarted",
MiniRoundEnded = "MiniRoundEnded", RoleSwap = "RoleSwap", Streak = "Streak", MiniRoundEnded = "MiniRoundEnded", RoleSwap = "RoleSwap", Streak = "Streak",
}) })
+7
View File
@@ -1,6 +1,7 @@
--!strict --!strict
export type Hint = {key: string, text: string, priority: number, cooldown: number?, ttl: number?} export type Hint = {key: string, text: string, priority: number, cooldown: number?, ttl: number?}
export type State = {shownAt: {[string]: number}, current: Hint?, currentUntil: number} export type State = {shownAt: {[string]: number}, current: Hint?, currentUntil: number}
local Config = require(script.Parent.EffectsConfig)
local Hints = {DEFAULT_COOLDOWN = 3, DEFAULT_TTL = 3} local Hints = {DEFAULT_COOLDOWN = 3, DEFAULT_TTL = 3}
function Hints.new(): State return {shownAt = {}, current = nil, currentUntil = 0} end function Hints.new(): State return {shownAt = {}, current = nil, currentUntil = 0} end
function Hints.pick(state: State, candidates: {Hint}, now: number): Hint? function Hints.pick(state: State, candidates: {Hint}, now: number): Hint?
@@ -21,4 +22,10 @@ function Hints.pick(state: State, candidates: {Hint}, now: number): Hint?
end end
return current return current
end end
function Hints.compact(text: string): string
local line = text:gsub("[\r\n]+", " ")
local cut = utf8.offset(line, Config.HintLimit)
if cut and utf8.offset(line, Config.HintLimit + 1) then return line:sub(1, cut - 1) .. "…" end
return line
end
return Hints return Hints
+4 -2
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.SiegeResults
local Results = {} local Results = {}
function Results.clockPrecise(t: number): string function Results.clockPrecise(t: number): string
@@ -9,12 +11,12 @@ function Results.rows(times: {[string]: any}, total: number): {string}
local rows = {} local rows = {}
for i = 1, total do for i = 1, total do
local b, o = times["BlueTime" .. i], times["OrangeTime" .. i] local b, o = times["BlueTime" .. i], times["OrangeTime" .. i]
rows[i] = string.format("Рубеж %d · Синие %s · Оранжевые %s", i, rows[i] = string.format(Text.rubezhDSinieS, i,
if typeof(b) == "number" then Results.clockPrecise(b) else "—", if typeof(b) == "number" then Results.clockPrecise(b) else "—",
if typeof(o) == "number" then Results.clockPrecise(o) else "—") if typeof(o) == "number" then Results.clockPrecise(o) else "—")
end end
return rows return rows
end end
Results.tiebreak = "При равенстве рубежей побеждает команда, быстрее дошедшая до последнего взятого." Results.tiebreak = Text.priRavenstveRubezheyPobezhdaet
return table.freeze(Results) return table.freeze(Results)
+382
View File
@@ -110,6 +110,388 @@ local round = table.freeze({
}) })
return table.freeze({ return table.freeze({
interface = table.freeze({
ArenaObjectiveSites = table.freeze({
bazaSinikh = "База синих",
bazaOranzhevykh = "База оранжевых",
nizhniyProkhod = "Нижний проход",
srednyayaGalereya = "Средняя галерея",
kryshaTsitadeli = "Крыша цитадели",
zapadnyyFlang = "Западный фланг",
vostochnyyFlang = "Восточный фланг",
}),
ArenaRoundHud = table.freeze({
tochkaZakhvachena = "ТОЧКА ЗАХВАЧЕНА · +1",
sopernikiZakhvatyvayut = "СОПЕРНИКИ ЗАХВАТЫВАЮТ",
atakaDDD = "АТАКА %d/2 · %d:%02d",
sinieDSOranzhevye = "СИНИЕ +%d/с ОРАНЖЕВЫЕ +%d/с",
uVasFlagNesite = "У вас флаг · Несите его на свою базу",
zhetonovUVas = "Жетонов у вас: ",
vernitesNaBazu = " · Вернитесь на базу",
vyLiderZaVas = "Вы лидер · За вас дают 3 очка",
itogiRaunda = "ИТОГИ РАУНДА",
vyytiVLobbi = "ВЫЙТИ В ЛОББИ",
igrok = "ИГРОК",
ubiystva = "УБИЙСТВА",
smerti = "СМЕРТИ",
vKomandeNeBylo = "В команде не было игроков",
sinie = "СИНИЕ",
oranzhevye = "ОРАНЖЕВЫЕ",
golosovanieCherezDS = "ГОЛОСОВАНИЕ ЧЕРЕЗ %d С",
vKomandePokaNet = "В команде пока нет игроков",
vy = "Вы · ",
statistikaMatcha = "СТАТИСТИКА МАТЧА",
dinamicheskayaArena = " · Динамическая арена",
schyot = "СЧЁТ · ",
doKontsaRaunda = "ДО КОНЦА РАУНДА",
doSleduyuschegoRaunda = "ДО СЛЕДУЮЩЕГО РАУНДА",
sDDOtpustite = "%s %02d:%02d · ОТПУСТИТЕ TAB, ЧТОБЫ ЗАКРЫТЬ",
siniePobedili = "СИНИЕ ПОБЕДИЛИ",
oranzhevyePobedili = "ОРАНЖЕВЫЕ ПОБЕДИЛИ",
nichYa = "НИЧЬЯ",
pobeda = "ПОБЕДА",
porazhenie = "ПОРАЖЕНИЕ",
sleduyuschiyRaundCherezD = "СЛЕДУЮЩИЙ РАУНД ЧЕРЕЗ %d С",
golosovanie = "ГОЛОСОВАНИЕ",
doNachalaRaunda = "ДО НАЧАЛА РАУНДА",
doGolosovaniya = "ДО ГОЛОСОВАНИЯ",
podgotovkaAreny = "ПОДГОТОВКА АРЕНЫ",
}),
ArenaRounds = table.freeze({
sinie = "Синие",
oranzhevye = "Оранжевые",
neUdalosVozroditIgroka = "Не удалось возродить игрока:",
}),
CitadelScoreService = table.freeze({
vzyaliBolSheRubezhey = " взяли больше рубежей",
nichYaObeKomandy = "Ничья: обе команды без захватов",
nichYaVremyaZakhvata = "Ничья: время захвата совпало",
pobedaPoSkorostiS = "Победа по скорости: %s, рубеж %d (Blue %s, Orange %s)",
}),
HotPointGuide = table.freeze({
kGoryacheyTochke = "К ГОРЯЧЕЙ ТОЧКЕ",
novayaTochkaDS = "НОВАЯ ТОЧКА · %d С",
vyshe = " · ВЫШЕ",
nizhe = " · НИЖЕ",
dStudovS = "%d СТУДОВ%s",
}),
ViewmodelTuner = table.freeze({
oruzhie = "Оружие",
vpravoVlevo = "Вправо / влево",
vverkhVniz = "Вверх / вниз",
vperyodNazad = "Вперёд / назад",
povorotYaw = "Поворот (yaw)",
naklonPitch = "Наклон (pitch)",
krenRoll = "Крен (roll)",
inertsiya = "Инерция",
pokachivanie = "Покачивание",
kistVpravoVlevo = "Кисть: вправо/влево",
kistVverkhVniz = "Кисть: вверх/вниз",
kistVperyodNazad = "Кисть: вперёд/назад",
rukaPovorot = "Рука: поворот",
rukaNaklon = "Рука: наклон",
rukaKren = "Рука: крен",
dlinaRuki = "Длина руки",
tolschinaRuki = "Толщина руки",
dlinaKisti = "Длина кисти",
tolschinaKisti = "Толщина кисти",
levayaRuka = "Левая рука",
pravayaRuka = "Правая рука",
osmotr = "Осмотр",
dreyfPriUderzhanii = "Дрейф при удержании",
vykhodVPozuS = "Выход в позу, с",
uderzhanieS = "Удержание, с",
vozvratS = "Возврат, с",
perezaryadka = "Перезарядка",
dlitelNostS = "Длительность, с",
kadr = "Кадр (0–1)",
magazinVpravoVlevo = "Магазин: вправо/влево",
magazinVverkhVniz = "Магазин: вверх/вниз",
magazinVperyodNazad = "Магазин: вперёд/назад",
magazinPovorot = "Магазин: поворот",
magazinNaklon = "Магазин: наклон",
magazinKren = "Магазин: крен",
perezaryadkaZatvor = "Перезарядка: затвор",
zatvorVpravoVlevo = "Затвор: вправо/влево",
zatvorVverkhVniz = "Затвор: вверх/вниз",
zatvorVperyodNazad = "Затвор: вперёд/назад",
zatvorPovorot = "Затвор: поворот",
zatvorNaklon = "Затвор: наклон",
zatvorKren = "Затвор: крен",
magazinVynutVniz = "Магазин: вынуть вниз",
zatvorPodYom = "Затвор: подъём",
zatvorKhodNazad = "Затвор: ход назад",
magazinTolschina = "Магазин: толщина",
magazinVysota = "Магазин: высота",
magazinShirina = "Магазин: ширина",
perezaryadkaRuki = "Перезарядка: руки",
dvizhenie = "Движение",
skorostIgrokaStudS = "Скорость игрока, студ/с",
gravitatsiyaStudS = "Гравитация, студ/с²",
obzorFov = "Обзор (FOV)",
obzorNaBegu = "Обзор: + на бегу",
skorostDlyaMaksFov = "Скорость для макс. FOV",
oruzhieVnizNaBegu = "Оружие: вниз на бегу",
oruzhieNazadNaBegu = "Оружие: назад на бегу",
oruzhieKrenNaBegu = "Оружие: крен на бегу",
zapazdyvanie = "Запаздывание",
oruzhiePryzhokPadenie = "Оружие: прыжок / падение",
vystrel = "Выстрел",
mezhduVystrelamiS = "Между выстрелами, с",
patronovVMagazine = "Патронов в магазине",
zumPriOcheredi = "Зум при очереди, %",
spreyNachalNyyUvod = "Спрей: начальный увод, °",
spreyRostZaVystrel = "Спрей: рост за выстрел, °",
spreyPredelRosta = "Спрей: предел роста, °",
spreySkorostSbrosa = "Спрей: скорость сброса",
spreyVPritsele = "Спрей в прицеле, ×",
zatvorPauzaS = "Затвор: пауза, с",
zatvorSAvtomat = "Затвор, с (0 = автомат)",
zatvorNaklon2 = "Затвор: наклон (0–1)",
kadrSPosleVystrela = "Кадр, с после выстрела",
vystrelStvol = "Выстрел: ствол",
duloVpravoVlevo = "Дуло: вправо/влево",
duloVverkhVniz = "Дуло: вверх/вниз",
duloVperyodNazad = "Дуло: вперёд/назад",
vspyshkaRazmer = "Вспышка: размер",
lDuloVpravoVlevo = "3л дуло: вправо/влево",
lDuloVverkhVniz = "3л дуло: вверх/вниз",
lDuloVperyodNazad = "3л дуло: вперёд/назад",
lVspyshkaRazmer = "3л вспышка: размер",
lOtdachaNazad = "3л отдача: назад",
lOtdachaVverkh = "3л отдача: вверх",
mushka = "Мушка",
kollimator = "Коллиматор",
optika = "Оптика",
pritsel = "Прицел",
fovZumMenShe = "FOV / зум (меньше = ближе)",
chuvstvitelNostMyshi = "Чувствительность мыши",
vremyaPritselivaniyaS = "Время прицеливания, с",
pokachivanieVPritsele = "Покачивание в прицеле",
zamedlenieVPritsele = "Замедление в прицеле (0–1)",
chuvstvitelNost = "Чувствительность",
otBedra = "От бедра",
zvukIPopadaniya = "Звук и попадания",
gromkostObschaya = "Громкость: общая",
gromkostVystrel = "Громкость: выстрел",
gromkostPerezaryadkaZatvor = "Громкость: перезарядка/затвор",
gromkostPopadanie = "Громкость: попадание",
gromkostRazrushenie = "Громкость: разрушение",
razmerVzryvaPriPopadanii = "Размер взрыва при попадании",
tsifryUronaRazlyotV = "Цифры урона: разлёт в стороны",
tsifryUronaPodYom = "Цифры урона: подъём вверх",
ubiystvoVysotaVyleta = "Убийство: высота вылета",
vpravoVlevo2 = ": вправо/влево",
vverkhVniz2 = ": вверх/вниз",
vperyodNazad2 = ": вперёд/назад",
povorot = ": поворот",
naklon = ": наклон",
kren = ": крен",
lOruzhie = "3л: оружие",
lPravayaRuka = "3л: правая рука",
lLevayaRuka = "3л: левая рука",
kist = "Кисть",
lokotVpravoVlevo = "Локоть: вправо/влево",
lokotVverkhVniz = "Локоть: вверх/вниз",
lokotVperyodNazad = "Локоть: вперёд/назад",
lPerezaryadka = "3л: перезарядка",
nastroykaPZakryt = "Настройка (P — закрыть)",
vidELitso = "Вид: 3-е лицо",
vidELitso2 = "Вид: 1-е лицо",
menSheGravitatsiyaVyshe = "Меньше гравитация — выше прыжок",
pritselitSya = "▶ Прицелиться",
proigrat = "▶ Проиграть",
derzhatPozu = "Держать позу",
derzhatPritsel = "Держать прицел",
derzhatKadr = "Держать кадр",
shag = "Шаг: ",
sbros = "Сброс",
sokhranit = "Сохранить",
sokhraneno = "Сохранено ✓",
}),
HotPoint = table.freeze({
skoroPoyavitsyaNovayaTochka = "Скоро появится новая точка",
tochkaZakhvachena = "Точка захвачена",
smenaTochkiCherez = " · Смена точки через ",
s = " с",
}),
HostedArenaService = table.freeze({
naEtomTestovomServere = "На этом тестовом сервере уже есть публичная арена. Откройте её карточку.",
testovayaArenaUzheGotovitsya = "Тестовая арена уже готовится.",
dozhditesPokaTestovayaArena = "Дождитесь, пока тестовая арена освободится.",
perekhodNeUdalsyaPoprobuyte = "Переход не удался. Попробуйте снова.",
zagruzhaemArenu = "Загружаем арену…",
vozvraschaemVObscheeLobbi = "Возвращаем в общее лобби…",
gotovimArenu = "Готовим арену…",
sozdatelVyshelSServera = "Создатель вышел с сервера.",
servisArenRobloxVremenno = "Сервис арен Roblox временно недоступен. Попробуйте позже.",
podtverdivshieIgrokiVyshliS = "Подтвердившие игроки вышли с сервера.",
niktoNePodtverdilPriglashenie = "Никто не подтвердил приглашение.",
sozdatelPokinulLobbi = "Создатель покинул лобби.",
vyberiteDoIgrokov = "Выберите до 19 игроков.",
ktoToIzVybrannykh = "Кто-то из выбранных уже недоступен. Проверьте список игроков.",
vyberiteKhotyaByOdnogo = "Выберите хотя бы одного игрока.",
arenaZakrylasIliUzhe = "Арена закрылась или уже заполнена.",
vEtoyKomandeNet = "В этой команде нет мест.",
sostavyIzmenilisVyberiteDruguyu = "Составы изменились. Выберите другую команду.",
priglasheniyaOtmeneny = "Приглашения отменены.",
snachalaZavershiteTekuscheePriglashenie = "Сначала завершите текущее приглашение.",
proverTeVybrannyyRezhim = "Проверьте выбранный режим и настройки арены.",
podozhditeNeskolKoSekund = "Подождите несколько секунд перед повторной попыткой.",
dlyaPrivatnoyArenyNuzhen = "Для приватной арены нужен плейс, сохранённый в Roblox.",
etaArenaBolShe = "Эта арена больше недоступна.",
etaArenaDostupnaTol = "Эта арена доступна только участникам с подтверждённым приглашением.",
}),
DamageNumbers = table.freeze({
khedshot = "Хедшот!",
ubit = "Убит!",
krit = "КРИТ",
}),
HostedArenaHud = table.freeze({
vObscheeLobbi = "‹ В ОБЩЕЕ ЛОББИ",
sozdatArenu = "+ СОЗДАТЬ АРЕНУ",
arenaSessii = "АРЕНА СЕССИИ",
publichnyeAreny = "ПУБЛИЧНЫЕ АРЕНЫ",
obnovit = "ОБНОВИТЬ",
pokazatEschyo = "ПОКАЗАТЬ ЕЩЁ",
sozdanieAreny = "СОЗДАНИЕ АРЕНЫ",
publichnaya = "ПУБЛИЧНАЯ",
privatnaya = "ПРИВАТНАЯ",
startovyyRezhim = "СТАРТОВЫЙ РЕЖИМ",
razreshitSmenuRezhimov = "Разрешить смену режимов",
podklyuchitSya = "ПОДКЛЮЧИТЬСЯ ›",
vybrat = "ВЫБРАТЬ",
sinie = "СИНИЕ",
oranzhevye = "ОРАНЖЕВЫЕ",
priglashenieNaArenu = "ПРИГЛАШЕНИЕ НА АРЕНУ",
prinyatY = "ПРИНЯТЬ [Y]",
otklonitU = "ОТКЛОНИТЬ [U]",
vybranoDD = "ВЫБРАНО %d / %d",
otvetZaderzhalsyaPoprobuyteSnova = "Ответ задержался. Попробуйте снова.",
vklyucheno = "ВКЛЮЧЕНО",
vyklyucheno = "ВЫКЛЮЧЕНО",
golosovaniePosleRaunda = "Голосование после раунда",
odinRezhimNaVse = "Один режим на все раунды",
vyberiteIgrokovSEtogo = "Выберите игроков с этого сервера и отправьте приглашения.",
naServerePokaNet = "На сервере пока нет других игроков.",
vLokalNomTeste = "В локальном тесте публичная арена доступна игрокам этого сеанса Studio.",
lyuboyIgrokSmozhetPodklyuchit = "Любой игрок сможет подключиться через список публичных арен.",
otmenitPriglasheniya = "ОТМЕНИТЬ ПРИГЛАШЕНИЯ",
otpravitPriglasheniya = "ОТПРАВИТЬ ПРИГЛАШЕНИЯ",
sozdatArenu2 = "СОЗДАТЬ АРЕНУ",
pokaNikogo = "Пока никого",
vashaKomanda = "ВАША КОМАНДА",
netMest = "НЕТ МЕСТ",
balansKomand = "БАЛАНС КОМАНД",
vybrano = "ВЫБРАНО",
vkhodNaArenu = "ВХОД НА АРЕНУ…",
proveryaemKomandu = "ПРОВЕРЯЕМ КОМАНДУ…",
podklyuchitSyaZaSinikh = "ПОДКЛЮЧИТЬСЯ ЗА СИНИХ ›",
podklyuchitSyaZaOranzhevykh = "ПОДКЛЮЧИТЬСЯ ЗА ОРАНЖЕВЫХ ›",
vyVKomandeSinikh = "ВЫ В КОМАНДЕ СИНИХ",
vyVKomandeOranzhevykh = "ВЫ В КОМАНДЕ ОРАНЖЕВЫХ",
podklyuchaemsya = "Подключаемся…",
zagruzhaemSostavy = "Загружаем составы…",
arenaZapolnena = "Арена заполнена.",
podklyuchenieOtkroetsyaSNachalom = "Подключение откроется с началом раунда.",
vybrannayaKomandaPokaNedostupna = "Выбранная команда пока недоступна.",
vyberiteKomandu = "Выберите команду.",
dinamicheskayaArena = "Динамическая арена",
priglasheniePrinyato = "ПРИГЛАШЕНИЕ ПРИНЯТО",
otmenitU = "ОТМЕНИТЬ [U]",
sozdatel = "Создатель · @",
spisokPublichnykhArenVremenno = "Список публичных арен временно недоступен.",
arenaZakrylasIliSostavy = "Арена закрылась или составы временно недоступны.",
vVybrannoyKomandeNet = "В выбранной команде нет мест.",
sostavyIzmenilisPodklyuchitesEschyo = "Составы изменились. Подключитесь ещё раз.",
dozhditesNachalaSleduyuschegoRaunda = "Дождитесь начала следующего раунда.",
personazhEschyoZagruzhaetsyaPoprobuyte = "Персонаж ещё загружается. Попробуйте снова.",
proveryaemDostupKArene = "Проверяем доступ к арене. Попробуйте через секунду.",
neUdalosPodklyuchitSya = "Не удалось подключиться.",
vladelets = "Владелец · ",
arenaZapolnenaMozhnoVernut = "Арена заполнена. Можно вернуться в общее лобби.",
vybrannayaKomandaNedostupna = "Выбранная команда недоступна.",
prinyaliDZhdyomD = "Приняли %d · Ждём %d · %02d с",
}),
TrophyBalance = table.freeze({
trofei = "ТРОФЕИ",
}),
MatchVoteHud = table.freeze({
sleduyuschiyRezhim = "СЛЕДУЮЩИЙ РЕЖИМ",
vashGolos = "Ваш голос · ",
navediteNaRezhimChtoby = "Наведите на режим, чтобы увидеть его правила.",
dinamicheskayaArena = "ДИНАМИЧЕСКАЯ АРЕНА",
golosovanieZakryto = "ГОЛОСОВАНИЕ ЗАКРЫТО",
rezhimVybran = "РЕЖИМ ВЫБРАН",
sleduyuschiyRaund = "СЛЕДУЮЩИЙ РАУНД",
vyVozvraschaetesVLobbi = "ВЫ ВОЗВРАЩАЕТЕСЬ В ЛОББИ",
vsego = " / Всего ",
vyberiteRezhimVsegoGolosov = "Выберите режим · Всего голосов ",
}),
PowerUpCatalog = table.freeze({
turboiskra = "Турбоискра",
kSkorostiNaSek = "+30% к скорости на 4 сек.",
lunnayaPruzhina = "Лунная пружина",
sleduyuschiyPryzhokVysheNa = "Следующий прыжок выше на 80% · 18 сек.",
vtoroyImpulS = "Второй импульс",
odinPryzhokVVozdukhe = "Один прыжок в воздухе · 8 сек.",
peroBuri = "Перо бури",
uderzhivayProbelDlyaPlavnogo = "Удерживай пробел для плавного падения · 5 сек.",
khrustalNyySchit = "Хрустальный щит",
pogloschaetUronaSek = "Поглощает 25 урона · 7 сек.",
iskraZhizni = "Искра жизни",
vosstanavlivaetHp = "Восстанавливает 25 HP",
zolotoyMagnit = "Золотой магнит",
prityagivanieMonetSStudov = "Притягивание монет с 20 студов · 8 сек.",
zolotayaZhila = "Золотая жила",
kTsennostiSleduyuschikhPyati = "+25% к ценности следующих пяти монет",
bystryeRuki = "Быстрые руки",
sleduyuschayaPerezaryadkaVdvoeBystree = "Следующая перезарядка вдвое быстрее",
zapasnoyMagazin = "Запасной магазин",
mgnovennoPopolnyaetMagazin = "Мгновенно пополняет магазин",
stalNayaKhvatka = "Стальная хватка",
menSheOtdachiI = "Меньше отдачи и разброса · 5 сек.",
shyopot = "Шёпот",
priglushaetShagiNaSek = "Приглушает шаги на 6 сек.",
fantom = "Фантом",
sozdayotDvizhuschuyusyaKopiyuNa = "Создаёт движущуюся копию на 2 сек.",
grozovayaPechat = "Грозовая печать",
sleduyuscheePrizemlenieZamedlyaetVragov = "Следующее приземление замедляет врагов",
iskraOtryada = "Искра отряда",
kSkorostiTebeI = "+20% к скорости тебе и ближайшим союзникам · 3 сек.",
}),
LobbyCamera = table.freeze({
vozrozhdenie = "Возрождение…",
}),
SiegeResults = table.freeze({
rubezhDSinieS = "Рубеж %d · Синие %s · Оранжевые %s",
priRavenstveRubezheyPobezhdaet = "При равенстве рубежей побеждает команда, быстрее дошедшая до последнего взятого.",
}),
Common = table.freeze({
netSvobodnogoMestaDlya = "Нет свободного места для рубежа:",
}),
RifleSkinCatalog = table.freeze({
goluboePlamya = "Голубое пламя",
grozovoyKlinok = "Грозовой клинок",
alayaPechat = "Алая печать",
sakura = "Сакура",
neonovyySboy = "Неоновый сбой",
lunnayaOrbita = "Лунная орбита",
}),
ProceduralArena = table.freeze({
bastiony = "Бастионы",
galerei = "Галереи",
terrasy = "Террасы",
parnyeTonneli = "Парные тоннели",
tonnelSoSmescheniem = "Тоннель со смещением",
triProkhoda = "Три прохода",
bokovyePodYomy = "Боковые подъёмы",
tortsevyePodYomy = "Торцевые подъёмы",
uglovyePodYomy = "Угловые подъёмы",
bazaSinikh = "БАЗА СИНИХ",
bazaOranzhevykh = "БАЗА ОРАНЖЕВЫХ",
}),
}),
round = round, round = round,
studs = studs, studs = studs,
domination = domination, domination = domination,
+3 -1
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.LobbyCamera
-- V toggles the lobby camera. Arena entry always selects first person. -- V toggles the lobby camera. Arena entry always selects first person.
local Players = game:GetService("Players") local Players = game:GetService("Players")
@@ -32,7 +34,7 @@ message.Position = UDim2.fromScale(.5, .5)
message.Size = UDim2.new(1, -32, 0, 38) message.Size = UDim2.new(1, -32, 0, 38)
message.BackgroundTransparency = 1 message.BackgroundTransparency = 1
message.Font = Enum.Font.GothamBold message.Font = Enum.Font.GothamBold
message.Text = "Возрождение…" message.Text = Text.vozrozhdenie
message.TextSize = 24 message.TextSize = 24
message.TextColor3 = Color3.fromRGB(240, 244, 255) message.TextColor3 = Color3.fromRGB(240, 244, 255)
message.Parent = cover message.Parent = cover
+11 -9
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.MatchVoteHud
local Players = game:GetService("Players") local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService") local RunService = game:GetService("RunService")
@@ -38,7 +40,7 @@ local function leftLabel(parent: Instance, name: string, text: string, x: number
item.TextXAlignment = Enum.TextXAlignment.Left item.TextXAlignment = Enum.TextXAlignment.Left
return item return item
end end
local title = leftLabel(panel, "Title", "СЛЕДУЮЩИЙ РЕЖИМ", 25, 16, 625, 43, 33, UI.Ink) local title = leftLabel(panel, "Title", Text.sleduyuschiyRezhim, 25, 16, 625, 43, 33, UI.Ink)
title.FontFace = UI.Display title.FontFace = UI.Display
local arenaText = leftLabel(panel, "Arena", "", 26, 57, 620, 21, 14, UI.Muted) local arenaText = leftLabel(panel, "Arena", "", 26, 57, 620, 21, 14, UI.Muted)
local clock = UI.label(panel, "Countdown", "", UDim2.fromOffset(775, 19), UDim2.fromOffset(139, 44), 30, UI.Blue) local clock = UI.label(panel, "Countdown", "", UDim2.fromOffset(775, 19), UDim2.fromOffset(139, 44), 30, UI.Blue)
@@ -76,9 +78,9 @@ end
local function refreshDetail() local function refreshDetail()
local rule = Rules.find(if locked then selectedRule else hoveredRule or selectedRule) local rule = Rules.find(if locked then selectedRule else hoveredRule or selectedRule)
if locked then if locked then
detail.Text = if rule then "Ваш голос · " .. rule.title else "" detail.Text = if rule then Text.vashGolos .. rule.title else ""
else else
detail.Text = if rule then rule.detail else "Наведите на режим, чтобы увидеть его правила." detail.Text = if rule then rule.detail else Text.navediteNaRezhimChtoby
end end
end end
@@ -133,8 +135,8 @@ local function startBallot(id: string, endsAt: number, timeLeft: number)
locked, revealEndsAt = false, nil locked, revealEndsAt = false, nil
local match = Modes.state(state, id) local match = Modes.state(state, id)
duration = (match:GetAttribute("PhaseDuration") :: number?) or timeLeft duration = (match:GetAttribute("PhaseDuration") :: number?) or timeLeft
title.Text = "СЛЕДУЮЩИЙ РЕЖИМ" title.Text = Text.sleduyuschiyRezhim
arenaText.Text = "ДИНАМИЧЕСКАЯ АРЕНА" arenaText.Text = Text.dinamicheskayaArena
clock.Visible, line.Visible = true, true clock.Visible, line.Visible = true, true
clock.TextColor3, fill.BackgroundColor3 = UI.Blue, UI.Blue clock.TextColor3, fill.BackgroundColor3 = UI.Blue, UI.Blue
caption.TextXAlignment, detail.TextXAlignment = Enum.TextXAlignment.Left, Enum.TextXAlignment.Left caption.TextXAlignment, detail.TextXAlignment = Enum.TextXAlignment.Left, Enum.TextXAlignment.Left
@@ -157,7 +159,7 @@ local function lockBallot()
hoveredRule = nil hoveredRule = nil
clock.TextColor3 = Color3.fromRGB(212, 212, 212) clock.TextColor3 = Color3.fromRGB(212, 212, 212)
fill.BackgroundColor3 = Color3.fromRGB(145, 145, 145) fill.BackgroundColor3 = Color3.fromRGB(145, 145, 145)
caption.Text = "ГОЛОСОВАНИЕ ЗАКРЫТО" caption.Text = Text.golosovanieZakryto
refreshDetail() refreshDetail()
for _, slot in cards do for _, slot in cards do
assert(slot.card.button).Interactable = false assert(slot.card.button).Interactable = false
@@ -171,10 +173,10 @@ local function reveal(outcome: Outcome, now: number)
if revealEndsAt or not winner then return end if revealEndsAt or not winner then return end
lockBallot() lockBallot()
revealEndsAt = math.max(outcome.endsAt, now + 1.35) revealEndsAt = math.max(outcome.endsAt, now + 1.35)
title.Text = "РЕЖИМ ВЫБРАН" title.Text = Text.rezhimVybran
clock.Visible, line.Visible = false, false clock.Visible, line.Visible = false, false
caption.TextXAlignment, detail.TextXAlignment = Enum.TextXAlignment.Center, Enum.TextXAlignment.Center caption.TextXAlignment, detail.TextXAlignment = Enum.TextXAlignment.Center, Enum.TextXAlignment.Center
caption.Text = if selectedRule then "СЛЕДУЮЩИЙ РАУНД" else "ВЫ ВОЗВРАЩАЕТЕСЬ В ЛОББИ" caption.Text = if selectedRule then Text.sleduyuschiyRaund else Text.vyVozvraschaetesVLobbi
detail.Text = Rules.get(outcome.winner).detail detail.Text = Rules.get(outcome.winner).detail
local center = Vector2.new(panelWidth / 2, panelHeight / 2) local center = Vector2.new(panelWidth / 2, panelHeight / 2)
for _, slot in cards do for _, slot in cards do
@@ -219,7 +221,7 @@ local received = vote.OnClientEvent:Connect(function(id: string, endsAt: number,
refreshDetail() refreshDetail()
if not locked then if not locked then
local own = Rules.find(selection) local own = Rules.find(selection)
caption.Text = if own then "Ваш голос · " .. own.title .. " / Всего " .. total else "Выберите режим · Всего голосов " .. total caption.Text = if own then Text.vashGolos .. own.title .. Text.vsego .. total else Text.vyberiteRezhimVsegoGolosov .. total
end end
end) end)
+5 -3
View File
@@ -1,8 +1,10 @@
--!strict --!strict
local Diagnostics = require(script.Parent.ZoneDiagnostics)
local Types = require(script.Parent.Types) local Types = require(script.Parent.Types)
local HotPoint = require(script.Parent.Parent.HotPoint) local HotPoint = require(script.Parent.Parent.HotPoint)
local Sites = require(script.Parent.Parent.ArenaObjectiveSites) local Sites = require(script.Parent.Parent.ArenaObjectiveSites)
local Strings = require(game.ReplicatedStorage.Hunter.Strings) local Strings = require(game.ReplicatedStorage.Hunter.Strings)
local Text = Strings.interface.Common
type Side = Types.Side type Side = Types.Side
type Fighter = Types.Fighter type Fighter = Types.Fighter
export type Marker = HotPoint.Marker & {recolor: ((Color3) -> ())?} export type Marker = HotPoint.Marker & {recolor: ((Color3) -> ())?}
@@ -11,7 +13,7 @@ local sides: {Side} = {"Blue", "Orange"}
local blue = Color3.fromRGB(67, 216, 255) local blue = Color3.fromRGB(67, 216, 255)
local orange = Color3.fromRGB(255, 150, 68) local orange = Color3.fromRGB(255, 150, 68)
local gold = Color3.fromRGB(255, 220, 96) local gold = Color3.fromRGB(255, 220, 96)
local neutral = Color3.fromRGB(188, 150, 255) local neutral = Color3.fromRGB(255, 220, 96)
local function opposite(side: Side): Side local function opposite(side: Side): Side
return if side == "Blue" then "Orange" else "Blue" return if side == "Blue" then "Orange" else "Blue"
end end
@@ -88,12 +90,12 @@ local function paint(mark: Marker, tint: Color3)
if aura then aura.Color = tint end if aura then aura.Color = tint end
end end
local function visibleAt(fighter: Fighter, at: Vector3, geometry: RaycastParams): boolean local function visibleAt(fighter: Fighter, at: Vector3, geometry: RaycastParams): boolean
return workspace:Raycast(fighter.root.Position, at - fighter.root.Position, geometry) == nil return Diagnostics.raycast(fighter.root.Position, at - fighter.root.Position, geometry) == nil
end end
local function makeZone(folder: Folder, geometry: RaycastParams, site: Sites.Site, name: string, radius: number?, tint: Color3?): Zone local function makeZone(folder: Folder, geometry: RaycastParams, site: Sites.Site, name: string, radius: number?, tint: Color3?): Zone
local r = radius or HotPoint.Radius local r = radius or HotPoint.Radius
local center, fits = Sites.clearCircle(site.position, geometry, r) local center, fits = Sites.clearCircle(site.position, geometry, r)
if radius and not fits then warn("Нет свободного места для рубежа:", site.name) end if radius and not fits then warn(Text.netSvobodnogoMestaDlya, site.name) end
site = {name = site.name, position = center} site = {name = site.name, position = center}
return {site = site, marker = ring(folder, name, site.name, center, tint or neutral, r), owner = nil, claiming = nil, progress = 0} return {site = site, marker = ring(folder, name, site.name, center, tint or neutral, r), owner = nil, claiming = nil, progress = 0}
end end
+2
View File
@@ -7,9 +7,11 @@ local remote = if existing and existing:IsA("RemoteEvent") then existing else In
remote.Name = "ArenaObjectiveEvent" remote.Name = "ArenaObjectiveEvent"
remote.Parent = ReplicatedStorage remote.Parent = ReplicatedStorage
local Events = {} local Events = {}
local Diagnostics = require(script.Parent.ZoneDiagnostics)
function Events.new(members: () -> {Player}): Types.Events function Events.new(members: () -> {Player}): Types.Events
return {fire = function(kind, payload, audience) return {fire = function(kind, payload, audience)
Diagnostics.event()
local packet = table.clone(payload or {}) :: {[string]: any} local packet = table.clone(payload or {}) :: {[string]: any}
packet.t = workspace:GetServerTimeNow() packet.t = workspace:GetServerTimeNow()
for _, player in members() do for _, player in members() do
+7 -35
View File
@@ -4,12 +4,13 @@ local Types = require(Runtime.Types)
local Common = require(Runtime.Common) local Common = require(Runtime.Common)
local Kinds = require(game.ReplicatedStorage.Hunter.EventKinds) local Kinds = require(game.ReplicatedStorage.Hunter.EventKinds)
local Strings = require(game.ReplicatedStorage.Hunter.Strings) local Strings = require(game.ReplicatedStorage.Hunter.Strings)
local Diagnostics = require(Runtime.ZoneDiagnostics)
local Context = require(Runtime.Context) local Context = require(Runtime.Context)
local Rules = require(Runtime.FlagRules) local Rules = require(Runtime.FlagRules)
local HotPoint = require(Runtime.Parent.HotPoint) local HotPoint = require(Runtime.Parent.HotPoint)
type Fighter = Types.Fighter type Fighter = Types.Fighter
type Flag = { type Flag = {
marker: Common.Marker, stars: ParticleEmitter, mist: ParticleEmitter, light: PointLight, banner: BasePart, marker: Common.Marker, light: PointLight, banner: BasePart,
carrier: Player?, tether: WeldConstraint?, droppedUntil: number, carrier: Player?, tether: WeldConstraint?, droppedUntil: number,
} }
local function makeFlag(parent: Instance, roof: Vector3): Flag local function makeFlag(parent: Instance, roof: Vector3): Flag
@@ -35,33 +36,7 @@ local function makeFlag(parent: Instance, roof: Vector3): Flag
local banner = attach("Banner", Vector3.new(2.65, 1.48, .15), Vector3.new(1.35, 1.45, 0), Common.gold) local banner = attach("Banner", Vector3.new(2.65, 1.48, .15), Vector3.new(1.35, 1.45, 0), Common.gold)
attach("CrownLight", Vector3.new(.33, .33, .33), Vector3.yAxis * 2.34, Common.neutral).Shape = Enum.PartType.Ball attach("CrownLight", Vector3.new(.33, .33, .33), Vector3.yAxis * 2.34, Common.neutral).Shape = Enum.PartType.Ball
local aura = Instance.new("Attachment") return {marker = mark, light = light, banner = banner,
aura.Name = "FlagAura"
aura.Position = -Vector3.yAxis * 1.75
aura.Parent = body
local stars = Instance.new("ParticleEmitter")
stars.Name = "Stars"
stars.Texture = "rbxasset://textures/particles/sparkles_main.dds"
stars.Color = ColorSequence.new(Common.neutral, Common.gold)
stars.LightEmission, stars.LightInfluence = 1, 0
stars.Rate, stars.Speed, stars.Lifetime = 24, NumberRange.new(3, 6), NumberRange.new(.7, 1.4)
stars.SpreadAngle = Vector2.new(65, 65)
stars.Rotation, stars.RotSpeed = NumberRange.new(-180, 180), NumberRange.new(-90, 90)
stars.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, .22), NumberSequenceKeypoint.new(.4, .52), NumberSequenceKeypoint.new(1, 0)})
stars.Parent = aura
local mist = Instance.new("ParticleEmitter")
mist.Name = "ColoredMist"
mist.Texture = "rbxasset://textures/particles/smoke_main.dds"
mist.Color = ColorSequence.new(Common.neutral, Common.gold)
mist.LightEmission, mist.LightInfluence = .55, 0
mist.Rate, mist.Speed, mist.Lifetime = 9, NumberRange.new(1, 4), NumberRange.new(.7, 1.2)
mist.SpreadAngle = Vector2.new(110, 110)
mist.Size = NumberSequence.new(1.4, 4)
mist.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, .72), NumberSequenceKeypoint.new(.45, .79), NumberSequenceKeypoint.new(1, 1)})
mist.Parent = aura
return {marker = mark, stars = stars, mist = mist, light = light, banner = banner,
carrier = nil, tether = nil, droppedUntil = 0} carrier = nil, tether = nil, droppedUntil = 0}
end end
@@ -88,8 +63,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
mark.body.CFrame = CFrame.new(at + Vector3.yAxis * 2.4) mark.body.CFrame = CFrame.new(at + Vector3.yAxis * 2.4)
mark.label.Text = if droppedUntil > 0 then Strings.flagDropLabel else Strings.flagRoofLabel mark.label.Text = if droppedUntil > 0 then Strings.flagDropLabel else Strings.flagRoofLabel
mark.label.TextColor3, object.banner.Color = Common.gold, Common.gold mark.label.TextColor3, object.banner.Color = Common.gold, Common.gold
object.stars.Enabled, object.mist.Enabled, object.light.Enabled = true, true, true object.light.Enabled = true
object.stars:Emit(16)
end end
local function pickUpFlag(object: Flag, fighter: Fighter) local function pickUpFlag(object: Flag, fighter: Fighter)
@@ -108,14 +82,12 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
local tint = Common.color(fighter.side) local tint = Common.color(fighter.side)
object.marker.label.Text = Strings.flagCarrierLabel(fighter.player.DisplayName) object.marker.label.Text = Strings.flagCarrierLabel(fighter.player.DisplayName)
object.marker.label.TextColor3, object.banner.Color = tint, tint object.marker.label.TextColor3, object.banner.Color = tint, tint
object.stars.Enabled, object.mist.Enabled, object.light.Enabled = false, false, false object.light.Enabled = false
object.stars:Clear()
object.mist:Clear()
end end
local function dropCarried(player: Player, at: Vector3?, now: number, fighters: {Fighter}?) local function dropCarried(player: Player, at: Vector3?, now: number, fighters: {Fighter}?)
if flag.carrier == player then if flag.carrier == player then
if at then if at then
local floor = workspace:Raycast(at + Vector3.yAxis * .3, -Vector3.yAxis * 50, geometry) local floor = Diagnostics.raycast(at + Vector3.yAxis * .3, -Vector3.yAxis * 50, geometry)
if floor then if floor then
putFlag(flag, floor.Position, now + Rules.RETURN_SECONDS) putFlag(flag, floor.Position, now + Rules.RETURN_SECONDS)
for _, fighter in (fighters or Context.collect(ctx.members())) do ctx.legacy(fighter.player, "FlagDropped") end for _, fighter in (fighters or Context.collect(ctx.members())) do ctx.legacy(fighter.player, "FlagDropped") end
@@ -140,7 +112,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
if Common.boundsAt(fighter.root.Position, base, HotPoint.Radius, 7) then if Common.boundsAt(fighter.root.Position, base, HotPoint.Radius, 7) then
ctx.scoring.add(fighter.side, 1, Kinds.FlagScored, fighter.player) ctx.scoring.add(fighter.side, 1, Kinds.FlagScored, fighter.player)
ctx.contribute(fighter.player, "deliveries", 1) ctx.contribute(fighter.player, "deliveries", 1)
ctx.events.fire(Kinds.FlagScored, {side = fighter.side, userId = fighter.player.UserId}) ctx.events.fire(Kinds.FlagScored, {side = fighter.side, userId = fighter.player.UserId, at = base})
ctx.cue(fighters, true, nil) ctx.cue(fighters, true, nil)
putFlag(flag, flag.marker.origin, 0) putFlag(flag, flag.marker.origin, 0)
ctx.events.fire(Kinds.FlagReturned, {at = flag.marker.origin}) ctx.events.fire(Kinds.FlagReturned, {at = flag.marker.origin})
+2 -2
View File
@@ -19,7 +19,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
end, end,
score = function(side, points) score = function(side, points)
ctx.scoring.add(side, points, Kinds.ZoneCaptured) ctx.scoring.add(side, points, Kinds.ZoneCaptured)
ctx.events.fire(Kinds.ZoneCaptured, {side = side, text = Strings.hotPoint, value = nowAt - ctx.liveAt}) ctx.events.fire(Kinds.ZoneCaptured, {side = side, text = Strings.hotPoint, value = nowAt - ctx.liveAt, at = ctx.state:GetAttribute("HotPointPosition") :: Vector3?})
end, end,
status = ctx.status, contribute = ctx.contribute, status = ctx.status, contribute = ctx.contribute,
}) })
@@ -29,7 +29,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
capture.step(fighters, now, elapsed or dt) capture.step(fighters, now, elapsed or dt)
local contested = ctx.state:GetAttribute("HotPointPhase") == "Contested" local contested = ctx.state:GetAttribute("HotPointPhase") == "Contested"
if contested and not wasContested then if contested and not wasContested then
ctx.events.fire(Kinds.ZoneContested, {text = Strings.hotPoint}) ctx.events.fire(Kinds.ZoneContested, {text = Strings.hotPoint, at = ctx.state:GetAttribute("HotPointPosition") :: Vector3?})
end end
wasContested = contested wasContested = contested
return false return false
+3 -4
View File
@@ -42,7 +42,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
zone.marker.body.Parent = nil zone.marker.body.Parent = nil
ctx.janitor.give(zone.marker.body) ctx.janitor.give(zone.marker.body)
table.insert(zones, zone) table.insert(zones, zone)
table.insert(visuals, Effects.new(zone.marker, folder, ctx.janitor)) table.insert(visuals, Effects.new(zone.marker))
end end
data:SetAttribute("Total", #zones) data:SetAttribute("Total", #zones)
local siegeTimes: Score.Ledger = {Blue = {}, Orange = {}} local siegeTimes: Score.Ledger = {Blue = {}, Orange = {}}
@@ -156,7 +156,6 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
local tint = if phase == "Idle" then Common.gold elseif phase == "Contested" then SiegeConfig.CONTESTED_COLOR local tint = if phase == "Idle" then Common.gold elseif phase == "Contested" then SiegeConfig.CONTESTED_COLOR
elseif phase == "Decaying" then teamTint:Lerp(Color3.fromRGB(150, 162, 182), .45) else teamTint elseif phase == "Decaying" then teamTint:Lerp(Color3.fromRGB(150, 162, 182), .45) else teamTint
Common.paint(zone.marker, tint) Common.paint(zone.marker, tint)
visual.update(tint, phase, progress, phase ~= lastStatus)
if phase == "Contested" and lastStatus ~= phase then if phase == "Contested" and lastStatus ~= phase then
ctx.events.fire(Kinds.ZoneContested, {side = siegeSide, index = siegeIndex, at = zone.site.position}) ctx.events.fire(Kinds.ZoneContested, {side = siegeSide, index = siegeIndex, at = zone.site.position})
end end
@@ -164,11 +163,11 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
if phase ~= "Captured" or not Score.record(siegeTimes, siegeSide, siegeIndex, elapsed - attackStart) then return false end if phase ~= "Captured" or not Score.record(siegeTimes, siegeSide, siegeIndex, elapsed - attackStart) then return false end
ctx.scoring.add(siegeSide, SiegeConfig.POINTS_PER_OBJECTIVE, Kinds.ZoneCaptured) ctx.scoring.add(siegeSide, SiegeConfig.POINTS_PER_OBJECTIVE, Kinds.ZoneCaptured)
for _, player in attackers do ctx.contribute(player, "captures", 1) end for _, player in attackers do ctx.contribute(player, "captures", 1) end
ctx.events.fire(Kinds.ZoneCaptured, {side = siegeSide, index = siegeIndex, text = zone.site.name, value = elapsed - attackStart}) ctx.events.fire(Kinds.ZoneCaptured, {side = siegeSide, index = siegeIndex, text = zone.site.name, value = elapsed - attackStart, at = zone.site.position})
ctx.cue(fighters, true, nil) ctx.cue(fighters, true, nil)
siegeCaptureStarted = false siegeCaptureStarted = false
data:SetAttribute(siegeSide .. "Time" .. siegeIndex, elapsed - attackStart) data:SetAttribute(siegeSide .. "Time" .. siegeIndex, elapsed - attackStart)
visual.capture(teamTint) visual.capture()
siegeIndex += 1 siegeIndex += 1
siegeProgress = 0 siegeProgress = 0
if siegeIndex > #zones then if siegeIndex > #zones then
+10 -15
View File
@@ -7,8 +7,8 @@ local Strings = require(game.ReplicatedStorage.Hunter.Strings)
type Fighter = Types.Fighter type Fighter = Types.Fighter
local HotPoint = require(Runtime.Parent.HotPoint) local HotPoint = require(Runtime.Parent.HotPoint)
local Rules = require(Runtime.TrophyRules) local Rules = require(Runtime.TrophyRules)
local TweenService = game:GetService("TweenService") local Diagnostics = require(Runtime.ZoneDiagnostics)
type Drop = {marker: Common.Marker, amount: number, expires: number, fade: Tween?} type Drop = {marker: Common.Marker, amount: number, expires: number}
local function start(ctx: Types.ModeContext): Types.ModeInstance local function start(ctx: Types.ModeContext): Types.ModeInstance
local map, geometry, folder = assert(ctx.map), ctx.geometry, ctx.folder local map, geometry, folder = assert(ctx.map), ctx.geometry, ctx.folder
@@ -16,7 +16,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
local tokens: {Drop} = {} local tokens: {Drop} = {}
local carried: {[Player]: number} = {} local carried: {[Player]: number} = {}
local function floorAt(at: Vector3): Vector3 local function floorAt(at: Vector3): Vector3
local hit = workspace:Raycast(at + Vector3.yAxis * .3, -Vector3.yAxis * 50, geometry) local hit = Diagnostics.raycast(at + Vector3.yAxis * .3, -Vector3.yAxis * 50, geometry)
return if hit then hit.Position else map.ground.position return if hit then hit.Position else map.ground.position
end end
local function tokenDrop(at: Vector3, amount: number, now: number) local function tokenDrop(at: Vector3, amount: number, now: number)
@@ -26,38 +26,34 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
if Rules.canMerge(existing.marker.origin, floor) then if Rules.canMerge(existing.marker.origin, floor) then
existing.amount += amount existing.amount += amount
existing.expires = now + Rules.LIFETIME existing.expires = now + Rules.LIFETIME
if existing.fade then existing.fade:Cancel(); existing.fade = nil end existing.marker.body:SetAttribute("TokenExpiresAt", existing.expires)
existing.marker.body.Transparency = .04
existing.marker.label.Text = Strings.tokens(existing.amount) existing.marker.label.Text = Strings.tokens(existing.amount)
return return
end end
end end
if #tokens >= Rules.MAX_DROPS then if #tokens >= Rules.MAX_DROPS then
local old = table.remove(tokens, 1) local old = table.remove(tokens, 1)
if old.fade then old.fade:Cancel() end
old.marker.body:Destroy() old.marker.body:Destroy()
end end
table.insert(tokens, {marker = Common.marker(folder, "Tokens", Strings.tokens(amount), floor, Common.gold, 1.55, true), amount = amount, expires = now + Rules.LIFETIME}) local mark = Common.marker(folder, "Tokens", Strings.tokens(amount), floor, Common.gold, 1.55, true)
mark.body:SetAttribute("TokenExpiresAt", now + Rules.LIFETIME)
mark.body:SetAttribute("TokenFlashSeconds", Rules.FLASH_SECONDS)
table.insert(tokens, {marker = mark, amount = amount, expires = now + Rules.LIFETIME})
end end
local function runTrophies(fighters: {Fighter}, now: number) local function runTrophies(fighters: {Fighter}, now: number)
for i = #tokens, 1, -1 do for i = #tokens, 1, -1 do
local token = tokens[i] local token = tokens[i]
local collector: Fighter? = nil local collector: Fighter? = nil
if now < token.expires then if now < token.expires then
if token.expires - now <= Rules.FLASH_SECONDS and not token.fade then
token.fade = TweenService:Create(token.marker.body,TweenInfo.new(.38,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,-1,true),{Transparency=.76})
token.fade:Play()
end
for _, f in fighters do for _, f in fighters do
if Common.boundsAt(f.root.Position, token.marker.origin, 5, 6) and Common.visibleAt(f, token.marker.body.Position, geometry) then collector = f; break end if Common.boundsAt(f.root.Position, token.marker.origin, 5, 6) and Common.visibleAt(f, token.marker.body.Position, geometry) then collector = f; break end
end end
if not collector then continue end if not collector then continue end
local p = collector.player local p = collector.player
if not carried[p] then ctx.cue(fighters, false, collector.side) end if not carried[p] then ctx.events.fire(Kinds.TokenPicked, {userId = p.UserId}, {p}) end
carried[p] = (carried[p] or 0) + token.amount carried[p] = (carried[p] or 0) + token.amount
p:SetAttribute("ArenaTokens", carried[p]) p:SetAttribute("ArenaTokens", carried[p])
end end
if token.fade then token.fade:Cancel() end
token.marker.body:Destroy() token.marker.body:Destroy()
table.remove(tokens, i) table.remove(tokens, i)
end end
@@ -66,7 +62,7 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
if amount and Common.boundsAt(f.root.Position, if f.side == "Blue" then map.blue else map.orange, HotPoint.Radius, 7) then if amount and Common.boundsAt(f.root.Position, if f.side == "Blue" then map.blue else map.orange, HotPoint.Radius, 7) then
ctx.scoring.add(f.side, amount, Kinds.TokensBanked, f.player) ctx.scoring.add(f.side, amount, Kinds.TokensBanked, f.player)
ctx.contribute(f.player, "tokensBanked", amount) ctx.contribute(f.player, "tokensBanked", amount)
ctx.events.fire(Kinds.TokensBanked, {side = f.side, userId = f.player.UserId, value = amount}) ctx.events.fire(Kinds.TokensBanked, {side = f.side, userId = f.player.UserId, value = amount, at = if f.side == "Blue" then map.blue else map.orange})
ctx.cue(fighters, true, nil) ctx.cue(fighters, true, nil)
carried[f.player] = nil carried[f.player] = nil
f.player:SetAttribute("ArenaTokens", nil) f.player:SetAttribute("ArenaTokens", nil)
@@ -92,7 +88,6 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
death = drop, leaving = drop, death = drop, leaving = drop,
destroy = function() destroy = function()
for p in carried do p:SetAttribute("ArenaTokens", nil) end for p in carried do p:SetAttribute("ArenaTokens", nil) end
for _, token in tokens do if token.fade then token.fade:Cancel() end end
end, end,
}) })
end end
+6 -96
View File
@@ -1,109 +1,19 @@
--!strict --!strict
local TweenService = game:GetService("TweenService") local Common = require(script.Parent.Common)
local Runtime = script.Parent export type Rig = {show: () -> (), hide: () -> (), capture: () -> ()}
local Common = require(Runtime.Common)
local Types = require(Runtime.Types)
local Config = require(game.ReplicatedStorage.CitadelAssaultConfig)
export type Rig = {show: () -> (), hide: () -> (), update: (Color3, string, number, boolean) -> (), capture: (Color3) -> ()}
local function newPart(name: string, parent: Instance): Part
local p = Instance.new("Part")
p.Name, p.Shape, p.Material = name, Enum.PartType.Cylinder, Enum.Material.Neon
p.CanCollide, p.CanQuery, p.CanTouch, p.Anchored, p.CastShadow = false, false, false, true, false
p.Transparency = 1
p.Parent = parent
return p
end
local Effects = {} local Effects = {}
function Effects.new(mark: Common.Marker, folder: Folder, janitor: Types.Janitor): Rig function Effects.new(mark: Common.Marker): Rig
local root = Instance.new("Folder")
root.Name = "SiegeLight"
root.Parent = folder
local column = newPart("Column", root)
local wave = newPart("Shockwave", root)
local anchor = Instance.new("Attachment")
anchor.Parent = wave
local sparks = Instance.new("ParticleEmitter")
sparks.Texture = "rbxasset://textures/particles/sparkles_main.dds"
sparks.Speed, sparks.Lifetime, sparks.Rate = NumberRange.new(12, 25), NumberRange.new(.45, 1.2), 0
sparks.SpreadAngle = Vector2.new(145, 145)
sparks.LightEmission = 1
sparks.Parent = anchor
local diameter = Config.CAPTURE_RADIUS * 2
local rotation = CFrame.Angles(0, 0, math.pi / 2)
local floor = CFrame.new(mark.origin + Vector3.yAxis * .21) * rotation
wave.CFrame = floor
local width = 3.5
local fullColumn = CFrame.new(mark.origin + Vector3.yAxis * (Config.LIGHT_HEIGHT / 2)) * rotation
local motion: Tween? = nil
local lightMotion: Tween? = nil
local effect: Tween? = nil
local run = 0
local function cancel()
run += 1
if motion then motion:Cancel() end
if lightMotion then lightMotion:Cancel() end
if effect then effect:Cancel() end
end
local function hide() local function hide()
cancel() mark.body:SetAttribute("ObjectiveArrowHidden", true)
column.Transparency, wave.Transparency = 1, 1 mark.body.Parent = nil
sparks:Clear()
end end
janitor.give(hide)
return { return {
hide = hide, hide = hide,
show = function() show = function()
hide()
mark.body:SetAttribute("ObjectiveArrowHidden", nil) mark.body:SetAttribute("ObjectiveArrowHidden", nil)
mark.label.Visible = true
mark.body.Size = Vector3.new(.16, diameter * .15, diameter * .15)
mark.body.Transparency = .92
Common.paint(mark, Common.gold) Common.paint(mark, Common.gold)
column.Color = Common.gold
column.Size, column.CFrame = Vector3.new(.2, width, width), floor
column.Transparency = .85
local t = TweenInfo.new(Config.MATERIALIZE_SECONDS, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)
motion = TweenService:Create(mark.body, t, {Size = Vector3.new(.16, diameter, diameter)})
lightMotion = TweenService:Create(column, t, {CFrame = fullColumn, Size = Vector3.new(Config.LIGHT_HEIGHT, width, width)})
motion:Play()
lightMotion:Play()
end,
update = function(tint, phase, progress, changed)
column.Color = tint
column.Transparency = if phase == "Capturing" then 1 - (.55 + .45 * progress) * .25
elseif phase == "Decaying" then .94 else .86
if phase == "Contested" and changed then
wave.Color, wave.Transparency = tint, .68
wave.Size = Vector3.new(.12, diameter, diameter)
if effect then effect:Cancel() end
effect = TweenService:Create(wave, TweenInfo.new(.25), {Transparency = 1})
effect:Play()
end
end,
capture = function(tint)
cancel()
local token = run
Common.paint(mark, Color3.new(1, 1, 1))
mark.body:SetAttribute("ObjectiveArrowHidden", true)
mark.label.Visible = false
wave.Size = Vector3.new(.11, diameter, diameter)
wave.Color, wave.Transparency = tint, .55
sparks.Color = ColorSequence.new(tint)
sparks:Emit(Config.CONFETTI_COUNT)
local t = TweenInfo.new(Config.CAPTURE_EFFECT_SECONDS, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
motion = TweenService:Create(mark.body, t, {Size = Vector3.new(.16, .1, .1), Transparency = 1})
lightMotion = TweenService:Create(column, t, {Size = Vector3.new(.2, width, width), CFrame = floor, Transparency = 1})
effect = TweenService:Create(wave, t, {Size = Vector3.new(.11, diameter * 1.6, diameter * 1.6), Transparency = 1})
motion:Play()
lightMotion:Play()
effect:Play()
task.delay(Config.CAPTURE_EFFECT_SECONDS, function()
if token == run and mark.body.Parent == folder then mark.body.Parent = nil end
end)
end, end,
capture = hide,
} }
end end
return Effects return Effects
+33
View File
@@ -0,0 +1,33 @@
--!strict
local Config = require(game.ReplicatedStorage.Hunter.EffectsConfig)
local Diagnostics = {}
local stepping = false
local rays = 0
local events = 0
local window = 0
function Diagnostics.begin()
stepping = Config.Debug
rays = 0
end
function Diagnostics.raycast(origin: Vector3, direction: Vector3, geometry: RaycastParams): RaycastResult?
if stepping then rays += 1 end
return workspace:Raycast(origin, direction, geometry)
end
function Diagnostics.event()
if Config.Debug then events += 1 end
end
function Diagnostics.finish(state: Instance, fighters: number, now: number)
stepping = false
if not Config.Debug then return end
state:SetAttribute("DebugRays", rays)
state:SetAttribute("DebugFighters", fighters)
if now - window >= 1 then
state:SetAttribute("DebugEvents", events)
window, events = now, 0
end
end
return Diagnostics
+2 -1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
local Diagnostics = require(script.Parent.ZoneDiagnostics)
export type Spec = {radius: number, height: number, sightHeight: number, exclusiveHeight: boolean?} export type Spec = {radius: number, height: number, sightHeight: number, exclusiveHeight: boolean?}
export type Reason = "Outside" | "Height" | "Blocked" | "Inside" export type Reason = "Outside" | "Height" | "Blocked" | "Inside"
local Zones = {} local Zones = {}
@@ -14,6 +15,6 @@ function Zones.classify(position: Vector3, center: Vector3, spec: Spec, geometry
local candidate = Zones.reason(position - center, spec, false) local candidate = Zones.reason(position - center, spec, false)
if candidate ~= "Inside" then return candidate end if candidate ~= "Inside" then return candidate end
local target = center + Vector3.yAxis * spec.sightHeight local target = center + Vector3.yAxis * spec.sightHeight
return if workspace:Raycast(position, target - position, geometry) then "Blocked" else "Inside" return if Diagnostics.raycast(position, target - position, geometry) then "Blocked" else "Inside"
end end
return Zones return Zones
+32 -1
View File
@@ -4,12 +4,15 @@ local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService") local RunService = game:GetService("RunService")
local Modes = require(ReplicatedStorage:WaitForChild("ArenaModes") :: ModuleScript) local Modes = require(ReplicatedStorage:WaitForChild("ArenaModes") :: ModuleScript)
local Input = game:GetService("UserInputService")
local mobile = Input.TouchEnabled and not Input.KeyboardEnabled
local player = Players.LocalPlayer local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui") local playerGui = player:WaitForChild("PlayerGui")
local arena = Modes.geometry(Modes.Procedural) local arena = Modes.geometry(Modes.Procedural)
type Arrow = {gui: Frame, chevrons: {Model}, faces: {BasePart}, edges: {BasePart}, glow: {BasePart}, color: Color3?, phase: number} type Arrow = {gui: Frame, chevrons: {Model}, faces: {BasePart}, edges: {BasePart}, glow: {BasePart}, color: Color3?, phase: number}
local arrows: {[BasePart]: Arrow} = {} local arrows: {[BasePart]: Arrow} = {}
local SIZE = 156 local flatArrows: {[BasePart]: {TextLabel}} = {}
local SIZE = if mobile then 125 else 156
local HEIGHT = 105 local HEIGHT = 105
local MAX_DISTANCE = 710 local MAX_DISTANCE = 710
local ANIMATION_RATE = 2 * math.pi / 4.5 local ANIMATION_RATE = 2 * math.pi / 4.5
@@ -31,6 +34,26 @@ local function build(marker: BasePart)
gui.BackgroundTransparency = 1 gui.BackgroundTransparency = 1
gui.Visible = false gui.Visible = false
if mobile then
local glyphs: {TextLabel} = {}
for index, size in {16, 25, 33} do
local glyph = Instance.new("TextLabel")
glyph.BackgroundTransparency = 1
glyph.AnchorPoint = Vector2.new(.5, .5)
glyph.Size = UDim2.fromOffset(90, 38)
glyph.Font = Enum.Font.GothamBlack
glyph.Text = "⌄"
glyph.TextSize = size
glyph.TextStrokeTransparency = .15
glyph.Parent = gui
glyphs[index] = glyph
end
flatArrows[marker] = glyphs
arrows[marker] = {gui = gui, chevrons = {}, faces = {}, edges = {}, glow = {}, color = nil, phase = marker.Position.X * .03}
gui.Parent = overlay
return
end
local viewport = Instance.new("ViewportFrame") local viewport = Instance.new("ViewportFrame")
viewport.Name = "ArrowViewport" viewport.Name = "ArrowViewport"
viewport.BackgroundTransparency = 1 viewport.BackgroundTransparency = 1
@@ -87,6 +110,7 @@ local function remove(instance: Instance)
local arrow = arrows[instance] local arrow = arrows[instance]
if not arrow then return end if not arrow then return end
arrows[instance] = nil arrows[instance] = nil
flatArrows[instance] = nil
arrow.gui:Destroy() arrow.gui:Destroy()
end end
@@ -115,6 +139,13 @@ RunService:BindToRenderStep(renderName, Enum.RenderPriority.Camera.Value + 3, fu
arrow.gui.Position = UDim2.fromOffset(projected.X, y) arrow.gui.Position = UDim2.fromOffset(projected.X, y)
local spacing = 1.15 + math.sin(phase - .9) * .16 local spacing = 1.15 + math.sin(phase - .9) * .16
local flat = flatArrows[marker]
if flat then
for i, glyph in flat do
glyph.Position = UDim2.new(.5, 0, .5, (i - 2) * 18 * spacing)
glyph.TextColor3 = marker.Color:Lerp(Color3.new(1,1,1), .25)
end
end
for index, chevron in arrow.chevrons do for index, chevron in arrow.chevrons do
chevron:PivotTo(CFrame.new(0, (2 - index) * spacing, 0)) chevron:PivotTo(CFrame.new(0, (2 - index) * spacing, 0))
end end
+106
View File
@@ -0,0 +1,106 @@
--!strict
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local SoundService = game:GetService("SoundService")
local Sounds = require(ReplicatedStorage:WaitForChild("SniperEffects") :: ModuleScript)
local player = Players.LocalPlayer
local function cue(name: string, asset: string, looped: boolean): Sound
local sound = Instance.new("Sound")
sound.Name, sound.SoundId, sound.Looped = name, "rbxasset://sounds/" .. asset, looped
sound.Parent = SoundService
return sound
end
local steps = cue("HunterOwnSteps", "action_footsteps_plastic.mp3", true)
local jump = cue("HunterOwnJump", "action_jump.mp3", false)
local landing = cue("HunterOwnLanding", "action_jump_land.mp3", false)
local muted = Instance.new("SoundGroup")
muted.Name = "HunterOwnMovementSpatial"
muted.Volume = 0
muted.Parent = SoundService
local native = {Running = true, Jumping = true, Landing = true}
local groups: {[Sound]: SoundGroup?} = {}
local overridden: {Sound} = {}
local connections: {RBXScriptConnection} = {}
local humanoid: Humanoid? = nil
local root: BasePart? = nil
local function master(): number
return math.max(0, Sounds.setting("VolMaster", 1))
end
local function reset()
for _, connection in connections do connection:Disconnect() end
table.clear(connections)
for _, sound in overridden do
if sound.Parent and sound.SoundGroup == muted then sound.SoundGroup = groups[sound] end
end
table.clear(overridden)
table.clear(groups)
humanoid, root = nil, nil
steps:Stop()
jump:Stop()
landing:Stop()
end
local function watch(character: Model)
local human = character:WaitForChild("Humanoid", 10)
local part = character:WaitForChild("HumanoidRootPart", 10)
if player.Character ~= character or not human or not human:IsA("Humanoid") or not part or not part:IsA("BasePart") then return end
reset()
humanoid, root = human, part
local function muteDuplicate(child: Instance)
if child:IsA("Sound") and native[child.Name] and child.SoundGroup ~= muted then
groups[child] = child.SoundGroup
table.insert(overridden, child)
child.SoundGroup = muted
end
end
table.insert(connections, part.ChildAdded:Connect(muteDuplicate))
for _, child in part:GetChildren() do muteDuplicate(child) end
table.insert(connections, human.StateChanged:Connect(function(previous, current)
if part.Anchored or human.Health <= 0 then return end
local volume = master()
if volume <= 0 then return end
local sound = if current == Enum.HumanoidStateType.Jumping then jump
elseif current == Enum.HumanoidStateType.Landed and previous == Enum.HumanoidStateType.Freefall then landing else nil
if sound then
sound.Volume = volume * (if sound == jump then .26 else .21)
sound.TimePosition = 0
sound:Play()
end
end))
end
local added = player.CharacterAdded:Connect(watch)
local removing = player.CharacterRemoving:Connect(reset)
if player.Character then task.spawn(watch, player.Character) end
local update = RunService.Heartbeat:Connect(function()
local human, part = humanoid, root
local volume = master()
local speed = if part then Vector3.new(part.AssemblyLinearVelocity.X, 0, part.AssemblyLinearVelocity.Z).Magnitude else 0
local moving = human and part and not part.Anchored and human.Health > 0 and human.MoveDirection.Magnitude > .05
and human.FloorMaterial ~= Enum.Material.Air and speed > 1.5 and volume > 0
if moving then
steps.Volume = .25 * volume
steps.PlaybackSpeed = math.clamp(speed / 24, .75, 1.5)
if not steps.Playing then steps:Play() end
elseif steps.Playing then
steps:Stop()
end
end)
script.Destroying:Once(function()
added:Disconnect()
removing:Disconnect()
update:Disconnect()
reset()
steps:Destroy()
jump:Destroy()
landing:Destroy()
muted:Destroy()
end)
+17 -15
View File
@@ -1,20 +1,22 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.PowerUpCatalog
local colors = Color3.fromRGB local colors = Color3.fromRGB
return table.freeze({ return table.freeze({
{ id = "Turbo", title = "Турбоискра", detail = "+30% к скорости на 4 сек.", color = colors(255, 124, 56) }, { id = "Turbo", title = Text.turboiskra, detail = Text.kSkorostiNaSek, color = colors(255, 124, 56) },
{ id = "Spring", title = "Лунная пружина", detail = "Следующий прыжок выше на 80% · 18 сек.", color = colors(181, 88, 255) }, { id = "Spring", title = Text.lunnayaPruzhina, detail = Text.sleduyuschiyPryzhokVysheNa, color = colors(181, 88, 255) },
{ id = "Double", title = "Второй импульс", detail = "Один прыжок в воздухе · 8 сек.", color = colors(66, 216, 255) }, { id = "Double", title = Text.vtoroyImpulS, detail = Text.odinPryzhokVVozdukhe, color = colors(66, 216, 255) },
{ id = "Feather", title = "Перо бури", detail = "Удерживай пробел для плавного падения · 5 сек.", color = colors(121, 241, 220) }, { id = "Feather", title = Text.peroBuri, detail = Text.uderzhivayProbelDlyaPlavnogo, color = colors(121, 241, 220) },
{ id = "Shield", title = "Хрустальный щит", detail = "Поглощает 25 урона · 7 сек.", color = colors(79, 143, 255) }, { id = "Shield", title = Text.khrustalNyySchit, detail = Text.pogloschaetUronaSek, color = colors(79, 143, 255) },
{ id = "Heal", title = "Искра жизни", detail = "Восстанавливает 25 HP", color = colors(112, 255, 112) }, { id = "Heal", title = Text.iskraZhizni, detail = Text.vosstanavlivaetHp, color = colors(112, 255, 112) },
{ id = "Magnet", title = "Золотой магнит", detail = "Притягивание монет с 20 студов · 8 сек.", color = colors(255, 180, 66) }, { id = "Magnet", title = Text.zolotoyMagnit, detail = Text.prityagivanieMonetSStudov, color = colors(255, 180, 66) },
{ id = "Lucky", title = "Золотая жила", detail = "+25% к ценности следующих пяти монет", color = colors(250, 241, 95) }, { id = "Lucky", title = Text.zolotayaZhila, detail = Text.kTsennostiSleduyuschikhPyati, color = colors(250, 241, 95) },
{ id = "Reload", title = "Быстрые руки", detail = "Следующая перезарядка вдвое быстрее", color = colors(255, 103, 158) }, { id = "Reload", title = Text.bystryeRuki, detail = Text.sleduyuschayaPerezaryadkaVdvoeBystree, color = colors(255, 103, 158) },
{ id = "Ammo", title = "Запасной магазин", detail = "Мгновенно пополняет магазин", color = colors(255, 82, 100) }, { id = "Ammo", title = Text.zapasnoyMagazin, detail = Text.mgnovennoPopolnyaetMagazin, color = colors(255, 82, 100) },
{ id = "Steady", title = "Стальная хватка", detail = "Меньше отдачи и разброса · 5 сек.", color = colors(168, 181, 204) }, { id = "Steady", title = Text.stalNayaKhvatka, detail = Text.menSheOtdachiI, color = colors(168, 181, 204) },
{ id = "Quiet", title = "Шёпот", detail = "Приглушает шаги на 6 сек.", color = colors(106, 98, 249) }, { id = "Quiet", title = Text.shyopot, detail = Text.priglushaetShagiNaSek, color = colors(106, 98, 249) },
{ id = "Phantom", title = "Фантом", detail = "Создаёт движущуюся копию на 2 сек.", color = colors(213, 157, 255) }, { id = "Phantom", title = Text.fantom, detail = Text.sozdayotDvizhuschuyusyaKopiyuNa, color = colors(213, 157, 255) },
{ id = "Storm", title = "Грозовая печать", detail = "Следующее приземление замедляет врагов", color = colors(233, 77, 237) }, { id = "Storm", title = Text.grozovayaPechat, detail = Text.sleduyuscheePrizemlenieZamedlyaetVragov, color = colors(233, 77, 237) },
{ id = "Team", title = "Искра отряда", detail = "+20% к скорости тебе и ближайшим союзникам · 3 сек.", color = colors(42, 255, 171) }, { id = "Team", title = Text.iskraOtryada, detail = Text.kSkorostiTebeI, color = colors(42, 255, 171) },
}) })
+8 -6
View File
@@ -1,11 +1,13 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.RifleSkinCatalog
local entries = table.freeze({ local entries = table.freeze({
table.freeze({ id = "BlueFlame", name = "Голубое пламя", accent = Color3.fromRGB(100, 223, 255) }), table.freeze({ id = "BlueFlame", name = Text.goluboePlamya, accent = Color3.fromRGB(100, 223, 255) }),
table.freeze({ id = "ThunderBlade", name = "Грозовой клинок", accent = Color3.fromRGB(193, 142, 255) }), table.freeze({ id = "ThunderBlade", name = Text.grozovoyKlinok, accent = Color3.fromRGB(193, 142, 255) }),
table.freeze({ id = "CrimsonSeal", name = "Алая печать", accent = Color3.fromRGB(255, 113, 81) }), table.freeze({ id = "CrimsonSeal", name = Text.alayaPechat, accent = Color3.fromRGB(255, 113, 81) }),
table.freeze({ id = "Sakura", name = "Сакура", accent = Color3.fromRGB(255, 161, 209) }), table.freeze({ id = "Sakura", name = Text.sakura, accent = Color3.fromRGB(255, 161, 209) }),
table.freeze({ id = "NeonGlitch", name = "Неоновый сбой", accent = Color3.fromRGB(138, 255, 80) }), table.freeze({ id = "NeonGlitch", name = Text.neonovyySboy, accent = Color3.fromRGB(138, 255, 80) }),
table.freeze({ id = "LunarOrbit", name = "Лунная орбита", accent = Color3.fromRGB(255, 210, 120) }), table.freeze({ id = "LunarOrbit", name = Text.lunnayaOrbita, accent = Color3.fromRGB(255, 210, 120) }),
}) })
local Catalog = {} local Catalog = {}
+29 -13
View File
@@ -18,6 +18,8 @@ local RunService = game:GetService("RunService")
local SoundService = game:GetService("SoundService") local SoundService = game:GetService("SoundService")
local SniperEffects = {} local SniperEffects = {}
local AudioConfig = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("EffectsConfig") :: ModuleScript)
local activeCues: {Sound} = {}
-- Free Creator Store sounds. volume, plus how far the sound carries when it is in the world. -- Free Creator Store sounds. volume, plus how far the sound carries when it is in the world.
-- group: which volume setting scales it (attribute Vol<group> of the SniperViewmodel config -- group: which volume setting scales it (attribute Vol<group> of the SniperViewmodel config
@@ -40,25 +42,20 @@ local SOUNDS: { [string]: SoundDef } = {
Elimination = { id = "rbxassetid://15675043410", volume = 0.78, speed = 1.18, near = 0, far = 0, group = "Kill", cut = 0.52 }, Elimination = { id = "rbxassetid://15675043410", volume = 0.78, speed = 1.18, near = 0, far = 0, group = "Kill", cut = 0.52 },
StreakAccent = { id = "rbxassetid://3120909354", volume = 0.5, speed = 1, near = 0, far = 0, group = "Kill" }, -- Level_up StreakAccent = { id = "rbxassetid://3120909354", volume = 0.5, speed = 1, near = 0, far = 0, group = "Kill" }, -- Level_up
ReloadReady = { id = "rbxassetid://15675085146", volume = 0.24, speed = 1.15, near = 0, far = 0, group = "Reload", cut = 0.19 }, ReloadReady = { id = "rbxassetid://15675085146", volume = 0.24, speed = 1.15, near = 0, far = 0, group = "Reload", cut = 0.19 },
SiegeEnter = { id = "rbxassetid://113416294133952", volume = .23, speed = 1.30, near = 0, far = 0, group = "HUD" },
SiegeCharge = { id = "rbxassetid://2789428506", volume = .22, speed = 1, near = 0, far = 0, group = "HUD" },
SiegeTick = { id = "rbxassetid://113416294133952", volume = .22, speed = 1.48, near = 0, far = 0, group = "HUD" },
SiegeBlocked = { id = "rbxassetid://2789428506", volume = .25, speed = .70, near = 0, far = 0, group = "HUD" },
SiegeDecay = { id = "rbxassetid://2789428506", volume = .20, speed = .58, near = 0, far = 0, group = "HUD" },
RoundStart = { id = "rbxassetid://4612374036", volume = .27, speed = 1.15, near = 0, far = 0, group = "HUD" },
Tick = { id = "rbxassetid://113416294133952", volume = .22, speed = 1.12, near = 0, far = 0, group = "HUD" },
RoundCountdown = { id = "rbxassetid://113416294133952", volume = 0.25, speed = 1, near = 0, far = 0, group = "HUD" }, -- timer tick
ButtonHover = { id = "rbxassetid://84648433095796", volume = 0.22, speed = 1, near = 0, far = 0, group = "HUD" }, ButtonHover = { id = "rbxassetid://84648433095796", volume = 0.22, speed = 1, near = 0, far = 0, group = "HUD" },
ButtonPress = { id = "rbxassetid://121882355123711", volume = 0.27, speed = 1, near = 0, far = 0, group = "HUD" }, ButtonPress = { id = "rbxassetid://121882355123711", volume = 0.27, speed = 1, near = 0, far = 0, group = "HUD" },
FlagDropped = { id = "rbxassetid://2789428506", volume = 0.23, speed = .72, near = 0, far = 0, group = "HUD" },
HotPointMove = { id = "rbxassetid://113416294133952", volume = 0.23, speed = 1.18, near = 0, far = 0, group = "HUD" },
HotPointStart = { id = "rbxassetid://2789428506", volume = 0.25, speed = 1, near = 0, far = 0, group = "HUD" }, -- Unlock_phoenix
HotPointCaptured = { id = "rbxassetid://4612374036", volume = 0.28, speed = 1, near = 0, far = 0, group = "HUD" }, -- bling_big_diamond_pickup
MoneyCollect1 = { id = "rbxassetid://84894146013271", volume = 0.15, speed = 1, near = 0, far = 0, group = "Pickup", cut = 0.16 }, MoneyCollect1 = { id = "rbxassetid://84894146013271", volume = 0.15, speed = 1, near = 0, far = 0, group = "Pickup", cut = 0.16 },
CupidKnife = { id = "rbxassetid://120151468640015", volume = 0.32, speed = 1, near = 0, far = 0, group = "Pickup" }, CupidKnife = { id = "rbxassetid://120151468640015", volume = 0.32, speed = 1, near = 0, far = 0, group = "Pickup" },
-- a player / bot destroyed: the body breaks apart like blocks (heard by everyone, from the body) -- a player / bot destroyed: the body breaks apart like blocks (heard by everyone, from the body)
Break = { id = "rbxassetid://130215756597524", volume = 1, speed = 1, near = 25, far = 300, group = "Kill" }, -- blockbreak sfx Break = { id = "rbxassetid://130215756597524", volume = 1, speed = 1, near = 25, far = 300, group = "Kill" }, -- blockbreak sfx
} }
local arenaCues: {[string]: boolean} = {}
local function addCue(name: string, cue: AudioConfig.Cue)
SOUNDS[name] = {id = cue.id, volume = cue.volume, speed = cue.speed, near = 0, far = 0, group = "HUD"}
arenaCues[name] = true
end
for name, cue in AudioConfig.Cues do addCue(name, cue) end
for name, target in AudioConfig.Aliases do addCue(name, AudioConfig.Cues[target]) end
SniperEffects.SOUNDS = SOUNDS SniperEffects.SOUNDS = SOUNDS
-- the settings live as attributes on the local player's SniperViewmodel script -- the settings live as attributes on the local player's SniperViewmodel script
@@ -92,7 +89,10 @@ SniperEffects.BOLT_CUES = {
task.spawn(function() task.spawn(function()
-- Sound instances, not bare ids: a bare id string is preloaded as an image and fails -- Sound instances, not bare ids: a bare id string is preloaded as an image and fails
local preload = {} local preload = {}
local seen: {[string]: boolean} = {}
for _, def in SOUNDS do for _, def in SOUNDS do
if def.id == "" or seen[def.id] then continue end
seen[def.id] = true
local s = Instance.new("Sound") local s = Instance.new("Sound")
s.SoundId = def.id s.SoundId = def.id
table.insert(preload, s) table.insert(preload, s)
@@ -105,13 +105,28 @@ end)
function SniperEffects.sound(name: string, at: Instance?, pitch: number?): Sound? function SniperEffects.sound(name: string, at: Instance?, pitch: number?): Sound?
local def = SOUNDS[name] local def = SOUNDS[name]
if not def then if not def or def.id == "" then
return nil return nil
end end
local volume = def.volume * math.max(setting("VolMaster", 1), 0) * math.max(setting("Vol" .. def.group, 1), 0) local volume = def.volume * math.max(setting("VolMaster", 1), 0) * math.max(setting("Vol" .. def.group, 1), 0)
if volume <= 0 then if volume <= 0 then
return nil return nil
end end
local limited = arenaCues[name]
if limited then
for i = #activeCues, 1, -1 do
if not activeCues[i].Parent then table.remove(activeCues, i) end
end
if #activeCues >= AudioConfig.SoundLimit then
-- Убираем самый тихий сигнал. Если новый ещё тише, оставляем текущий микс.
local quietest = 1
for i = 2, #activeCues do
if activeCues[i].Volume < activeCues[quietest].Volume then quietest = i end
end
if activeCues[quietest].Volume > volume then return nil end
table.remove(activeCues, quietest):Destroy()
end
end
local s = Instance.new("Sound") local s = Instance.new("Sound")
s.Name = "Sniper" .. name s.Name = "Sniper" .. name
s.SoundId = def.id s.SoundId = def.id
@@ -123,6 +138,7 @@ function SniperEffects.sound(name: string, at: Instance?, pitch: number?): Sound
s.RollOffMaxDistance = def.far s.RollOffMaxDistance = def.far
end end
s.Parent = at or SoundService s.Parent = at or SoundService
if limited then table.insert(activeCues, s) end
s:Play() s:Play()
if def.cut then if def.cut then
local fade = def.cut local fade = def.cut
+9
View File
@@ -0,0 +1,9 @@
--!strict
return function(budget: any, config: any, hints: any)
assert(budget.profile(true, false) == config.Mobile)
assert(budget.profile(true, true) == config.Desktop)
assert(budget.particles(20, .4) == 8 and budget.particles(0, .4) == 0)
assert(config.Mobile.burstSlots <= config.Mobile.maxEmitters and config.Desktop.burstSlots <= config.Desktop.maxEmitters)
assert(utf8.len(hints.compact(string.rep("я", 100))) == config.HintLimit)
assert(hints.compact("Одна\nстрока") == "Одна строка")
end
+3 -1
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.TrophyBalance
local Players = game:GetService("Players") local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService") local RunService = game:GetService("RunService")
@@ -55,7 +57,7 @@ pill.AnchorPoint = Vector2.new(1, 0)
local coin = UI.element("GoldCoin", pill, UDim2.fromOffset(13, 7), UDim2.fromOffset(36, 36)) local coin = UI.element("GoldCoin", pill, UDim2.fromOffset(13, 7), UDim2.fromOffset(36, 36))
local walletCoin = UI.bindCoin(coin) local walletCoin = UI.bindCoin(coin)
local title = label("CurrencyName", pill, "ТРОФЕИ", UDim2.fromOffset(158, 8), UDim2.fromOffset(72, 35), 13, UI.Ink) local title = label("CurrencyName", pill, Text.trofei, UDim2.fromOffset(158, 8), UDim2.fromOffset(72, 35), 13, UI.Ink)
title.FontFace = UI.Display title.FontFace = UI.Display
title.TextXAlignment = Enum.TextXAlignment.Left title.TextXAlignment = Enum.TextXAlignment.Left
local divider = UI.frame("Divider", pill, UDim2.fromOffset(146, 12), UDim2.fromOffset(1, 26), UI.Outline) local divider = UI.frame("Divider", pill, UDim2.fromOffset(146, 12), UDim2.fromOffset(1, 26), UI.Outline)
+151 -149
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.ViewmodelTuner
-- Viewmodel tuning mode (Studio playtests only). Press P to open the panel and adjust the weapon's -- Viewmodel tuning mode (Studio playtests only). Press P to open the panel and adjust the weapon's
-- position relative to the camera live: -/+ buttons (hold to repeat) or type a value. -- position relative to the camera live: -/+ buttons (hold to repeat) or type a value.
-- "Сохранить" hands the values to the ViewmodelTuneSaver Studio plugin, which writes them into the -- "Сохранить" hands the values to the ViewmodelTuneSaver Studio plugin, which writes them into the
@@ -31,16 +33,16 @@ type Param = { name: string, label: string, unit: number }
type Tab = { title: string, params: { Param }, buttons: string?, sight: string?, group: string? } type Tab = { title: string, params: { Param }, buttons: string?, sight: string?, group: string? }
local TABS: { Tab } = { local TABS: { Tab } = {
{ {
title = "Оружие", title = Text.oruzhie,
params = { params = {
{ name = "OffsetX", label = "Вправо / влево", unit = 1 }, { name = "OffsetX", label = Text.vpravoVlevo, unit = 1 },
{ name = "OffsetY", label = "Вверх / вниз", unit = 1 }, { name = "OffsetY", label = Text.vverkhVniz, unit = 1 },
{ name = "OffsetZ", label = "Вперёд / назад", unit = 1 }, { name = "OffsetZ", label = Text.vperyodNazad, unit = 1 },
{ name = "YawDeg", label = "Поворот (yaw)", unit = 20 }, { name = "YawDeg", label = Text.povorotYaw, unit = 20 },
{ name = "PitchDeg", label = "Наклон (pitch)", unit = 20 }, { name = "PitchDeg", label = Text.naklonPitch, unit = 20 },
{ name = "RollDeg", label = "Крен (roll)", unit = 20 }, { name = "RollDeg", label = Text.krenRoll, unit = 20 },
{ name = "SwayAmount", label = "Инерция", unit = 4 }, { name = "SwayAmount", label = Text.inertsiya, unit = 4 },
{ name = "BobAmount", label = "Покачивание", unit = 0.2 }, { name = "BobAmount", label = Text.pokachivanie, unit = 0.2 },
}, },
}, },
} }
@@ -48,205 +50,205 @@ local function armTab(title: string, prefix: string): Tab
return { return {
title = title, title = title,
params = { params = {
{ name = prefix .. "HandX", label = "Кисть: вправо/влево", unit = 1 }, { name = prefix .. "HandX", label = Text.kistVpravoVlevo, unit = 1 },
{ name = prefix .. "HandY", label = "Кисть: вверх/вниз", unit = 1 }, { name = prefix .. "HandY", label = Text.kistVverkhVniz, unit = 1 },
{ name = prefix .. "HandZ", label = "Кисть: вперёд/назад", unit = 1 }, { name = prefix .. "HandZ", label = Text.kistVperyodNazad, unit = 1 },
{ name = prefix .. "ArmYawDeg", label = "Рука: поворот", unit = 20 }, { name = prefix .. "ArmYawDeg", label = Text.rukaPovorot, unit = 20 },
{ name = prefix .. "ArmPitchDeg", label = "Рука: наклон", unit = 20 }, { name = prefix .. "ArmPitchDeg", label = Text.rukaNaklon, unit = 20 },
{ name = prefix .. "ArmRollDeg", label = "Рука: крен", unit = 20 }, { name = prefix .. "ArmRollDeg", label = Text.rukaKren, unit = 20 },
{ name = prefix .. "ArmLength", label = "Длина руки", unit = 2 }, { name = prefix .. "ArmLength", label = Text.dlinaRuki, unit = 2 },
{ name = prefix .. "ArmThickness", label = "Толщина руки", unit = 0.2 }, { name = prefix .. "ArmThickness", label = Text.tolschinaRuki, unit = 0.2 },
{ name = prefix .. "HandLength", label = "Длина кисти", unit = 0.5 }, { name = prefix .. "HandLength", label = Text.dlinaKisti, unit = 0.5 },
{ name = prefix .. "HandThickness", label = "Толщина кисти", unit = 0.2 }, { name = prefix .. "HandThickness", label = Text.tolschinaKisti, unit = 0.2 },
}, },
} }
end end
table.insert(TABS, armTab("Левая рука", "")) table.insert(TABS, armTab(Text.levayaRuka, ""))
table.insert(TABS, armTab("Правая рука", "R")) table.insert(TABS, armTab(Text.pravayaRuka, "R"))
table.insert(TABS, { table.insert(TABS, {
title = "Осмотр", title = Text.osmotr,
buttons = "Inspect", buttons = "Inspect",
params = { params = {
{ name = "InspX", label = "Вправо / влево", unit = 1 }, { name = "InspX", label = Text.vpravoVlevo, unit = 1 },
{ name = "InspY", label = "Вверх / вниз", unit = 1 }, { name = "InspY", label = Text.vverkhVniz, unit = 1 },
{ name = "InspZ", label = "Вперёд / назад", unit = 1 }, { name = "InspZ", label = Text.vperyodNazad, unit = 1 },
{ name = "InspYawDeg", label = "Поворот (yaw)", unit = 20 }, { name = "InspYawDeg", label = Text.povorotYaw, unit = 20 },
{ name = "InspPitchDeg", label = "Наклон (pitch)", unit = 20 }, { name = "InspPitchDeg", label = Text.naklonPitch, unit = 20 },
{ name = "InspRollDeg", label = "Крен (roll)", unit = 20 }, { name = "InspRollDeg", label = Text.krenRoll, unit = 20 },
{ name = "InspDriftDeg", label = "Дрейф при удержании", unit = 20 }, { name = "InspDriftDeg", label = Text.dreyfPriUderzhanii, unit = 20 },
{ name = "InspBlendIn", label = "Выход в позу, с", unit = 2 }, { name = "InspBlendIn", label = Text.vykhodVPozuS, unit = 2 },
{ name = "InspHold", label = "Удержание, с", unit = 2 }, { name = "InspHold", label = Text.uderzhanieS, unit = 2 },
{ name = "InspBlendOut", label = "Возврат, с", unit = 2 }, { name = "InspBlendOut", label = Text.vozvratS, unit = 2 },
}, },
}) })
table.insert(TABS, { table.insert(TABS, {
title = "Перезарядка", title = Text.perezaryadka,
buttons = "Reload", buttons = "Reload",
params = { params = {
{ name = "ReloadTime", label = "Длительность, с", unit = 2 }, { name = "ReloadTime", label = Text.dlitelNostS, unit = 2 },
{ name = "ReloadPreviewU", label = "Кадр (0–1)", unit = 0.2 }, { name = "ReloadPreviewU", label = Text.kadr, unit = 0.2 },
{ name = "RlX", label = "Магазин: вправо/влево", unit = 1 }, { name = "RlX", label = Text.magazinVpravoVlevo, unit = 1 },
{ name = "RlY", label = "Магазин: вверх/вниз", unit = 1 }, { name = "RlY", label = Text.magazinVverkhVniz, unit = 1 },
{ name = "RlZ", label = "Магазин: вперёд/назад", unit = 1 }, { name = "RlZ", label = Text.magazinVperyodNazad, unit = 1 },
{ name = "RlYawDeg", label = "Магазин: поворот", unit = 20 }, { name = "RlYawDeg", label = Text.magazinPovorot, unit = 20 },
{ name = "RlPitchDeg", label = "Магазин: наклон", unit = 20 }, { name = "RlPitchDeg", label = Text.magazinNaklon, unit = 20 },
{ name = "RlRollDeg", label = "Магазин: крен", unit = 20 }, { name = "RlRollDeg", label = Text.magazinKren, unit = 20 },
}, },
}) })
-- weapon pose while the bolt is worked (pose B) -- weapon pose while the bolt is worked (pose B)
table.insert(TABS, { table.insert(TABS, {
title = "Перезарядка: затвор", title = Text.perezaryadkaZatvor,
buttons = "Reload", buttons = "Reload",
params = { params = {
{ name = "RlBX", label = "Затвор: вправо/влево", unit = 1 }, { name = "RlBX", label = Text.zatvorVpravoVlevo, unit = 1 },
{ name = "RlBY", label = "Затвор: вверх/вниз", unit = 1 }, { name = "RlBY", label = Text.zatvorVverkhVniz, unit = 1 },
{ name = "RlBZ", label = "Затвор: вперёд/назад", unit = 1 }, { name = "RlBZ", label = Text.zatvorVperyodNazad, unit = 1 },
{ name = "RlBYawDeg", label = "Затвор: поворот", unit = 20 }, { name = "RlBYawDeg", label = Text.zatvorPovorot, unit = 20 },
{ name = "RlBPitchDeg", label = "Затвор: наклон", unit = 20 }, { name = "RlBPitchDeg", label = Text.zatvorNaklon, unit = 20 },
{ name = "RlBRollDeg", label = "Затвор: крен", unit = 20 }, { name = "RlBRollDeg", label = Text.zatvorKren, unit = 20 },
{ name = "ReloadPreviewU", label = "Кадр (0–1)", unit = 0.2 }, { name = "ReloadPreviewU", label = Text.kadr, unit = 0.2 },
}, },
}) })
local function reloadHandParams(prefix: string): { Param } local function reloadHandParams(prefix: string): { Param }
return { return {
{ name = prefix .. "MagX", label = "Магазин: вправо/влево", unit = 1 }, { name = prefix .. "MagX", label = Text.magazinVpravoVlevo, unit = 1 },
{ name = prefix .. "MagY", label = "Магазин: вверх/вниз", unit = 1 }, { name = prefix .. "MagY", label = Text.magazinVverkhVniz, unit = 1 },
{ name = prefix .. "MagZ", label = "Магазин: вперёд/назад", unit = 1 }, { name = prefix .. "MagZ", label = Text.magazinVperyodNazad, unit = 1 },
{ name = prefix .. "MagDrop", label = "Магазин: вынуть вниз", unit = 1 }, { name = prefix .. "MagDrop", label = Text.magazinVynutVniz, unit = 1 },
{ name = prefix .. "BoltX", label = "Затвор: вправо/влево", unit = 1 }, { name = prefix .. "BoltX", label = Text.zatvorVpravoVlevo, unit = 1 },
{ name = prefix .. "BoltY", label = "Затвор: вверх/вниз", unit = 1 }, { name = prefix .. "BoltY", label = Text.zatvorVverkhVniz, unit = 1 },
{ name = prefix .. "BoltZ", label = "Затвор: вперёд/назад", unit = 1 }, { name = prefix .. "BoltZ", label = Text.zatvorVperyodNazad, unit = 1 },
{ name = prefix .. "BoltLift", label = "Затвор: подъём", unit = 0.5 }, { name = prefix .. "BoltLift", label = Text.zatvorPodYom, unit = 0.5 },
{ name = prefix .. "BoltPull", label = "Затвор: ход назад", unit = 1 }, { name = prefix .. "BoltPull", label = Text.zatvorKhodNazad, unit = 1 },
} }
end end
local fpHands = reloadHandParams("") local fpHands = reloadHandParams("")
table.insert(fpHands, { name = "MagSizeX", label = "Магазин: толщина", unit = 0.2 }) table.insert(fpHands, { name = "MagSizeX", label = Text.magazinTolschina, unit = 0.2 })
table.insert(fpHands, { name = "MagSizeY", label = "Магазин: высота", unit = 0.5 }) table.insert(fpHands, { name = "MagSizeY", label = Text.magazinVysota, unit = 0.5 })
table.insert(fpHands, { name = "MagSizeZ", label = "Магазин: ширина", unit = 0.5 }) table.insert(fpHands, { name = "MagSizeZ", label = Text.magazinShirina, unit = 0.5 })
table.insert(TABS, { title = "Перезарядка: руки", buttons = "Reload", params = fpHands }) table.insert(TABS, { title = Text.perezaryadkaRuki, buttons = "Reload", params = fpHands })
table.insert(TABS, { table.insert(TABS, {
title = "Движение", title = Text.dvizhenie,
params = { params = {
{ name = "MovementWalkSpeed", label = "Скорость игрока, студ/с", unit = 20 }, { name = "MovementWalkSpeed", label = Text.skorostIgrokaStudS, unit = 20 },
{ name = "MovementGravity", label = "Гравитация, студ/с²", unit = 100 }, { name = "MovementGravity", label = Text.gravitatsiyaStudS, unit = 100 },
{ name = "FovBase", label = "Обзор (FOV)", unit = 20 }, { name = "FovBase", label = Text.obzorFov, unit = 20 },
{ name = "FovBoost", label = "Обзор: + на бегу", unit = 20 }, { name = "FovBoost", label = Text.obzorNaBegu, unit = 20 },
{ name = "FovSpeed", label = "Скорость для макс. FOV", unit = 20 }, { name = "FovSpeed", label = Text.skorostDlyaMaksFov, unit = 20 },
{ name = "MoveDipY", label = "Оружие: вниз на бегу", unit = 1 }, { name = "MoveDipY", label = Text.oruzhieVnizNaBegu, unit = 1 },
{ name = "MoveBack", label = "Оружие: назад на бегу", unit = 1 }, { name = "MoveBack", label = Text.oruzhieNazadNaBegu, unit = 1 },
{ name = "MoveRollDeg", label = "Оружие: крен на бегу", unit = 20 }, { name = "MoveRollDeg", label = Text.oruzhieKrenNaBegu, unit = 20 },
{ name = "MoveLag", label = "Запаздывание", unit = 0.2 }, { name = "MoveLag", label = Text.zapazdyvanie, unit = 0.2 },
{ name = "FallLag", label = "Оружие: прыжок / падение", unit = 0.2 }, { name = "FallLag", label = Text.oruzhiePryzhokPadenie, unit = 0.2 },
}, },
}) })
table.insert(TABS, { table.insert(TABS, {
title = "Выстрел", title = Text.vystrel,
buttons = "Shot", buttons = "Shot",
params = { params = {
{ name = "FireInterval", label = "Между выстрелами, с", unit = 2 }, { name = "FireInterval", label = Text.mezhduVystrelamiS, unit = 2 },
{ name = "MagCapacity", label = "Патронов в магазине", unit = 20 }, { name = "MagCapacity", label = Text.patronovVMagazine, unit = 20 },
{ name = "ShotZoomPct", label = "Зум при очереди, %", unit = 20 }, { name = "ShotZoomPct", label = Text.zumPriOcheredi, unit = 20 },
{ name = "SpreadBase", label = "Спрей: начальный увод, °", unit = 4 }, { name = "SpreadBase", label = Text.spreyNachalNyyUvod, unit = 4 },
{ name = "SpreadPerShot", label = "Спрей: рост за выстрел, °", unit = 4 }, { name = "SpreadPerShot", label = Text.spreyRostZaVystrel, unit = 4 },
{ name = "SpreadMax", label = "Спрей: предел роста, °", unit = 4 }, { name = "SpreadMax", label = Text.spreyPredelRosta, unit = 4 },
{ name = "SpreadRecover", label = "Спрей: скорость сброса", unit = 20 }, { name = "SpreadRecover", label = Text.spreySkorostSbrosa, unit = 20 },
{ name = "SpreadAim", label = "Спрей в прицеле, ×", unit = 1 }, { name = "SpreadAim", label = Text.spreyVPritsele, unit = 1 },
{ name = "ShotBoltDelay", label = "Затвор: пауза, с", unit = 1 }, { name = "ShotBoltDelay", label = Text.zatvorPauzaS, unit = 1 },
{ name = "ShotBoltTime", label = "Затвор, с (0 = автомат)", unit = 1 }, { name = "ShotBoltTime", label = Text.zatvorSAvtomat, unit = 1 },
{ name = "ShotBoltTilt", label = "Затвор: наклон (0–1)", unit = 1 }, { name = "ShotBoltTilt", label = Text.zatvorNaklon2, unit = 1 },
{ name = "ShotPreviewT", label = "Кадр, с после выстрела", unit = 1 }, { name = "ShotPreviewT", label = Text.kadrSPosleVystrela, unit = 1 },
}, },
}) })
table.insert(TABS, { table.insert(TABS, {
title = "Выстрел: ствол", title = Text.vystrelStvol,
buttons = "Shot", buttons = "Shot",
params = { params = {
{ name = "MuzzleX", label = "Дуло: вправо/влево", unit = 1 }, { name = "MuzzleX", label = Text.duloVpravoVlevo, unit = 1 },
{ name = "MuzzleY", label = "Дуло: вверх/вниз", unit = 1 }, { name = "MuzzleY", label = Text.duloVverkhVniz, unit = 1 },
{ name = "MuzzleZ", label = "Дуло: вперёд/назад", unit = 1 }, { name = "MuzzleZ", label = Text.duloVperyodNazad, unit = 1 },
{ name = "FlashSize", label = "Вспышка: размер", unit = 1 }, { name = "FlashSize", label = Text.vspyshkaRazmer, unit = 1 },
{ name = "TPMuzzleX", label = "3л дуло: вправо/влево", unit = 1 }, { name = "TPMuzzleX", label = Text.lDuloVpravoVlevo, unit = 1 },
{ name = "TPMuzzleY", label = "3л дуло: вверх/вниз", unit = 1 }, { name = "TPMuzzleY", label = Text.lDuloVverkhVniz, unit = 1 },
{ name = "TPMuzzleZ", label = "3л дуло: вперёд/назад", unit = 1 }, { name = "TPMuzzleZ", label = Text.lDuloVperyodNazad, unit = 1 },
{ name = "TPFlashSize", label = "3л вспышка: размер", unit = 1 }, { name = "TPFlashSize", label = Text.lVspyshkaRazmer, unit = 1 },
{ name = "TPRecoilBack", label = "3л отдача: назад", unit = 1 }, { name = "TPRecoilBack", label = Text.lOtdachaNazad, unit = 1 },
{ name = "TPRecoilPitchDeg", label = "3л отдача: вверх", unit = 20 }, { name = "TPRecoilPitchDeg", label = Text.lOtdachaVverkh, unit = 20 },
}, },
}) })
-- aiming down the sights: one tab "Прицеливание", a page per sight inside it (attributes Aim<Sight>...) -- aiming down the sights: one tab "Прицеливание", a page per sight inside it (attributes Aim<Sight>...)
for _, s in { { "Iron", "Мушка" }, { "RedDot", "Коллиматор" }, { "Scope", "Оптика" } } do for _, s in { { "Iron", Text.mushka }, { "RedDot", Text.kollimator }, { "Scope", Text.optika } } do
local p = "Aim" .. s[1] local p = "Aim" .. s[1]
table.insert(TABS, { table.insert(TABS, {
title = s[2], title = s[2],
group = "Прицел", group = Text.pritsel,
buttons = "Aim", buttons = "Aim",
sight = s[1], sight = s[1],
params = { params = {
{ name = p .. "X", label = "Вправо / влево", unit = 1 }, { name = p .. "X", label = Text.vpravoVlevo, unit = 1 },
{ name = p .. "Y", label = "Вверх / вниз", unit = 1 }, { name = p .. "Y", label = Text.vverkhVniz, unit = 1 },
{ name = p .. "Z", label = "Вперёд / назад", unit = 1 }, { name = p .. "Z", label = Text.vperyodNazad, unit = 1 },
{ name = p .. "YawDeg", label = "Поворот (yaw)", unit = 20 }, { name = p .. "YawDeg", label = Text.povorotYaw, unit = 20 },
{ name = p .. "PitchDeg", label = "Наклон (pitch)", unit = 20 }, { name = p .. "PitchDeg", label = Text.naklonPitch, unit = 20 },
{ name = p .. "RollDeg", label = "Крен (roll)", unit = 20 }, { name = p .. "RollDeg", label = Text.krenRoll, unit = 20 },
{ name = p .. "Fov", label = "FOV / зум (меньше = ближе)", unit = 20 }, { name = p .. "Fov", label = Text.fovZumMenShe, unit = 20 },
{ name = p .. "Sens", label = "Чувствительность мыши", unit = 1 }, { name = p .. "Sens", label = Text.chuvstvitelNostMyshi, unit = 1 },
{ name = "AimTime", label = "Время прицеливания, с", unit = 1 }, { name = "AimTime", label = Text.vremyaPritselivaniyaS, unit = 1 },
{ name = "AimSway", label = "Покачивание в прицеле", unit = 1 }, { name = "AimSway", label = Text.pokachivanieVPritsele, unit = 1 },
{ name = "AimSlow", label = "Замедление в прицеле (0–1)", unit = 1 }, { name = "AimSlow", label = Text.zamedlenieVPritsele, unit = 1 },
}, },
}) })
end end
-- mouse sensitivity: from the hip and through each sight (1 = the player's own setting) -- mouse sensitivity: from the hip and through each sight (1 = the player's own setting)
table.insert(TABS, { table.insert(TABS, {
title = "Чувствительность", title = Text.chuvstvitelNost,
params = { params = {
{ name = "HipSens", label = "От бедра", unit = 1 }, { name = "HipSens", label = Text.otBedra, unit = 1 },
{ name = "AimIronSens", label = "Мушка", unit = 1 }, { name = "AimIronSens", label = Text.mushka, unit = 1 },
{ name = "AimRedDotSens", label = "Коллиматор", unit = 1 }, { name = "AimRedDotSens", label = Text.kollimator, unit = 1 },
{ name = "AimScopeSens", label = "Оптика", unit = 1 }, { name = "AimScopeSens", label = Text.optika, unit = 1 },
}, },
}) })
-- sound volumes, the blast on hits, the damage numbers -- sound volumes, the blast on hits, the damage numbers
table.insert(TABS, { table.insert(TABS, {
title = "Звук и попадания", title = Text.zvukIPopadaniya,
params = { params = {
{ name = "VolMaster", label = "Громкость: общая", unit = 1 }, { name = "VolMaster", label = Text.gromkostObschaya, unit = 1 },
{ name = "VolShot", label = "Громкость: выстрел", unit = 1 }, { name = "VolShot", label = Text.gromkostVystrel, unit = 1 },
{ name = "VolReload", label = "Громкость: перезарядка/затвор", unit = 1 }, { name = "VolReload", label = Text.gromkostPerezaryadkaZatvor, unit = 1 },
{ name = "VolHit", label = "Громкость: попадание", unit = 1 }, { name = "VolHit", label = Text.gromkostPopadanie, unit = 1 },
{ name = "VolKill", label = "Громкость: разрушение", unit = 1 }, { name = "VolKill", label = Text.gromkostRazrushenie, unit = 1 },
{ name = "HitFxSize", label = "Размер взрыва при попадании", unit = 1 }, { name = "HitFxSize", label = Text.razmerVzryvaPriPopadanii, unit = 1 },
{ name = "DmgNumSpread", label = "Цифры урона: разлёт в стороны", unit = 1 }, { name = "DmgNumSpread", label = Text.tsifryUronaRazlyotV, unit = 1 },
{ name = "DmgNumRise", label = "Цифры урона: подъём вверх", unit = 1 }, { name = "DmgNumRise", label = Text.tsifryUronaPodYom, unit = 1 },
{ name = "KillPopRise", label = "Убийство: высота вылета", unit = 1 }, { name = "KillPopRise", label = Text.ubiystvoVysotaVyleta, unit = 1 },
}, },
}) })
-- third person (what other players see): ThirdPersonRifle reads these -- third person (what other players see): ThirdPersonRifle reads these
local function poseParams(prefix: string, what: string): { Param } local function poseParams(prefix: string, what: string): { Param }
return { return {
{ name = prefix .. "X", label = what .. ": вправо/влево", unit = 1 }, { name = prefix .. "X", label = what .. Text.vpravoVlevo2, unit = 1 },
{ name = prefix .. "Y", label = what .. ": вверх/вниз", unit = 1 }, { name = prefix .. "Y", label = what .. Text.vverkhVniz2, unit = 1 },
{ name = prefix .. "Z", label = what .. ": вперёд/назад", unit = 1 }, { name = prefix .. "Z", label = what .. Text.vperyodNazad2, unit = 1 },
{ name = prefix .. "YawDeg", label = what .. ": поворот", unit = 20 }, { name = prefix .. "YawDeg", label = what .. Text.povorot, unit = 20 },
{ name = prefix .. "PitchDeg", label = what .. ": наклон", unit = 20 }, { name = prefix .. "PitchDeg", label = what .. Text.naklon, unit = 20 },
{ name = prefix .. "RollDeg", label = what .. ": крен", unit = 20 }, { name = prefix .. "RollDeg", label = what .. Text.kren, unit = 20 },
} }
end end
table.insert(TABS, { title = "3л: оружие", params = poseParams("TPGun", "Оружие") }) table.insert(TABS, { title = Text.lOruzhie, params = poseParams("TPGun", Text.oruzhie) })
for _, side in { { "R", "3л: правая рука" }, { "L", "3л: левая рука" } } do for _, side in { { "R", Text.lPravayaRuka }, { "L", Text.lLevayaRuka } } do
local params = poseParams("TP" .. side[1] .. "Hand", "Кисть") local params = poseParams("TP" .. side[1] .. "Hand", Text.kist)
table.insert(params, { name = "TP" .. side[1] .. "ElbowX", label = "Локоть: вправо/влево", unit = 1 }) table.insert(params, { name = "TP" .. side[1] .. "ElbowX", label = Text.lokotVpravoVlevo, unit = 1 })
table.insert(params, { name = "TP" .. side[1] .. "ElbowY", label = "Локоть: вверх/вниз", unit = 1 }) table.insert(params, { name = "TP" .. side[1] .. "ElbowY", label = Text.lokotVverkhVniz, unit = 1 })
table.insert(params, { name = "TP" .. side[1] .. "ElbowZ", label = "Локоть: вперёд/назад", unit = 1 }) table.insert(params, { name = "TP" .. side[1] .. "ElbowZ", label = Text.lokotVperyodNazad, unit = 1 })
table.insert(TABS, { title = side[2], params = params }) table.insert(TABS, { title = side[2], params = params })
end end
table.insert(TABS, { title = "3л: перезарядка", buttons = "Reload", params = reloadHandParams("TP") }) table.insert(TABS, { title = Text.lPerezaryadka, buttons = "Reload", params = reloadHandParams("TP") })
local TABS_PER_ROW = 4 local TABS_PER_ROW = 4
local PARAMS: { Param } = {} local PARAMS: { Param } = {}
local maxRows = 0 local maxRows = 0
@@ -341,14 +343,14 @@ local function button(parent: Instance, text: string, pos: UDim2, size: UDim2):
return b return b
end end
label(panel, "Настройка (P — закрыть)", UDim2.fromOffset(12, 6), UDim2.new(1, -124, 0, 22)) label(panel, Text.nastroykaPZakryt, UDim2.fromOffset(12, 6), UDim2.new(1, -124, 0, 22))
-- switches the local camera between first person and a third-person view of the character -- switches the local camera between first person and a third-person view of the character
local viewButton = button(panel, "", UDim2.fromOffset(214, 5), UDim2.fromOffset(96, 22)) local viewButton = button(panel, "", UDim2.fromOffset(214, 5), UDim2.fromOffset(96, 22))
viewButton.TextSize = 12 viewButton.TextSize = 12
local function refreshView() local function refreshView()
local on = target:GetAttribute("ThirdPersonView") == true local on = target:GetAttribute("ThirdPersonView") == true
viewButton.Text = if on then "Вид: 3-е лицо" else "Вид: 1-е лицо" viewButton.Text = if on then Text.vidELitso else Text.vidELitso2
viewButton.BackgroundColor3 = if on then Color3.fromRGB(70, 110, 190) else Color3.fromRGB(55, 60, 75) viewButton.BackgroundColor3 = if on then Color3.fromRGB(70, 110, 190) else Color3.fromRGB(55, 60, 75)
end end
viewButton.MouseButton1Click:Connect(function() viewButton.MouseButton1Click:Connect(function()
@@ -531,8 +533,8 @@ for i, tab in TABS do
for r, p in tab.params do for r, p in tab.params do
addRow(page, p, top + (r - 1) * 34) addRow(page, p, top + (r - 1) * 34)
end end
if tab.title == "Движение" then if tab.title == Text.dvizhenie then
label(page, "Меньше гравитация — выше прыжок", UDim2.fromOffset(12, top + #tab.params * 34), UDim2.fromOffset(298, 24)) label(page, Text.menSheGravitatsiyaVyshe, UDim2.fromOffset(12, top + #tab.params * 34), UDim2.fromOffset(298, 24))
end end
local kind = tab.buttons local kind = tab.buttons
if kind then if kind then
@@ -540,7 +542,7 @@ for i, tab in TABS do
local previewAttr, triggerAttr = kind .. "Preview", kind .. "Trigger" local previewAttr, triggerAttr = kind .. "Preview", kind .. "Trigger"
local y = top + #tab.params * 34 local y = top + #tab.params * 34
local sight = tab.sight local sight = tab.sight
local play = button(page, if kind == "Aim" then "▶ Прицелиться" else "▶ Проиграть", UDim2.fromOffset(12, y), UDim2.fromOffset(145, 28)) local play = button(page, if kind == "Aim" then Text.pritselitSya else Text.proigrat, UDim2.fromOffset(12, y), UDim2.fromOffset(145, 28))
play.MouseButton1Click:Connect(function() play.MouseButton1Click:Connect(function()
if sight then if sight then
target:SetAttribute("AimPreviewSight", sight) -- SniperViewmodel puts this sight on the rifle target:SetAttribute("AimPreviewSight", sight) -- SniperViewmodel puts this sight on the rifle
@@ -548,7 +550,7 @@ for i, tab in TABS do
target:SetAttribute(previewAttr, false) target:SetAttribute(previewAttr, false)
target:SetAttribute(triggerAttr, os.clock()) target:SetAttribute(triggerAttr, os.clock())
end) end)
local holdText = if kind == "Inspect" then "Держать позу" elseif kind == "Aim" then "Держать прицел" else "Держать кадр" local holdText = if kind == "Inspect" then Text.derzhatPozu elseif kind == "Aim" then Text.derzhatPritsel else Text.derzhatKadr
local holdPose = button(page, holdText, UDim2.fromOffset(165, y), UDim2.fromOffset(145, 28)) local holdPose = button(page, holdText, UDim2.fromOffset(165, y), UDim2.fromOffset(145, 28))
local function refreshHold() local function refreshHold()
local on = target:GetAttribute(previewAttr) == true local on = target:GetAttribute(previewAttr) == true
@@ -574,7 +576,7 @@ selectTab(1)
local bottom = ROWS_TOP + maxRows * 34 + 6 local bottom = ROWS_TOP + maxRows * 34 + 6
local stepButton = button(panel, "", UDim2.fromOffset(12, bottom), UDim2.fromOffset(96, 30)) local stepButton = button(panel, "", UDim2.fromOffset(12, bottom), UDim2.fromOffset(96, 30))
local function refreshStep() local function refreshStep()
stepButton.Text = "Шаг: " .. tostring(STEPS[stepIndex]) stepButton.Text = Text.shag .. tostring(STEPS[stepIndex])
end end
refreshStep() refreshStep()
stepButton.MouseButton1Click:Connect(function() stepButton.MouseButton1Click:Connect(function()
@@ -582,14 +584,14 @@ stepButton.MouseButton1Click:Connect(function()
refreshStep() refreshStep()
end) end)
local reset = button(panel, "Сброс", UDim2.fromOffset(114, bottom), UDim2.fromOffset(80, 30)) local reset = button(panel, Text.sbros, UDim2.fromOffset(114, bottom), UDim2.fromOffset(80, 30))
reset.MouseButton1Click:Connect(function() reset.MouseButton1Click:Connect(function()
for _, p in PARAMS do for _, p in PARAMS do
setValue(p.name, initial[p.name]) setValue(p.name, initial[p.name])
end end
end) end)
local save = button(panel, "Сохранить", UDim2.fromOffset(200, bottom), UDim2.fromOffset(110, 30)) local save = button(panel, Text.sokhranit, UDim2.fromOffset(200, bottom), UDim2.fromOffset(110, 30))
save.BackgroundColor3 = Color3.fromRGB(40, 140, 80) save.BackgroundColor3 = Color3.fromRGB(40, 140, 80)
save.MouseButton1Click:Connect(function() save.MouseButton1Click:Connect(function()
local values = {} local values = {}
@@ -600,9 +602,9 @@ save.MouseButton1Click:Connect(function()
print("VIEWMODEL_TUNE " .. json) print("VIEWMODEL_TUNE " .. json)
-- picked up by the ViewmodelTuneSaver Studio plugin and written into the place after the playtest -- picked up by the ViewmodelTuneSaver Studio plugin and written into the place after the playtest
target:SetAttribute("SavedTune", HttpService:JSONEncode({ t = DateTime.now().UnixTimestampMillis, values = values })) target:SetAttribute("SavedTune", HttpService:JSONEncode({ t = DateTime.now().UnixTimestampMillis, values = values }))
save.Text = "Сохранено ✓" save.Text = Text.sokhraneno
task.delay(1.5, function() task.delay(1.5, function()
save.Text = "Сохранить" save.Text = Text.sokhranit
end) end)
end) end)
+10 -8
View File
@@ -1,4 +1,6 @@
--!strict --!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.ProceduralArena
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage") local ServerStorage = game:GetService("ServerStorage")
local Mobility = require(ReplicatedStorage:WaitForChild("ArenaMobility") :: ModuleScript) local Mobility = require(ReplicatedStorage:WaitForChild("ArenaMobility") :: ModuleScript)
@@ -54,16 +56,16 @@ assert(jumpArt and #boostArt > 0, "Arena mobility templates are missing")
table.sort(boostArt, function(a, b) return a.model.Name < b.model.Name end) table.sort(boostArt, function(a, b) return a.model.Name < b.model.Name end)
local keeps = { local keeps = {
{name = "Бастионы", roofHalfZ = 23, wingX = 12, width = 32, depth = 18, balconyX = -12}, {name = Text.bastiony, roofHalfZ = 23, wingX = 12, width = 32, depth = 18, balconyX = -12},
{name = "Галереи", roofHalfZ = 20, wingX = 0, width = 46, depth = 25, balconyX = 0}, {name = Text.galerei, roofHalfZ = 20, wingX = 0, width = 46, depth = 25, balconyX = 0},
{name = "Террасы", roofHalfZ = 27, wingX = -14, width = 24, depth = 13, balconyX = 17}, {name = Text.terrasy, roofHalfZ = 27, wingX = -14, width = 24, depth = 13, balconyX = 17},
} }
local tunnels = { local tunnels = {
{name = "Парные тоннели", openings = {{x = -37, width = 21}, {x = 37, width = 21}}}, {name = Text.parnyeTonneli, openings = {{x = -37, width = 21}, {x = 37, width = 21}}},
{name = "Тоннель со смещением", openings = {{x = -25, width = 27}}}, {name = Text.tonnelSoSmescheniem, openings = {{x = -25, width = 27}}},
{name = "Три прохода", openings = {{x = -49, width = 17}, {x = 0, width = 21}, {x = 49, width = 17}}}, {name = Text.triProkhoda, openings = {{x = -49, width = 17}, {x = 0, width = 21}, {x = 49, width = 17}}},
} }
local rampPlans = {"Боковые подъёмы", "Торцевые подъёмы", "Угловые подъёмы"} local rampPlans = {Text.bokovyePodYomy, Text.tortsevyePodYomy, Text.uglovyePodYomy}
local recentProfiles: {string} = {} local recentProfiles: {string} = {}
local function profileKey(plan: Plan): string local function profileKey(plan: Plan): string
@@ -199,7 +201,7 @@ local function base(layout: Layout, parent: Folder, side: string, rotation: CFra
text.Size, text.BackgroundTransparency = UDim2.fromScale(1, 1), 1 text.Size, text.BackgroundTransparency = UDim2.fromScale(1, 1), 1
text.Font, text.TextSize = Enum.Font.GothamBlack, 19 text.Font, text.TextSize = Enum.Font.GothamBlack, 19
text.TextColor3, text.TextStrokeTransparency = color, .2 text.TextColor3, text.TextStrokeTransparency = color, .2
text.Text = if blue then "БАЗА СИНИХ" else "БАЗА ОРАНЖЕВЫХ" text.Text = if blue then Text.bazaSinikh else Text.bazaOranzhevykh
text.Parent = sign text.Parent = sign
local points: {Vector3} = {} local points: {Vector3} = {}