diff --git a/core/include/readyup/hud_iface.h b/core/include/readyup/hud_iface.h index 16aa0a15..30640b78 100644 --- a/core/include/readyup/hud_iface.h +++ b/core/include/readyup/hud_iface.h @@ -74,6 +74,12 @@ typedef struct ru_hud_v1 { * own), on (1) or off (0): hover (CSS :hover, tooltips) needs it. Give it back when done and on * disconnect. `screen` and `menu` manage at_ui's cursor themselves. 1 = done. */ int (*set_capture)(int hud, int slot, int on); + /* v1.4 (check struct_size): a player who plays without the custom HUD (`.hud off`, or the + * platform's player setting through set_player_off). For them screen / menu / set_text / + * set_class do nothing (menu returns 0): send chat and the centre panel instead. player_off: 1 = + * off. set_player_off: off 1 / on 0, saved by hud.so; 1 = done. */ + int (*player_off)(uint64_t steamid64); + int (*set_player_off)(uint64_t steamid64, int off); /* v1.x: members are appended here. */ } ru_hud_v1; diff --git a/hud/build.ps1 b/hud/build.ps1 index e52792e5..0c743ae6 100644 --- a/hud/build.ps1 +++ b/hud/build.ps1 @@ -58,6 +58,14 @@ foreach ($job in $jobs) { foreach ($file in Get-ChildItem (Join-Path $here $job.Src) -Filter "*.$($job.Ext)") { $target = Join-Path $dstDir $file.Name Copy-Item $file.FullName $target -Force + # The dev build line (ui_dev): this build's commit and time, so a dev server shows which HUD + # each player has. + if ($job.Ext -eq "xml") { + $sha = (& git -C $here rev-parse --short HEAD 2>$null) + if (-not $sha) { $sha = "nogit" } + $stamp = "$sha " + (Get-Date -Format "yyyy-MM-dd HH:mm") + (Get-Content $target -Raw) -replace "__AT_HUD_BUILD__", $stamp | Set-Content $target -NoNewline -Encoding utf8 + } # The compiler works out the addon from the content\csgo_addons\ path. & $compiler -i $target | Out-Host $out = Join-Path $game (Join-Path $job.Dst ($file.BaseName + "." + $job.Out)) @@ -102,6 +110,31 @@ foreach ($file in Get-ChildItem (Join-Path $here "images\icons") -Filter "*.svg" Write-Output "FAILED $out" $failed++ } + # The team emblems also exist as panorama\images\icons\ct_logo / t_logo (no _1c); as CT the + # circle still showed CS2's emblem with only the _1c file replaced (2026-11-24). Same picture. + if ($file.BaseName -match '^(ct|t)_logo_1c$') { + $side = $Matches[1] + $plain = Join-Path (Join-Path $content "panorama\images\icons") ($side + "_logo.svg") + Copy-Item $file.FullName $plain -Force + & $compiler -i $plain | Out-Host + $out2 = Join-Path $game ("panorama\images\icons\" + $side + "_logo.vsvg_c") + if (Test-Path $out2) { Write-Output ("OK {0} ({1} bytes)" -f $out2, (Get-Item $out2).Length) } else { Write-Output "FAILED $out2"; $failed++ } + } + # The same ram as a team logo (mp_teamlogo_1/2 atram, set by hud.so; CS2 cuts a logo name at 7 characters): CS2 draws the team + # logo in that circle and loads it by name when needed, so unlike the icons above (cached at + # startup) it shows every time. + if ($file.BaseName -eq "ct_logo_1c") { + # The full-colour AT logo (images/team/atram.svg) when there is one; else the ram above. + $teamSrc = Join-Path $here "images\team\atram.svg" + if (Test-Path $teamSrc) { $file = Get-Item $teamSrc } + $teamDir = Join-Path $content "panorama\images\tournaments\teams" + New-Item -ItemType Directory -Force -Path $teamDir | Out-Null + $team = Join-Path $teamDir "atram.svg" + Copy-Item $file.FullName $team -Force + & $compiler -i $team | Out-Host + $out3 = Join-Path $game "panorama\images\tournaments\teams\atram.vsvg_c" + if (Test-Path $out3) { Write-Output ("OK {0} ({1} bytes)" -f $out3, (Get-Item $out3).Length) } else { Write-Output "FAILED $out3"; $failed++ } + } } # Tool caches must not end up in the Workshop upload. diff --git a/hud/images/icons/ct_logo_1c.svg b/hud/images/icons/ct_logo_1c.svg index 54811fc4..d949675b 100644 --- a/hud/images/icons/ct_logo_1c.svg +++ b/hud/images/icons/ct_logo_1c.svg @@ -1,15 +1,15 @@ - - - - - - - + + + + + + + diff --git a/hud/images/icons/t_logo_1c.svg b/hud/images/icons/t_logo_1c.svg index 54811fc4..d949675b 100644 --- a/hud/images/icons/t_logo_1c.svg +++ b/hud/images/icons/t_logo_1c.svg @@ -1,15 +1,15 @@ - - - - - - - + + + + + + + diff --git a/hud/images/team/atram.svg b/hud/images/team/atram.svg new file mode 100644 index 00000000..2deb6511 --- /dev/null +++ b/hud/images/team/atram.svg @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hud/layout/at_kit.xml b/hud/layout/at_kit.xml index 5ac595f4..daf3dbb4 100644 --- a/hud/layout/at_kit.xml +++ b/hud/layout/at_kit.xml @@ -25,7 +25,7 @@ - + diff --git a/hud/layout/at_ui.xml b/hud/layout/at_ui.xml index 9d1f3163..6cbf75ef 100644 --- a/hud/layout/at_ui.xml +++ b/hud/layout/at_ui.xml @@ -219,18 +219,21 @@ + + +

_kind

_title

_sub

_timer

_counter

_hint ({s:text}, has-* classes) teams

_tA

_tB, dots

_dA0..4

_dB0..4 (class on) (has-teams) @@ -13,7 +13,7 @@ row classes on the panel: cols-1..4, bw-s / bw-m / bw-l / bw-xl (has-buttons) close

_close with _l (has-close) -

is ui_card or ui_mid. Panel classes: on, c-live / c-warn / c-ban / c-muted (accent default), +

is ui_card, ui_mid or ui_left (rows: class sel on the chosen one, hold while E is down). Panel classes: on, c-live / c-warn / c-ban / c-muted (accent default), mini (the card as a one-line pill), fx-, leaving + out-, urgent (5 s or less on the timer), and any utility from the spec's cls= (at_ui.css, "Tailwind for CS2"). Parts with ids take cls.= utilities: _brand _kind _title _sub _hint _timer _counter _teams _confirm _lines _cmds @@ -61,7 +61,8 @@ def block(p): vs = panel(f"{p}_vs", "ui-vs", children=label(f"{p}_vsA", "ui-vsname") + label(cls="ui-vsmid", text="vs") + label(f"{p}_vsB", "ui-vsname")) cmds = panel(f"{p}_cmds", "ui-cmds", children="".join( - panel(f"{p}_k{n}", "ui-cmd", label(f"{p}_k{n}_l", "ui-cmdlabel") + panel(cls="ui-kbd", children=label(f"{p}_k{n}_c", "ui-kbdtext"))) + panel(f"{p}_k{n}", "ui-cmd", label(f"{p}_k{n}_l", "ui-cmdlabel") + panel(cls="ui-kbd", children=label(f"{p}_k{n}_c", "ui-kbdtext")) + + label(f"{p}_k{n}_a", "ui-cmdlabel ui-cmdafter")) for n in range(3))) rows = panel(f"{p}_lines", "ui-lines", children="".join( panel(f"{p}_n{n}", "ui-row", label(f"{p}_n{n}_k", "ui-rowk") + label(f"{p}_n{n}_v", "ui-rowv")) @@ -69,6 +70,10 @@ def block(p): # The first button can be held with Use (hud.so puts `holdable` on it, then `hold` while the key # is down): a fill behind the label and the player's own key ({g:csgo_key:k}) at its left. def hold_parts(n): + if p == "ui_left": + # The menu panel: every row can be chosen (W S) and held (E): a mark bar at its left + # and the slide fill behind the label. + return panel(cls="ui-rowmark") + panel(cls="ui-btnfill") if n: return "" return panel(cls="ui-btnfill") + panel(cls="ui-btnkey", children=( @@ -76,7 +81,8 @@ def hold_parts(n): buttons = panel(f"{p}_buttons", "ui-buttons", children="".join( button(f"{p}_b{n}", "ui-btn", panel(cls="ui-btnglow") + hold_parts(n) + label(f"{p}_b{n}_l", "ui-btnlabel") + label(f"{p}_b{n}_s", "ui-btnsub")) for n in range(24))) - close = button(f"{p}_close", "ui-close", label(f"{p}_close_l", "ui-closelabel")) + close_parts = panel(cls="ui-rowmark") + panel(cls="ui-btnfill") if p == "ui_left" else "" + close = button(f"{p}_close", "ui-close", close_parts + label(f"{p}_close_l", "ui-closelabel")) # Behind the content: a wash of the accent from the left and a few breathing pixels (cs2-ui-kit). # ui-back doubles the panel background: CS2 draws one layer of it see-through (2026-10-27). back = panel(cls="ui-back") + panel(cls="ui-wash") + panel(cls="ui-pixels", children="".join( @@ -91,8 +97,23 @@ def hold_parts(n): def main(): # The wraps carry the HUD scale (scale-70 .. scale-100, set by hud.so: `ru hudkit scale`). body = panel("ui_cardwrap", "ui-cardwrap", block("ui_card")) + panel("ui_midwrap", "ui-midwrap", block("ui_mid")) + # Menus: a list on the left, vertically centred (v4, Hold E). W S move the `sel` row (hud.so), + # holding E slides the fill across it, the close row is always last. + body += panel("ui_leftwrap", "ui-leftwrap", block("ui_left")) # "Your HUD addon is out of date": shown unless hud.so's v- class is one this addon knows. body += panel("ui_ver", "ui-ver", label("ui_ver_t", "ui-vertext")) + # Dev servers (readyup.cfg dev=1): which HUD this client has and which hud.so the server runs. + # __AT_HUD_BUILD__ is replaced by hud/build.ps1 with the commit and build time. + body += panel("ui_dev", "ui-dev", label(cls="ui-devt", text="HUD __AT_HUD_BUILD__") + + label("ui_dev_srv", "ui-devt")) + # The watermark either side of the AT logo between health and ammo (Sivert, 2026-11-24, draft G): + # "PLAYED ON" left of the circle above CS2's health line, "AUTO TOURNAMENT" right of it below. + body += panel("ui_wm", "ui-wm", panel(cls="ui-wmhalf ui-wml", children=label(cls="ui-wmt", text="PLAYED ON")) + + panel(cls="ui-wmhalf ui-wmr", children=label(cls="ui-wmt", text="AUTO TOURNAMENT"))) + # The ram in CS2's team badge between health and ammo (Sivert, 2026-11-24, draft D): a solid disc + # inside the ring (the ring keeps the player's colour) with the full-colour ram on it, over + # Valve's CT/T emblem. CS2 caches that emblem at startup, so replacing its file never showed. + body += panel("ui_badge", "ui-badge", panel(cls="ui-badgeram")) # Hold Use: a chip top right that names the key the player bound to +use ({g:csgo_key:k}, k set # to "+use" by hud.so) and what holding it does. hud.so puts `hold` on it while the key is down, # which runs the fill; at the end it presses the open card's button or opens .menu. diff --git a/plugins/addons/addons_plugin.cpp b/plugins/addons/addons_plugin.cpp index e0262e36..01a040bc 100644 --- a/plugins/addons/addons_plugin.cpp +++ b/plugins/addons/addons_plugin.cpp @@ -429,8 +429,10 @@ void OnTick(void*, const ru_tick_info* t) { if (t->now - g_lastConfig >= 5.0) { g_lastConfig = t->now; int bad = 0; - // The HUD addon, which every player needs, first. - auto ids = WithHudAddon(ParseIds(ConfigValue("workshop_addons"), &bad)); + // The HUD addon, which every player needs, first; `hud_addon=` swaps in a test build of it. + int badHud = 0; + const auto hud = ParseIds(ConfigValue("hud_addon"), &badHud); + auto ids = WithHudAddon(ParseIds(ConfigValue("workshop_addons"), &bad), hud.empty() ? kHudAddon : hud.front()); if (ids != g_ids) { g_ids = std::move(ids); ru_logf(g_api, RU_LOG_INFO, "workshop_addons: %zu addon(s)%s", g_ids.size(), bad ? " (some entries are not workshop ids)" : ""); diff --git a/plugins/addons/addons_rules.cpp b/plugins/addons/addons_rules.cpp index 8fe8491f..1f36bee7 100644 --- a/plugins/addons/addons_rules.cpp +++ b/plugins/addons/addons_rules.cpp @@ -52,8 +52,10 @@ Action NextAction(uint32_t s, bool mounted, bool downloadAsked) { return Action::kMount; } -std::vector WithHudAddon(std::vector ids) { - if (std::find(ids.begin(), ids.end(), kHudAddon) == ids.end()) ids.insert(ids.begin(), kHudAddon); +std::vector WithHudAddon(std::vector ids, uint64_t hud) { + if (!hud) hud = kHudAddon; + if (hud != kHudAddon) ids.erase(std::remove(ids.begin(), ids.end(), kHudAddon), ids.end()); + if (std::find(ids.begin(), ids.end(), hud) == ids.end()) ids.insert(ids.begin(), hud); return ids; } diff --git a/plugins/addons/addons_rules.h b/plugins/addons/addons_rules.h index 1be837bb..ed469048 100644 --- a/plugins/addons/addons_rules.h +++ b/plugins/addons/addons_rules.h @@ -14,7 +14,9 @@ std::vector ParseIds(const std::string& text, int* bad); // server mounts it, whatever workshop_addons lists. constexpr uint64_t kHudAddon = 3827905393ull; // `ids` with the HUD addon first (unless listed already). -std::vector WithHudAddon(std::vector ids); +// `hud` replaces it on one server (`hud_addon=` in [addons]: a test build of the HUD), never +// mounted next to it, so the test copy is the one players load. +std::vector WithHudAddon(std::vector ids, uint64_t hud = kHudAddon); // ISteamUGC::GetItemState bits (EItemState). enum ItemState : uint32_t { diff --git a/plugins/addons/tests/addons_rules_test.cpp b/plugins/addons/tests/addons_rules_test.cpp index c6851042..a079f6f6 100644 --- a/plugins/addons/tests/addons_rules_test.cpp +++ b/plugins/addons/tests/addons_rules_test.cpp @@ -29,6 +29,9 @@ int main() { CHECK(WithHudAddon({}) == std::vector{kHudAddon}); CHECK((WithHudAddon({123}) == std::vector{kHudAddon, 123})); CHECK((WithHudAddon({123, kHudAddon}) == std::vector{123, kHudAddon})); + // hud_addon=: a test build of the HUD instead of the real one, never both. + CHECK((WithHudAddon({123, kHudAddon}, 999) == std::vector{999, 123})); + CHECK((WithHudAddon({999}, 999) == std::vector{999})); CHECK(ItemStateText(0) == "not installed"); CHECK(ItemStateText(kItemInstalled) == "installed"); diff --git a/plugins/fleet/fleet_plugin.cpp b/plugins/fleet/fleet_plugin.cpp index 9355ab1b..cc5245c0 100644 --- a/plugins/fleet/fleet_plugin.cpp +++ b/plugins/fleet/fleet_plugin.cpp @@ -602,6 +602,43 @@ void SetRating(const fleet::json::Value& player) { g_ratings[id] = Rating{static_cast(r), static_cast(w < 0 ? 0 : w > 999999 ? 999999 : w)}; } +// ---- the platform's HUD choice per player -------------------------------------------------------- +// `hud: false` on a player of match.assign (or an add_player op) turns the custom HUD off for them +// on hud.so (ru_hud_v1 1.4 set_player_off), as `.hud off` would; `hud: true` turns it back on. No +// field: the player's own choice stays. +void SetHudChoice(const fleet::json::Value& player) { + const fleet::json::Value* sid = player.Get("steamid64"); + const fleet::json::Value* hud = player.Get("hud"); + if (!sid || !hud || hud->t != fleet::json::Value::T::Bool) return; + const uint64_t id = std::strtoull(sid->AsStr().c_str(), nullptr, 10); + if (!id) return; + const auto* h = static_cast(g_api->get_interface(g_api->self, RU_HUD_IFACE_NAME, 1)); + if (!h || h->struct_size < offsetof(ru_hud_v1, set_player_off) + sizeof(h->set_player_off) || !h->set_player_off) return; + h->set_player_off(id, hud->b ? 0 : 1); +} + +void OnPlayerHud(const std::string& type, const std::string& payload) { + fleet::json::Value v; + if (!fleet::json::Parse(payload, &v) || !v.IsObj()) return; + if (type == "match.assign") { + const fleet::json::Value* cfg = v.Get("config"); + for (const char* team : {"team1", "team2"}) { + const fleet::json::Value* t = cfg ? cfg->Get(team) : nullptr; + const fleet::json::Value* players = t ? t->Get("players") : nullptr; + if (players && players->IsArr()) { + for (const auto& p : players->a) SetHudChoice(p); + } + } + return; + } + const fleet::json::Value* ops = v.Get("ops"); + if (!ops || !ops->IsArr()) return; + for (const auto& op : ops->a) { + const fleet::json::Value* kind = op.IsObj() ? op.Get("op") : nullptr; + if (kind && kind->AsStr() == "add_player") SetHudChoice(op); + } +} + void OnPlayerRatings(const std::string& type, const std::string& payload) { if (type == "match.unassign") { g_ratings.clear(); @@ -1026,6 +1063,7 @@ void DrainTask(void*) { m.payload_json = in.payloadJson.c_str(); if (in.env.type == "server.config") OnServerConfig(in.payloadJson); if (in.env.type == "match.assign" || in.env.type == "match.update") OnPlayerLanguages(in.env.type, in.payloadJson); + if (in.env.type == "match.assign" || in.env.type == "match.update") OnPlayerHud(in.env.type, in.payloadJson); if (in.env.type == "match.assign" || in.env.type == "match.update" || in.env.type == "match.unassign") OnPlayerRatings(in.env.type, in.payloadJson); if (in.env.type == "demo.ack") { diff --git a/plugins/fleet/protocol/v1/match.defs.json b/plugins/fleet/protocol/v1/match.defs.json index 0232b36a..ea8895e2 100644 --- a/plugins/fleet/protocol/v1/match.defs.json +++ b/plugins/fleet/protocol/v1/match.defs.json @@ -75,6 +75,10 @@ "minimum": 0, "maximum": 999999 }, + "hud": { + "description": "The player's in-game HUD choice on the platform: false = no custom HUD, Ready Up uses the chat and the centre panel for them (as `.hud off`). No field or true: the custom HUD.", + "type": "boolean" + }, "score": { "type": "object", "required": [ @@ -498,6 +502,9 @@ }, "rating_wins": { "$ref": "#/$defs/rating_wins" + }, + "hud": { + "$ref": "#/$defs/hud" } } }, diff --git a/plugins/fleet/protocol/v1/messages/match.update.json b/plugins/fleet/protocol/v1/messages/match.update.json index ccd11742..b63e1c5a 100644 --- a/plugins/fleet/protocol/v1/messages/match.update.json +++ b/plugins/fleet/protocol/v1/messages/match.update.json @@ -66,6 +66,9 @@ }, "rating_wins": { "$ref": "../match.defs.json#/$defs/rating_wins" + }, + "hud": { + "$ref": "../match.defs.json#/$defs/hud" } } }, diff --git a/plugins/hud/CMakeLists.txt b/plugins/hud/CMakeLists.txt index 3934fdab..39b4c943 100644 --- a/plugins/hud/CMakeLists.txt +++ b/plugins/hud/CMakeLists.txt @@ -6,7 +6,7 @@ readyup_add_plugin(hud hud_plugin.cpp hud_vec.cpp hud_screen.cpp) readyup_embed_locales(readyup_plugin_hud ${CMAKE_CURRENT_SOURCE_DIR}/locales) target_include_directories(readyup_plugin_hud PRIVATE ${CMAKE_SOURCE_DIR}/libs) target_include_directories(readyup_plugin_hud PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_compile_definitions(readyup_plugin_hud PRIVATE HUD_VERSION="${READYUP_SEMVER}") +target_compile_definitions(readyup_plugin_hud PRIVATE HUD_VERSION="${READYUP_SEMVER}" HUD_GIT_SHA="${READYUP_GIT_SHA}") target_link_libraries(readyup_plugin_hud PRIVATE dl) # Raw CUtlVector helpers (hud_vec.h; ctest `hud_vec`). diff --git a/plugins/hud/hud_addon.h b/plugins/hud/hud_addon.h index 84fe4b62..646423e8 100644 --- a/plugins/hud/hud_addon.h +++ b/plugins/hud/hud_addon.h @@ -11,5 +11,5 @@ #pragma once namespace hud { -constexpr int kAddonVersion = 5; +constexpr int kAddonVersion = 7; } // namespace hud diff --git a/plugins/hud/hud_plugin.cpp b/plugins/hud/hud_plugin.cpp index 92bd7285..8274a977 100644 --- a/plugins/hud/hud_plugin.cpp +++ b/plugins/hud/hud_plugin.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -384,7 +386,62 @@ int IfOpen(const char* path) { return static_cast(g_layouts.size()); } +// ---- players who play without the custom HUD (`.hud off`, or the platform's player setting) ---- +// Their slots get nothing from screen / menu / set_text / set_class: the callers send chat and the +// centre panel instead (ru_hud_v1 player_off, v1.4). Kept in /hud_off.txt, one SteamID64 +// a line (Sivert, 2026-11-24: chat as the fallback, a choice per player). +std::set g_hudOff; +std::bitset<64> g_slotOff; // the slots of g_hudOff's players: every tick and on a change + +std::string HudOffPath() { + if (!RU_API_HAS(g_api, data_dir) || !g_api->data_dir) return {}; + const char* d = g_api->data_dir(g_api->self); + return d && *d ? std::string(d) + "/hud_off.txt" : std::string(); +} + +void HudOffLoad() { + g_hudOff.clear(); + const std::string p = HudOffPath(); + if (p.empty()) return; + std::ifstream f(p); + unsigned long long id = 0; + while (f >> id) + if (id) g_hudOff.insert(static_cast(id)); +} + +void HudOffSave() { + const std::string p = HudOffPath(); + if (p.empty()) return; + std::ofstream f(p, std::ios::trunc); + for (uint64_t id : g_hudOff) f << static_cast(id) << "\n"; +} + +int SlotOfSteamId(uint64_t id) { + for (int slot = 0; slot <= 63; ++slot) { + ru_player p{}; + p.struct_size = sizeof(p); + if (g_api->get_player(g_api->self, slot, &p) && p.connected && !p.is_bot && p.steamid64 == id) return slot; + } + return -1; +} + +void SlotOffRefresh() { + std::bitset<64> next; + if (!g_hudOff.empty()) { + for (int slot = 0; slot <= 63; ++slot) { + ru_player p{}; + p.struct_size = sizeof(p); + if (g_api->get_player(g_api->self, slot, &p) && p.connected && !p.is_bot && p.steamid64 && g_hudOff.count(p.steamid64)) + next.set(static_cast(slot)); + } + } + g_slotOff = next; +} + +bool SlotOff(int slot) { return slot >= 0 && slot <= 63 && g_slotOff.test(static_cast(slot)); } + int IfSetText(int hud, int slot, const char* panel, const char* var, const char* value) { + if (SlotOff(slot)) return 1; // HUD off for this player Layout* l = LayoutOf(hud); if (!l || !panel || !var || slot < RU_HUD_ALL || slot > 63) return 0; const Key k{panel, var}; @@ -405,6 +462,9 @@ int IfSetText(int hud, int slot, const char* panel, const char* var, const char* } int IfSetClass(int hud, int slot, const char* panel, const char* cls, int on) { + // HUD off for this player: nothing new is shown, but what was up can still be taken away (the + // Hold E chip stayed on screen when the off write was blocked too, 2026-11-24). + if (SlotOff(slot) && on) return 1; Layout* l = LayoutOf(hud); if (!l || !panel || !cls || slot < RU_HUD_ALL || slot > 63) return 0; const Key k{panel, cls}; @@ -579,6 +639,8 @@ struct ScreenSlot { bool dismissed = false; // closed with a plain close button: hidden until the id changes std::set> utils; // utility classes applied (element, class) bool captured = false; + int sel = 0; // ui_left: the chosen row (0..buttons-1, then the close row), W S move it + std::string selId; // the row that has `sel` now unsigned gen = 0; // bumps on every new id, so a stale delayed enter does nothing ru_hud_click_fn onClick = nullptr; void* user = nullptr; @@ -586,7 +648,8 @@ struct ScreenSlot { std::map g_screens; std::set g_buyOpen; // slots whose buy menu is open (open_buymenu .. close_buymenu) -std::string PanelOf(const Screen& s) { return s.where == "card" ? "ui_card" : "ui_mid"; } +std::string PanelOf(const Screen& s) { return s.where == "card" ? "ui_card" : s.where == "left" ? "ui_left" : "ui_mid"; } +const char* const kPanels[] = {"ui_card", "ui_mid", "ui_left"}; void UpdateCapture(int slot, bool force = false) { auto it = g_screens.find(slot); @@ -611,8 +674,57 @@ void CaptureSweep() { for (auto& kv : g_screens) UpdateCapture(kv.first, true); } +// ---- the menu panel (ui_left): W S choose a row, holding E picks it (HoldAction) ---------------- +// Rows are the buttons that are a choice (a label and a command, not off), then the close row. +std::vector NavRows(const ScreenSlot& ss) { + std::vector rows; + for (size_t i = 0; i < ss.cur.buttons.size() && i < static_cast(kMaxButtons); ++i) { + const Button& b = ss.cur.buttons[i]; + if (!b.label.empty() && !b.cmd.empty() && b.state != "off") rows.push_back("ui_left_b" + std::to_string(i)); + } + if (ss.cur.hasClose) rows.push_back("ui_left_close"); + return rows; +} + +// `sel` on the chosen row only (clamped: the rows can change under it). +void NavDraw(int slot, ScreenSlot& ss) { + const std::vector rows = NavRows(ss); + std::string want; + if (!rows.empty()) { + const int n = static_cast(rows.size()); + ss.sel = ((ss.sel % n) + n) % n; + want = rows[static_cast(ss.sel)]; + } + if (want == ss.selId) return; + const int h = IfOpen(kUiLayout); + if (!ss.selId.empty()) IfSetClass(h, slot, ss.selId.c_str(), "sel", 0); + if (!want.empty()) IfSetClass(h, slot, want.c_str(), "sel", 1); + ss.selId = want; +} + +// A left panel always ends with a close row and says how to use it. +void LeftDefaults(int slot, Screen& s) { + const std::string lang = readyup::i18n::LanguageOf(g_api, slot); + if (!s.hasClose && !s.noCloseRow) { + s.hasClose = true; + s.closeLabel = g_text.Tr(lang, "hud.hold_close"); + s.closeCmd.clear(); + } + s.hint = g_text.Tr(lang, "hud.menu_hint"); + // A captured cursor takes the keyboard too, and W S must reach the server: the cursor only + // with the buy menu open (B), as on the cards. + if (s.mouse == Mouse::On) s.mouse = Mouse::B; +} + void DrawScreen(int slot, ScreenSlot& ss) { const int h = IfOpen(kUiLayout); + if (ss.cur.where == "chip") { + // No panel: the hold chip above the logo carries it (HoldAction), so every panel is off. + for (const char* panel : kPanels) IfSetClass(h, slot, panel, "on", 0); + ss.shown = !ss.dismissed && !ss.cur.empty(); + UpdateCapture(slot); + return; + } const std::string p = PanelOf(ss.cur); const bool wasShown = ss.shown; if (!wasShown) { @@ -624,6 +736,8 @@ void DrawScreen(int slot, ScreenSlot& ss) { if (w.isText) IfSetText(h, slot, w.panel.c_str(), w.name.c_str(), w.value.c_str()); else IfSetClass(h, slot, w.panel.c_str(), w.name.c_str(), w.on ? 1 : 0); } + // hold=1: the chip above the logo carries the first button, so the card hides its buttons. + IfSetClass(h, slot, p.c_str(), "chiphold", ss.cur.hold && p != "ui_left" ? 1 : 0); // Utilities (cls= / cls.=): off the ones this screen no longer has, on the new ones. std::set> want; for (auto& u : Utilities(ss.cur, p)) want.insert(std::move(u)); @@ -632,13 +746,17 @@ void DrawScreen(int slot, ScreenSlot& ss) { for (const auto& u : want) IfSetClass(h, slot, u.first.c_str(), u.second.c_str(), 1); ss.utils.swap(want); const bool show = !ss.dismissed && !ss.cur.empty(); - IfSetClass(h, slot, p == "ui_card" ? "ui_mid" : "ui_card", "on", 0); + for (const char* other : kPanels) + if (p != other) IfSetClass(h, slot, other, "on", 0); ss.shown = show; if (show && !wasShown) { // `on` a moment later, so the client has the enter pose before it animates out of it. const unsigned gen = ss.gen; const std::string panel = p; - g_later.emplace_back(g_now + 0.06, [slot, gen, panel] { + // The menu list gets longer: it is laid out for the first time when it opens, and with 0.06 s + // the client took the enter pose and `on` in one go, so it appeared without sliding (2026-11-24). + const double delay = p == "ui_left" ? 0.15 : 0.06; + g_later.emplace_back(g_now + delay, [slot, gen, panel] { auto it = g_screens.find(slot); if (it != g_screens.end() && it->second.gen == gen && it->second.shown) IfSetClass(IfOpen(kUiLayout), slot, panel.c_str(), "on", 1); @@ -647,6 +765,7 @@ void DrawScreen(int slot, ScreenSlot& ss) { IfSetClass(h, slot, p.c_str(), "on", show ? 1 : 0); } UpdateCapture(slot); + if (p == "ui_left") NavDraw(slot, ss); } std::string ButtonsKey(const Screen& s) { @@ -662,7 +781,7 @@ bool DemoDefer(int slot, const std::string& spec, ru_hud_click_fn onClick, void* int IfScreen(int slot, const char* specIn, ru_hud_click_fn onClick, void* user) { if (slot < 0 || slot > 63) return 0; - const std::string spec = specIn ? specIn : ""; + const std::string spec = SlotOff(slot) ? std::string() : std::string(specIn ? specIn : ""); // HUD off: hidden if (DemoDefer(slot, spec, onClick, user)) return 1; ScreenSlot& ss = g_screens[slot]; ss.onClick = onClick; @@ -670,6 +789,7 @@ int IfScreen(int slot, const char* specIn, ru_hud_click_fn onClick, void* user) if (spec == ss.spec) return 1; ss.spec = spec; Screen next = ParseScreen(spec); + if (next.where == "left") LeftDefaults(slot, next); const int h = IfOpen(kUiLayout); const bool sameId = !next.empty() && !ss.cur.empty() && next.id == ss.cur.id && next.where == ss.cur.where; if (sameId) { @@ -705,6 +825,9 @@ int IfScreen(int slot, const char* specIn, ru_hud_click_fn onClick, void* user) ss.shown = false; ss.clicked = false; ss.dismissed = false; + if (!ss.selId.empty()) IfSetClass(h, slot, ss.selId.c_str(), "sel", 0); + ss.sel = 0; + ss.selId.clear(); ss.cur = std::move(next); UpdateCapture(slot); if (ss.cur.empty()) return 1; @@ -770,8 +893,33 @@ void ScreenForget(int slot) { } } +// Turns the custom HUD off (or back on) for one player and saves the choice. Off: whatever is shown +// goes away now; on: the callers' next screen / card draws again. +bool SetPlayerOff(uint64_t id, bool off) { + if (!id || (g_hudOff.count(id) != 0) == off) return false; + const int slot = SlotOfSteamId(id); + if (off && slot >= 0) { + IfScreen(slot, "", nullptr, nullptr); + MenuForget(slot); + } + if (off) + g_hudOff.insert(id); + else + g_hudOff.erase(id); + HudOffSave(); + SlotOffRefresh(); + if (!off && slot >= 0) ScreenForget(slot); + return true; +} + +int IfPlayerOff(uint64_t id) { return id && g_hudOff.count(id) ? 1 : 0; } +int IfSetPlayerOff(uint64_t id, int off) { + SetPlayerOff(id, off != 0); + return id ? 1 : 0; +} + const ru_hud_v1 g_iface = {sizeof(ru_hud_v1), &IfAvailable, &IfOpen, &IfSetText, &IfSetClass, &IfClearSlot, &IfScreen, &IfMenu, &IfRegisterMenu, - &IfSetCapture}; + &IfSetCapture, &IfPlayerOff, &IfSetPlayerOff}; // `ru hudkit click [slot]`: the CT / T proof of concept for one player, or every human. const char* kClickLayout = "panorama/layout/custom_game/at_click.xml"; @@ -983,7 +1131,7 @@ void ApplyScale() { const int h = IfOpen(kUiLayout); for (int pct = 70; pct <= 100; pct += 5) { const std::string c = "scale-" + std::to_string(pct); - for (const char* wrap : {"ui_cardwrap", "ui_midwrap"}) IfSetClass(h, RU_HUD_ALL, wrap, c.c_str(), pct == g_scale ? 1 : 0); + for (const char* wrap : {"ui_cardwrap", "ui_midwrap", "ui_leftwrap"}) IfSetClass(h, RU_HUD_ALL, wrap, c.c_str(), pct == g_scale ? 1 : 0); } } int ParseScale(const std::string& s) { @@ -1021,8 +1169,120 @@ void AddonVersionTick() { } } +// Dev servers (readyup.cfg dev=1): the build line on every player's HUD, the addon's own stamp +// (hud/build.ps1) next to this hud.so's version and commit, to see who has an old HUD. +void WriteTeamLogos(); // below: the team logo on the team entities + +void DevBuildTick() { + static double next = 0; + if (g_now < next) return; + next = g_now + 2.0; + if (!(RU_API_HAS(g_api, dev_mode) && g_api->dev_mode && g_api->dev_mode(g_api->self))) return; + const int h = IfOpen(kUiLayout); + if (h <= 0) return; + for (int slot = 0; slot <= 63; ++slot) { + ru_player p{}; + p.struct_size = sizeof(p); + if (!g_api->get_player(g_api->self, slot, &p) || !p.connected || p.is_bot) continue; + IfSetClass(h, slot, "ui_dev", "on", 1); + IfSetText(h, slot, "ui_dev_srv", "text", "server hud " HUD_VERSION " " HUD_GIT_SHA); + } +} + +// The ram in CS2's team badge (#ui_badge) and the watermark beside it (#ui_wm), by what CS2 draws +// at the bottom (Sivert, 2026-11-24): +// - alive on T or CT: the badge, the watermark either side of it (`on` on both); +// - watching a player (in-eye or chase): CS2's spectator bar, with the watched player's avatar in +// that circle, so no badge and the watermark on one line above the bar (`spec` on ui_wm); +// - else (team select, the death cam, free roam, the buy menu open): neither. +// Sent on a change, and again every 3 s in case the layout entity was recreated. +namespace badge { +struct Off { + int alive = -2, obsPawn = -1, obsSvc = -1, obsMode = -1, obsTarget = -1; +}; +Off& Offsets() { + static Off o; + if (o.alive == -2) { + o.alive = g_api->schema_offset(g_api->self, "CCSPlayerController", "m_bPawnIsAlive"); + o.obsPawn = g_api->schema_offset(g_api->self, "CCSPlayerController", "m_hObserverPawn"); + o.obsSvc = g_api->schema_offset(g_api->self, "CBasePlayerPawn", "m_pObserverServices"); + o.obsMode = g_api->schema_offset(g_api->self, "CPlayer_ObserverServices", "m_iObserverMode"); + o.obsTarget = g_api->schema_offset(g_api->self, "CPlayer_ObserverServices", "m_hObserverTarget"); + ru_logf(g_api, RU_LOG_INFO, "badge: offsets alive=%d obsPawn=%d obsSvc=%d obsMode=%d obsTarget=%d", o.alive, + o.obsPawn, o.obsSvc, o.obsMode, o.obsTarget); + } + return o; +} + +uint32_t ReadU32(const void* base, int off) { + uint32_t v = 0; + std::memcpy(&v, static_cast(base) + off, sizeof(v)); + return v; +} + +// Watching a player in-eye (2) or in chase (3): the modes CS2 shows its spectator bar in. +bool Watching(void* ctrl) { + const Off& o = Offsets(); + if (o.obsPawn < 0 || o.obsSvc < 0 || o.obsMode < 0 || o.obsTarget < 0) return false; + void* pawn = g_api->entity_from_handle(g_api->self, ReadU32(ctrl, o.obsPawn)); + if (!pawn) return false; + void* svc = nullptr; + std::memcpy(&svc, static_cast(pawn) + o.obsSvc, sizeof(svc)); + if (!svc) return false; + const uint8_t mode = *(static_cast(svc) + o.obsMode); + if (mode != 2 && mode != 3) return false; + return g_api->entity_from_handle(g_api->self, ReadU32(svc, o.obsTarget)) != nullptr; +} +} // namespace badge + +void BadgeTick() { + static double next = 0, nextAll = 0; + static int8_t last[64]; + static bool init = false; + if (!init) { + std::memset(last, -1, sizeof(last)); + init = true; + } + if (g_now < next) return; + next = g_now + 0.2; + const bool all = g_now >= nextAll; + if (all) nextAll = g_now + 3.0; + const badge::Off& o = badge::Offsets(); + const int h = IfOpen(kUiLayout); + if (h <= 0) return; + for (int slot = 0; slot <= 63; ++slot) { + ru_player p{}; + p.struct_size = sizeof(p); + if (!g_api->get_player(g_api->self, slot, &p) || !p.connected || p.is_bot) { + last[slot] = -1; + continue; + } + int8_t state = 0; // 0 neither, 1 alive, 2 watching a player + if (void* ctrl = g_api->entity_by_index(g_api->self, slot + 1)) { + const bool alive = o.alive >= 0 && (p.team == RU_TEAM_T || p.team == RU_TEAM_CT) && + *(static_cast(ctrl) + o.alive) != 0; + if (alive) state = 1; + else if (badge::Watching(ctrl)) state = 2; + } + if (g_buyOpen.count(slot)) state = 0; // the buy menu covers the bottom bar (fades out, then back in) + if (state == last[slot] && !all) continue; + last[slot] = state; + IfSetClass(h, slot, "ui_badge", "on", state == 1 ? 1 : 0); + IfSetClass(h, slot, "ui_wm", "on", state == 1 ? 1 : 0); + IfSetClass(h, slot, "ui_wm", "spec", state == 2 ? 1 : 0); + } +} + void OnTick(void*, const ru_tick_info* t) { g_now = t->now; + SlotOffRefresh(); + DevBuildTick(); + BadgeTick(); + static double nextLogo = 0; + if (g_now >= nextLogo) { + nextLogo = g_now + 2.0; + WriteTeamLogos(); + } if (!g_origSvcUm && g_eng.ok) InstallClickHook(); if (g_layouts.empty() || std::none_of(g_layouts.begin(), g_layouts.end(), [](const Layout& l) { return l.path == kUiLayout; })) IfOpen(kUiLayout); @@ -1117,9 +1377,46 @@ void OnBeginMatch(void*, const char*, const ru_game_event*) { g_restartAfterBeginMatch = false; } +// The AT ram as both teams' logo: CS2 draws the team logo in the circle between health and ammo. +// The addon ships it at panorama/images/tournaments/teams/atram (hud/build.ps1; CS2 cuts a logo name at 7 characters, "autotournament" looked for "autotou"), a path CS2 +// has never loaded, so it shows every time; replacing icons/ui/ct_logo_1c only worked right after a +// download, because CS2 keeps the emblem it loaded at startup (2026-11-24, found by setting +// mp_teamlogo_1 navi). A match config's own mp_teamlogo_* goes out after this and wins. +void SetTeamLogos() { + if (!g_api || !g_api->server_command) return; + g_api->server_command(g_api->self, "mp_teamlogo_1 atram"); + g_api->server_command(g_api->self, "mp_teamlogo_2 atram"); +} + +// The cvars only reach the teams at a round start, and warmup has none: the logo showed in the +// scoreboard only after an mp_restartgame (2026-11-24). So the team entities get it directly too +// (CCSTeam::m_szTeamLogoImage, what clients read), unless a logo of its own is set there. +void WriteTeamLogos() { + static int off = -2, teamOff = -2; + if (off == -2) { + off = RU_API_HAS(g_api, schema_offset) && g_api->schema_offset ? g_api->schema_offset(g_api->self, "CCSTeam", "m_szTeamLogoImage") : -1; + teamOff = off >= 0 ? g_api->schema_offset(g_api->self, "CBaseEntity", "m_iTeamNum") : -1; + } + if (off < 0 || teamOff < 0 || !g_api->entity_by_index || !g_api->entity_classname) return; + for (int i = 1; i < 256; ++i) { + void* e = g_api->entity_by_index(g_api->self, i); + if (!e) continue; + const char* cls = g_api->entity_classname(g_api->self, e); + if (!cls || std::strcmp(cls, "cs_team_manager") != 0) continue; + uint8_t team = 0; + std::memcpy(&team, static_cast(e) + teamOff, sizeof(team)); + if (team != 2 && team != 3) continue; + char* logo = static_cast(e) + off; + if (logo[0] != 0) continue; // atram already, or a match's own logo + std::memcpy(logo, "atram", 6); + if (g_api->entity_mark_changed) g_api->entity_mark_changed(g_api->self, e); + } +} + void OnEvent(void*, const ru_event* ev) { if (ev->type == RU_EVENT_MAP_START) { g_mapStartedAt = g_now; + SetTeamLogos(); for (auto& l : g_layouts) l.handle = kNoHandle; // the map took the entity with it for (auto& [slot, ss] : g_screens) ss.captured = false; g_buyOpen.clear(); @@ -1342,7 +1639,7 @@ const std::vector>& DemoScreens() { {"pickurgent", "id=pick\ncolor=live\nkind=You won the knife\ntitle=Which side do you want?\ntimer=4\nbtn=CT|ct||#demo pickedct\nbtn=T|t||#demo pickedt\nmouse=on"}, {"pickedct", "id=pick\ncolor=live\nkind=You won the knife\ntitle=Simpert picked CT\nsub=Match starts in 5s\nbtn=CT|ct|picked|\nbtn=T|t|off|"}, {"lost", "id=lost\nkind=You lost the knife\ntitle=Team A is picking a side\ntimer=20"}, - {"golive", "id=golive\ncolor=live\nkind=Live\ntitle=Good luck, have fun\nsub=Team A (CT) vs Team B (T)\ncmd=Tech pause|.p\ncmd=Timeout|.tac\ncmd=Call an admin|.admin"}, + {"golive", "id=golive\ncolor=live\nkind=Live\ntitle=Match is live\nsub=Team A (CT) vs Team B (T)\ncmd=Type|.menu|in chat to open the match menu and view commands"}, {"pause", "id=pause\ncolor=warn\nkind=Tech pause\ntitle=Team B paused\nsub=Auto unpause in 252s\nconfirm=Team A|0|Team B|0\nbtn=Unpause|warn|pulse|#demo waiting\nbw=l\nmouse=on"}, {"waiting", "id=pause\ncolor=warn\nkind=Tech pause\ntitle=Team B paused\nsub=Auto unpause in 245s\nconfirm=Team A|1|Team B|0\nbtn=Waiting for Team B|ghost|off|\nbw=xl"}, {"timeout", "id=tac\nkind=Timeout\ntitle=Team A timeout"}, @@ -1615,7 +1912,12 @@ void MenuRefresh(int slot) { if (HasMenu(slot)) { const MenuEntry top = g_menus[slot].back(); g_drawingMenu = true; - IfScreen(slot, top.spec.c_str(), top.onClick, top.user); + // A menu with buttons is the list on the left (v4, Hold E): W S choose, holding E picks, a close + // row last. One with no buttons (retakes' "Retake site B!" banner) keeps its own place: as a list + // it was a bare Close row (2026-11-24). + const bool list = top.spec.find("btn=") != std::string::npos; + const std::string spec = list ? top.spec + "\nwhere=left" : top.spec; + IfScreen(slot, spec.c_str(), top.onClick, top.user); g_drawingMenu = false; return; } @@ -1632,6 +1934,7 @@ void MenuRefresh(int slot) { int IfMenu(int slot, const char* ownerIn, const char* specIn, ru_hud_click_fn onClick, void* user) { if (!ownerIn || !*ownerIn) return 0; + if (SlotOff(slot) && specIn && *specIn) return 0; // HUD off for this player: the caller uses chat const std::string owner = ownerIn, spec = specIn ? specIn : ""; std::vector slots; if (slot == RU_HUD_ALL) { @@ -1703,6 +2006,9 @@ struct HoldSlot { std::string label; // what #ui_hold says now ("" = hidden) std::string button; // the card button that has `holdable` ("" = none) bool holdClass = false; + uint64_t prev = 0; // last tick's buttons: W S move the menu row on the press, not while held + bool frozen = false; // we stopped the pawn moving while the menu panel is up (FreezeFor) + bool live = false; // `c-live` on the chip }; std::map g_hold; // The key the hold chip and buttons show. {g:csgo_key:k} in at_ui gives the value back as it is @@ -1768,6 +2074,7 @@ struct HoldTarget { std::string label; // the chip's text ("" when the button shows it) std::string action; // "#cmd ", a button id for ScreenClick, or "" for `.menu` std::string button; // the button that shows the hold ("" = the chip) + bool live = false; // the chip in green (a where=chip screen with color=live: Ready) }; bool HoldAction(int slot, HoldTarget* t) { @@ -1780,22 +2087,32 @@ bool HoldAction(int slot, HoldTarget* t) { } auto it = g_screens.find(slot); const bool card = it != g_screens.end() && it->second.shown && !it->second.dismissed && !DemoActive(slot); + // The chip above the logo (v4): a where=chip screen (Ready up: no card at all) or a card that asks + // for it with hold=1 (pause, votes: the card says what happened, its buttons are hidden). The chip + // names the first button (and a chip screen's count); holding E presses it. + const bool chipScreen = it != g_screens.end() && (it->second.cur.where == "chip" || it->second.cur.hold) && + it->second.cur.where != "left"; + if (card && chipScreen && !it->second.clicked && !it->second.cur.buttons.empty()) { + const Button& b = it->second.cur.buttons[0]; + if (b.state != "off" && !b.cmd.empty() && !b.label.empty()) { + t->label = b.label + (it->second.cur.counter.empty() ? "" : " " + it->second.cur.counter); + t->action = "#cmd " + b.cmd; + t->live = it->second.cur.color == "live"; + return true; + } + } + // The menu panel: holding E picks the chosen row (W S choose it); the row itself fills. + if (card && PanelOf(it->second.cur) == "ui_left" && !it->second.selId.empty() && !it->second.clicked) { + t->button = it->second.selId; + t->action = it->second.selId; + return true; + } if (HasMenu(slot)) { if (!card) return false; t->label = g_text.Tr(lang, "hud.hold_close"); t->action = PanelOf(it->second.cur) + "_close"; return true; } - // Only a card that asks for it (`hold=1`: Ready, Scoreboard): match.so draws its admin menu as a - // plain card too, and holding pressed its first button, Pause (2026-11-20). - if (card && it->second.cur.hold && !it->second.clicked && !it->second.cur.buttons.empty()) { - const Button& b = it->second.cur.buttons[0]; - if (b.state != "off" && !b.cmd.empty() && !b.label.empty()) { - t->button = PanelOf(it->second.cur) + "_b0"; - t->action = t->button; - return true; - } - } // No "hold for .menu": a chip on screen all the time, live rounds included, was too much // (Sivert, 2026-11-20). `.menu` is still typed. return false; @@ -1813,17 +2130,27 @@ void HoldShow(int slot, HoldSlot& hs, const HoldTarget& t, bool has, bool hold) IfSetClass(h, slot, "ui_hold", "on", chip.empty() ? 0 : 1); hs.label = chip; } + const bool live = has && t.live; + if (live != hs.live) { + IfSetClass(h, slot, "ui_hold", "c-live", live ? 1 : 0); + hs.live = live; + } const std::string button = has ? t.button : ""; if (button != hs.button) { + std::string panel; + int index = 0; if (!hs.button.empty()) { IfSetClass(h, slot, hs.button.c_str(), "hold", 0); - IfSetClass(h, slot, hs.button.c_str(), "holdable", 0); - IfSetClass(h, slot, hs.button.substr(0, hs.button.size() - 3).c_str(), "holdable", 0); // the panel + if (ParseButtonId(hs.button, &panel, &index) && panel != "ui_left") { + IfSetClass(h, slot, hs.button.c_str(), "holdable", 0); + IfSetClass(h, slot, panel.c_str(), "holdable", 0); + } } - if (!button.empty()) { + // Menu rows (ui_left) show the hold as their fill only: no key, no `holdable`. + if (!button.empty() && ParseButtonId(button, &panel, &index) && panel != "ui_left") { IfSetText(h, slot, (button + "_k").c_str(), "k", g_holdKey.c_str()); IfSetClass(h, slot, button.c_str(), "holdable", 1); - IfSetClass(h, slot, button.substr(0, button.size() - 3).c_str(), "holdable", 1); + IfSetClass(h, slot, panel.c_str(), "holdable", 1); } hs.button = button; hs.holdClass = false; @@ -1835,6 +2162,87 @@ void HoldShow(int slot, HoldSlot& hs, const HoldTarget& t, bool has, bool hold) } } +// ---- the menu panel holds the player still -------------------------------------------------- +// While ui_left is up W S choose rows, so in warmup (where players can walk) the pawn is held in +// place, the way CS2 plugins freeze players (MOVETYPE_OBSOLETE in m_MoveType and m_nActualMoveType, +// MOVETYPE_WALK to let go). Freeze time already holds players, and a live round is never frozen: +// a menu left open into a round only moves its row. +constexpr uint64_t kInForward = 1ull << 3; // W (IN_FORWARD) +constexpr uint64_t kInBack = 1ull << 4; // S (IN_BACK) +constexpr uint8_t kMoveObsolete = 1, kMoveWalk = 2; + +void* PawnOf(int slot) { + static int ctrlPawn = -2; + if (ctrlPawn == -2) ctrlPawn = g_api->schema_offset(g_api->self, "CCSPlayerController", "m_hPlayerPawn"); + if (ctrlPawn < 0) return nullptr; + void* ctrl = g_api->entity_by_index(g_api->self, slot + 1); + if (!ctrl) return nullptr; + uint32_t h = 0; + std::memcpy(&h, static_cast(ctrl) + ctrlPawn, sizeof(h)); + return g_api->entity_from_handle(g_api->self, h); +} + +// CCSGameRules::m_bWarmupPeriod through the cs_gamerules proxy (looked up once, checked each time). +bool InWarmup() { + static int proxyIndex = -1, rulesPtr = -2, warmup = -2; + if (rulesPtr == -2) { + rulesPtr = g_api->schema_offset(g_api->self, "CCSGameRulesProxy", "m_pGameRules"); + warmup = g_api->schema_offset(g_api->self, "CCSGameRules", "m_bWarmupPeriod"); + } + if (rulesPtr < 0 || warmup < 0) return false; + auto isProxy = [](int i) { + void* e = g_api->entity_by_index(g_api->self, i); + const char* cls = e ? g_api->entity_classname(g_api->self, e) : nullptr; + return cls && std::strcmp(cls, "cs_gamerules") == 0; + }; + if (proxyIndex < 0 || !isProxy(proxyIndex)) { + proxyIndex = -1; + for (int i = 65; i < 2048 && proxyIndex < 0; ++i) + if (isProxy(i)) proxyIndex = i; + if (proxyIndex < 0) return false; + } + void* proxy = g_api->entity_by_index(g_api->self, proxyIndex); + void* rules = nullptr; + std::memcpy(&rules, static_cast(proxy) + rulesPtr, sizeof(rules)); + return rules && *(static_cast(rules) + warmup) != 0; +} + +bool FreezeFor(int slot, bool on) { + static int moveType = -2, actual = -2; + if (moveType == -2) { + moveType = g_api->schema_offset(g_api->self, "CBaseEntity", "m_MoveType"); + actual = g_api->schema_offset(g_api->self, "CBaseEntity", "m_nActualMoveType"); + } + void* pawn = PawnOf(slot); + if (moveType < 0 || actual < 0 || !pawn) return false; + const uint8_t v = on ? kMoveObsolete : kMoveWalk; + *(static_cast(pawn) + moveType) = v; + *(static_cast(pawn) + actual) = v; + g_api->entity_mark_changed(g_api->self, pawn); + return true; +} + +// W S move the chosen row (on the press, wrapping); the pawn is held still in warmup. +void NavTick(int slot, HoldSlot& hs, bool gotButtons, uint64_t held) { + auto it = g_screens.find(slot); + const bool left = it != g_screens.end() && it->second.shown && !it->second.dismissed && + PanelOf(it->second.cur) == "ui_left" && !DemoActive(slot); + if (left && gotButtons) { + const uint64_t pressed = held & ~hs.prev; + int step = 0; + if (pressed & kInForward) --step; + if (pressed & kInBack) ++step; + if (step) { + it->second.sel += step; + NavDraw(slot, it->second); + hs.down = false; // a hold on the old row does not carry over + } + } + hs.prev = gotButtons ? held : 0; + const bool freeze = left && InWarmup(); + if (freeze != hs.frozen && FreezeFor(slot, freeze)) hs.frozen = freeze; +} + void HoldTick() { for (int slot = 0; slot <= 63; ++slot) { ru_player p{}; @@ -1845,11 +2253,13 @@ void HoldTick() { continue; } HoldSlot& hs = g_hold[slot]; - HoldTarget t; - const bool has = HoldAction(slot, &t); uint64_t held = 0; bool defusing = false; - const bool use = HeldButtons(slot, &held, &defusing) && (held & kInUse) && !defusing; + const bool got = HeldButtons(slot, &held, &defusing); + NavTick(slot, hs, got, held); + HoldTarget t; + const bool has = HoldAction(slot, &t); + const bool use = got && (held & kInUse) && !defusing; if (!use) { hs.down = false; hs.fired = false; @@ -1883,6 +2293,11 @@ void HoldTick() { void OnMenuChat(void*, const ru_command_ctx* ctx) { if (ctx->slot < 0) return; + if (SlotOff(ctx->slot)) { + // HUD off for this player: the commands in chat instead of a menu. + g_api->chat_to_slot(g_api->self, ctx->slot, g_text.Tr(readyup::i18n::LanguageOf(g_api, ctx->slot), "menu.chat_help").c_str()); + return; + } for (const auto& p : g_providers) { if (p.active(p.user, ctx->slot)) { p.open(p.user, ctx->slot, ctx->steamid64); @@ -1892,6 +2307,17 @@ void OnMenuChat(void*, const ru_command_ctx* ctx) { g_api->chat_to_slot(g_api->self, ctx->slot, g_text.Tr(readyup::i18n::LanguageOf(g_api, ctx->slot), "menu.none").c_str()); } +// `.hud` (toggle), `.hud off`, `.hud on`: the custom HUD for this player. Off: Ready Up uses the +// chat and the centre panel for them (saved; the platform's player setting sets the same). +void OnHudChat(void*, const ru_command_ctx* ctx) { + if (ctx->slot < 0 || !ctx->steamid64) return; + const std::string a = ctx->argc > 1 && ctx->argv[1] ? ctx->argv[1] : ""; + const bool off = a == "off" || a == "0" ? true : a == "on" || a == "1" ? false : !g_hudOff.count(ctx->steamid64); + SetPlayerOff(ctx->steamid64, off); + g_api->chat_to_slot(g_api->self, ctx->slot, + g_text.Tr(readyup::i18n::LanguageOf(g_api, ctx->slot), off ? "hud.now_off" : "hud.now_on").c_str()); +} + void OnDemoClick(void*, int slot, const char* command) { const std::string c = command ? command : ""; if (c.rfind("#demo ", 0) == 0) { @@ -2137,11 +2563,14 @@ READYUP_PLUGIN_EXPORT int readyup_plugin_load(const ru_api* api, uint32_t core_a g_pauseUntil = -1; g_repushAfterPause = false; g_scale = 75; + HudOffLoad(); + g_slotOff.reset(); if (RU_API_HAS(api, config_get)) { char buf[16] = {}; if (api->config_get(api->self, "scale", buf, sizeof(buf)) > 0 && ParseScale(buf) > 0) g_scale = ParseScale(buf); } ApplyScale(); + SetTeamLogos(); api->on_tick(api->self, &OnTick, nullptr); if (!api->subscribe_game_event(api->self, "round_prestart", &OnRoundPrestart, nullptr)) ru_logf(api, RU_LOG_WARN, "round_prestart not available: a round restart may crash the server while a HUD is shown"); @@ -2159,6 +2588,7 @@ READYUP_PLUGIN_EXPORT int readyup_plugin_load(const ru_api* api, uint32_t core_a if (RU_API_HAS(api, dev_mode) && api->dev_mode && api->dev_mode(api->self)) api->register_chat_command(api->self, ".dev", &OnDevChat, nullptr); api->register_chat_command(api->self, ".menu", &OnMenuChat, nullptr); + api->register_chat_command(api->self, ".hud", &OnHudChat, nullptr); if (RU_API_HAS(api, filter_client_command)) { api->filter_client_command(api->self, "open_buymenu", &OnBuyMenu, nullptr); api->filter_client_command(api->self, "close_buymenu", &OnBuyMenu, nullptr); diff --git a/plugins/hud/hud_screen.cpp b/plugins/hud/hud_screen.cpp index 3f0155f3..3f15c408 100644 --- a/plugins/hud/hud_screen.cpp +++ b/plugins/hud/hud_screen.cpp @@ -55,7 +55,8 @@ Screen ParseScreen(const std::string& spec) { if (eq == std::string::npos) continue; const std::string k = line.substr(0, eq), v = line.substr(eq + 1); if (k == "id") s.id = v; - else if (k == "where") s.where = v == "card" ? "card" : "mid"; + else if (k == "closerow") s.noCloseRow = v == "0"; + else if (k == "where") s.where = v == "card" ? "card" : v == "left" ? "left" : v == "chip" ? "chip" : "mid"; else if (k == "color") s.color = v; else if (k == "kind") s.kind = v; else if (k == "title") s.title = v; @@ -89,7 +90,10 @@ Screen ParseScreen(const std::string& spec) { } } else if (k == "cmd") { const auto p = SplitBar(v); - if (s.cmds.size() < 3) s.cmds.emplace_back(At(p, 0), At(p, 1)); + if (s.cmds.size() < 3) { + s.cmds.emplace_back(At(p, 0), At(p, 1)); + s.cmdAfter.push_back(At(p, 2)); // cmd=label|.cmd|after + } } else if (k == "btn") { const auto p = SplitBar(v); if (s.buttons.size() < static_cast(kMaxButtons)) s.buttons.push_back(Button{At(p, 0), At(p, 1), At(p, 2), At(p, 3), At(p, 4)}); @@ -212,6 +216,10 @@ std::vector RenderScreen(const Screen& s, const std::string& p) { const std::string k = p + "_k" + std::to_string(i); text(k + "_l", i < cmds.size() ? cmds[i].first : std::string()); text(k + "_c", i < cmds.size() ? cmds[i].second : std::string()); + const std::string after = i < s.cmdAfter.size() ? s.cmdAfter[i] : std::string(); + text(k + "_a", after); // addon version 7 on + cls(k + "_l", "gone", i < cmds.size() && cmds[i].first.empty()); + cls(k + "_a", "gone", after.empty()); cls(k, "gone", i >= cmds.size()); } @@ -240,7 +248,7 @@ std::vector RenderScreen(const Screen& s, const std::string& p) { } bool ParseButtonId(const std::string& id, std::string* panel, int* index) { - for (const char* p : {"ui_card", "ui_mid"}) { + for (const char* p : {"ui_card", "ui_mid", "ui_left"}) { const std::string pre = std::string(p) + "_"; if (id.compare(0, pre.size(), pre) != 0) continue; const std::string rest = id.substr(pre.size()); @@ -267,6 +275,7 @@ std::string EnterOf(const Screen& s, const std::string& p) { if (want == f) return want; const bool decision = s.mouse == Mouse::On && !s.buttons.empty() && !s.hasClose; if (s.mini) return "fx-pop"; + if (p == "ui_left") return "fx-slide-left"; // the menu list comes in from the left if (p == "ui_card") return s.color == "ban" ? "fx-alert" : "fx-slide"; return decision ? "fx-flip" : s.color == "ban" ? "fx-alert" : "fx-open"; } diff --git a/plugins/hud/hud_screen.h b/plugins/hud/hud_screen.h index d8faa4e7..5dcc6659 100644 --- a/plugins/hud/hud_screen.h +++ b/plugins/hud/hud_screen.h @@ -4,7 +4,10 @@ // // id=pick the screen's identity: a new id plays the leave / enter animation, // the same id updates in place (countdowns, ready dots) -// where=mid card (right, above the weapons) | mid (centre of the lower half) +// where=mid card (right, above the weapons) | mid (centre of the lower half) | +// left (menus: a list, rows chosen with W S, held with E; a close row) | +// chip (no card: the hold chip above the AT logo says the first +// button and the counter, holding E presses it; color=live: green) // color=live acc (default) | live | warn | ban | muted | ct | t // kind=You won the knife small coloured label above the title // title=Which side do you want? @@ -69,6 +72,7 @@ struct Screen { std::string vsName[2], vsSide[2]; // vsSide: "ct", "t" or empty bool confirmReady[2] = {false, false}; std::vector> cmds; // label, command + std::vector cmdAfter; // text after cmds[i]'s box ("Type [.menu] to pause ...") std::vector> lines; // label, value bool mini = false; std::string fx; // enter; empty: picked from the screen (RenderScreen) @@ -83,6 +87,7 @@ struct Screen { Mouse mouse = Mouse::Off; bool chips = false; bool hold = false; // `hold=1`: holding Use presses the first button (hud.so HoldAction) + bool noCloseRow = false; // `closerow=0`: a where=left list without its close row (a choice that must be made) bool empty() const { return title.empty() && kind.empty(); } }; diff --git a/plugins/hud/locales/bg.json b/plugins/hud/locales/bg.json index 47f1529b..8c3c4503 100644 --- a/plugins/hud/locales/bg.json +++ b/plugins/hud/locales/bg.json @@ -1,6 +1,10 @@ { "menu.none": "В момента на този сървър няма меню.", + "menu.chat_help": "Команди: .r готов · .p тех. пауза · .tac таймаут · .gg предаване · .admin админ · .hud HUD", + "hud.now_off": "HUD изключен: Ready Up ви пише в чата. .hud го включва отново.", + "hud.now_on": "HUD включен.", "hud.outdated": "HUD-ът е остарял. В платформата натисни ? и избери HUD.", "hud.hold_menu": "Меню", - "hud.hold_close": "Затвори" + "hud.hold_close": "Затвори", + "hud.menu_hint": "W ↑  S ↓  Задръж E: избор" } diff --git a/plugins/hud/locales/cs.json b/plugins/hud/locales/cs.json index 20c88e85..db840d1c 100644 --- a/plugins/hud/locales/cs.json +++ b/plugins/hud/locales/cs.json @@ -1,6 +1,10 @@ { "menu.none": "Na tomto serveru teď není žádné menu.", + "menu.chat_help": "Příkazy: .r připraven · .p tech. pauza · .tac timeout · .gg vzdát · .admin admin · .hud HUD", + "hud.now_off": "HUD vypnut: Ready Up vám píše do chatu. .hud ho zase zapne.", + "hud.now_on": "HUD zapnut.", "hud.outdated": "HUD je zastaralý. Na platformě klikni na ? a vyber HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Zavřít" + "hud.hold_close": "Zavřít", + "hud.menu_hint": "W ↑  S ↓  Podrž E: vyber" } diff --git a/plugins/hud/locales/da.json b/plugins/hud/locales/da.json index 8df1c581..f5211779 100644 --- a/plugins/hud/locales/da.json +++ b/plugins/hud/locales/da.json @@ -1,6 +1,10 @@ { "menu.none": "Der er ingen menu på denne server lige nu.", + "menu.chat_help": "Kommandoer: .r klar · .p teknisk pause · .tac timeout · .gg giv op · .admin tilkald admin · .hud HUD", + "hud.now_off": "HUD slået fra: Ready Up skriver til dig i chatten. .hud slår det til igen.", + "hud.now_on": "HUD slået til.", "hud.outdated": "HUD'en er forældet. Klik på ? på platformen, og vælg HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Luk" + "hud.hold_close": "Luk", + "hud.menu_hint": "W ↑  S ↓  Hold E: vælg" } diff --git a/plugins/hud/locales/de.json b/plugins/hud/locales/de.json index 431bb5c2..0c89ccc4 100644 --- a/plugins/hud/locales/de.json +++ b/plugins/hud/locales/de.json @@ -1,6 +1,10 @@ { "menu.none": "Gerade gibt es auf diesem Server kein Menü.", + "menu.chat_help": "Befehle: .r bereit · .p Technikpause · .tac Timeout · .gg aufgeben · .admin Admin rufen · .hud HUD", + "hud.now_off": "HUD aus: Ready Up schreibt dir im Chat. .hud schaltet es wieder ein.", + "hud.now_on": "HUD an.", "hud.outdated": "HUD veraltet. Klicke auf der Plattform auf ? und wähle HUD.", "hud.hold_menu": "Menü", - "hud.hold_close": "Schließen" + "hud.hold_close": "Schließen", + "hud.menu_hint": "W ↑  S ↓  E halten: wählen" } diff --git a/plugins/hud/locales/el.json b/plugins/hud/locales/el.json index 48798857..16c0ee2f 100644 --- a/plugins/hud/locales/el.json +++ b/plugins/hud/locales/el.json @@ -1,6 +1,10 @@ { "menu.none": "Δεν υπάρχει μενού σε αυτόν τον server αυτή τη στιγμή.", + "menu.chat_help": "Εντολές: .r έτοιμος · .p τεχνική παύση · .tac timeout · .gg παραίτηση · .admin admin · .hud HUD", + "hud.now_off": "HUD κλειστό: το Ready Up σας γράφει στο chat. Το .hud το ανοίγει ξανά.", + "hud.now_on": "HUD ανοιχτό.", "hud.outdated": "Το HUD δεν είναι ενημερωμένο. Στην πλατφόρμα, πάτησε ? και διάλεξε HUD.", "hud.hold_menu": "Μενού", - "hud.hold_close": "Κλείσιμο" + "hud.hold_close": "Κλείσιμο", + "hud.menu_hint": "W ↑  S ↓  Κράτα E: επιλογή" } diff --git a/plugins/hud/locales/en.json b/plugins/hud/locales/en.json index 5601744e..4868eb33 100644 --- a/plugins/hud/locales/en.json +++ b/plugins/hud/locales/en.json @@ -1,6 +1,10 @@ { "menu.none": "No menu on this server right now.", + "menu.chat_help": "Commands: .r ready · .p tech pause · .tac timeout · .gg give up · .admin call an admin · .hud HUD on", + "hud.now_off": "HUD off: Ready Up uses chat for you. .hud turns it back on.", + "hud.now_on": "HUD on.", "hud.outdated": "HUD out of date. On the platform, click ? and choose HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Close" + "hud.hold_close": "Close", + "hud.menu_hint": "W ↑  S ↓  Hold E: pick" } diff --git a/plugins/hud/locales/es-419.json b/plugins/hud/locales/es-419.json index 92ef9d2b..72cf082f 100644 --- a/plugins/hud/locales/es-419.json +++ b/plugins/hud/locales/es-419.json @@ -1,6 +1,10 @@ { "menu.none": "Ahora mismo no hay menú en este servidor.", + "menu.chat_help": "Comandos: .r listo · .p pausa técnica · .tac tiempo muerto · .gg rendirse · .admin llamar admin · .hud HUD", + "hud.now_off": "HUD desactivado: Ready Up te escribe en el chat. .hud lo vuelve a activar.", + "hud.now_on": "HUD activado.", "hud.outdated": "HUD desactualizado. En la plataforma, haz clic en ? y elige HUD.", "hud.hold_menu": "Menú", - "hud.hold_close": "Cerrar" + "hud.hold_close": "Cerrar", + "hud.menu_hint": "W ↑  S ↓  Mantén E: elegir" } diff --git a/plugins/hud/locales/es.json b/plugins/hud/locales/es.json index 92ef9d2b..72cf082f 100644 --- a/plugins/hud/locales/es.json +++ b/plugins/hud/locales/es.json @@ -1,6 +1,10 @@ { "menu.none": "Ahora mismo no hay menú en este servidor.", + "menu.chat_help": "Comandos: .r listo · .p pausa técnica · .tac tiempo muerto · .gg rendirse · .admin llamar admin · .hud HUD", + "hud.now_off": "HUD desactivado: Ready Up te escribe en el chat. .hud lo vuelve a activar.", + "hud.now_on": "HUD activado.", "hud.outdated": "HUD desactualizado. En la plataforma, haz clic en ? y elige HUD.", "hud.hold_menu": "Menú", - "hud.hold_close": "Cerrar" + "hud.hold_close": "Cerrar", + "hud.menu_hint": "W ↑  S ↓  Mantén E: elegir" } diff --git a/plugins/hud/locales/fi.json b/plugins/hud/locales/fi.json index 3ab1c691..7e00cc8c 100644 --- a/plugins/hud/locales/fi.json +++ b/plugins/hud/locales/fi.json @@ -1,6 +1,10 @@ { "menu.none": "Tällä palvelimella ei ole nyt valikkoa.", + "menu.chat_help": "Komennot: .r valmis · .p tekninen tauko · .tac aikalisä · .gg luovuta · .admin kutsu admin · .hud HUD", + "hud.now_off": "HUD pois: Ready Up kirjoittaa sinulle chattiin. .hud laittaa sen takaisin.", + "hud.now_on": "HUD päällä.", "hud.outdated": "HUD on vanhentunut. Napsauta alustalla ? ja valitse HUD.", "hud.hold_menu": "Valikko", - "hud.hold_close": "Sulje" + "hud.hold_close": "Sulje", + "hud.menu_hint": "W ↑  S ↓  Pidä E: valitse" } diff --git a/plugins/hud/locales/fr.json b/plugins/hud/locales/fr.json index c40d9be0..a2346d69 100644 --- a/plugins/hud/locales/fr.json +++ b/plugins/hud/locales/fr.json @@ -1,6 +1,10 @@ { "menu.none": "Pas de menu sur ce serveur pour le moment.", + "menu.chat_help": "Commandes : .r prêt · .p pause technique · .tac temps mort · .gg abandonner · .admin appeler un admin · .hud HUD", + "hud.now_off": "HUD désactivé : Ready Up vous écrit dans le chat. .hud le réactive.", + "hud.now_on": "HUD activé.", "hud.outdated": "HUD obsolète. Sur la plateforme, clique sur ? puis choisis HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Fermer" + "hud.hold_close": "Fermer", + "hud.menu_hint": "W ↑  S ↓  Maintenir E : choisir" } diff --git a/plugins/hud/locales/hu.json b/plugins/hud/locales/hu.json index e22067a0..80a635a7 100644 --- a/plugins/hud/locales/hu.json +++ b/plugins/hud/locales/hu.json @@ -1,6 +1,10 @@ { "menu.none": "Most nincs menü ezen a szerveren.", + "menu.chat_help": "Parancsok: .r kész · .p technikai szünet · .tac időkérés · .gg feladás · .admin admin hívása · .hud HUD", + "hud.now_off": "HUD kikapcsolva: a Ready Up a chatben ír neked. A .hud visszakapcsolja.", + "hud.now_on": "HUD bekapcsolva.", "hud.outdated": "A HUD elavult. A platformon kattints a ? gombra, és válaszd a HUD-ot.", "hud.hold_menu": "Menü", - "hud.hold_close": "Bezárás" + "hud.hold_close": "Bezárás", + "hud.menu_hint": "W ↑  S ↓  E nyomva: választás" } diff --git a/plugins/hud/locales/id.json b/plugins/hud/locales/id.json index 654ed5f7..99735b0c 100644 --- a/plugins/hud/locales/id.json +++ b/plugins/hud/locales/id.json @@ -1,6 +1,10 @@ { "menu.none": "Server ini sedang tidak punya menu.", + "menu.chat_help": "Perintah: .r siap · .p jeda teknis · .tac timeout · .gg menyerah · .admin panggil admin · .hud HUD", + "hud.now_off": "HUD mati: Ready Up memakai chat untukmu. .hud menyalakannya lagi.", + "hud.now_on": "HUD nyala.", "hud.outdated": "HUD sudah usang. Di platform, klik ? lalu pilih HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Tutup" + "hud.hold_close": "Tutup", + "hud.menu_hint": "W ↑  S ↓  Tahan E: pilih" } diff --git a/plugins/hud/locales/it.json b/plugins/hud/locales/it.json index b2379339..66bc7a50 100644 --- a/plugins/hud/locales/it.json +++ b/plugins/hud/locales/it.json @@ -1,6 +1,10 @@ { "menu.none": "Al momento non c'è nessun menu su questo server.", + "menu.chat_help": "Comandi: .r pronto · .p pausa tecnica · .tac timeout · .gg arrendersi · .admin chiama un admin · .hud HUD", + "hud.now_off": "HUD disattivato: Ready Up ti scrive in chat. .hud lo riattiva.", + "hud.now_on": "HUD attivato.", "hud.outdated": "HUD non aggiornato. Sulla piattaforma, clicca su ? e scegli HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Chiudi" + "hud.hold_close": "Chiudi", + "hud.menu_hint": "W ↑  S ↓  Tieni E: scegli" } diff --git a/plugins/hud/locales/ja.json b/plugins/hud/locales/ja.json index 102d07ac..f7d89903 100644 --- a/plugins/hud/locales/ja.json +++ b/plugins/hud/locales/ja.json @@ -1,6 +1,10 @@ { "menu.none": "このサーバーには今メニューがありません。", + "menu.chat_help": "コマンド: .r 準備完了 · .p 技術的ポーズ · .tac タイムアウト · .gg 降参 · .admin 管理者を呼ぶ · .hud HUD", + "hud.now_off": "HUDオフ: Ready Upはチャットでお知らせします。.hudで元に戻せます。", + "hud.now_on": "HUDオン。", "hud.outdated": "HUDが古くなっています。プラットフォームで ? をクリックし、HUD を選んでください。", "hud.hold_menu": "メニュー", - "hud.hold_close": "閉じる" + "hud.hold_close": "閉じる", + "hud.menu_hint": "W ↑  S ↓  E 長押し: 決定" } diff --git a/plugins/hud/locales/ko.json b/plugins/hud/locales/ko.json index 92cb21ce..b620901a 100644 --- a/plugins/hud/locales/ko.json +++ b/plugins/hud/locales/ko.json @@ -1,6 +1,10 @@ { "menu.none": "지금 이 서버에는 메뉴가 없습니다.", + "menu.chat_help": "명령어: .r 준비 · .p 기술적 일시정지 · .tac 타임아웃 · .gg 항복 · .admin 관리자 호출 · .hud HUD", + "hud.now_off": "HUD 끔: Ready Up이 채팅으로 알려 드립니다. .hud로 다시 켭니다.", + "hud.now_on": "HUD 켬.", "hud.outdated": "HUD가 오래되었습니다. 플랫폼에서 ? 를 누르고 HUD를 선택하세요.", "hud.hold_menu": "메뉴", - "hud.hold_close": "닫기" + "hud.hold_close": "닫기", + "hud.menu_hint": "W ↑  S ↓  E 길게: 선택" } diff --git a/plugins/hud/locales/nb.json b/plugins/hud/locales/nb.json index 6d499750..bc5ee7f9 100644 --- a/plugins/hud/locales/nb.json +++ b/plugins/hud/locales/nb.json @@ -1,6 +1,10 @@ { "menu.none": "Det er ingen meny på denne serveren akkurat nå.", + "menu.chat_help": "Kommandoer: .r klar · .p teknisk pause · .tac timeout · .gg gi opp · .admin tilkall admin · .hud HUD", + "hud.now_off": "HUD av: Ready Up skriver til deg i chatten. .hud slår det på igjen.", + "hud.now_on": "HUD på.", "hud.outdated": "HUD-en er utdatert. Klikk på ? på plattformen og velg HUD.", "hud.hold_menu": "Meny", - "hud.hold_close": "Lukk" + "hud.hold_close": "Lukk", + "hud.menu_hint": "W ↑  S ↓  Hold E: velg" } diff --git a/plugins/hud/locales/nl.json b/plugins/hud/locales/nl.json index 92b3ef89..adbb4dd4 100644 --- a/plugins/hud/locales/nl.json +++ b/plugins/hud/locales/nl.json @@ -1,6 +1,10 @@ { "menu.none": "Er is nu geen menu op deze server.", + "menu.chat_help": "Commando's: .r klaar · .p technische pauze · .tac time-out · .gg opgeven · .admin admin roepen · .hud HUD", + "hud.now_off": "HUD uit: Ready Up gebruikt de chat voor jou. .hud zet hem weer aan.", + "hud.now_on": "HUD aan.", "hud.outdated": "HUD verouderd. Klik op het platform op ? en kies HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Sluiten" + "hud.hold_close": "Sluiten", + "hud.menu_hint": "W ↑  S ↓  E ingedrukt: kiezen" } diff --git a/plugins/hud/locales/pl.json b/plugins/hud/locales/pl.json index d132e997..5d5ef63d 100644 --- a/plugins/hud/locales/pl.json +++ b/plugins/hud/locales/pl.json @@ -1,6 +1,10 @@ { "menu.none": "Na tym serwerze nie ma teraz menu.", + "menu.chat_help": "Komendy: .r gotowy · .p pauza techniczna · .tac przerwa · .gg poddanie · .admin wezwij admina · .hud HUD", + "hud.now_off": "HUD wyłączony: Ready Up pisze do ciebie na czacie. .hud włącza go ponownie.", + "hud.now_on": "HUD włączony.", "hud.outdated": "HUD jest nieaktualny. Na platformie kliknij ? i wybierz HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Zamknij" + "hud.hold_close": "Zamknij", + "hud.menu_hint": "W ↑  S ↓  Przytrzymaj E: wybierz" } diff --git a/plugins/hud/locales/pt-BR.json b/plugins/hud/locales/pt-BR.json index d9c822d8..24dfcd42 100644 --- a/plugins/hud/locales/pt-BR.json +++ b/plugins/hud/locales/pt-BR.json @@ -1,6 +1,10 @@ { "menu.none": "Não há menu neste servidor agora.", + "menu.chat_help": "Comandos: .r pronto · .p pausa técnica · .tac tempo · .gg desistir · .admin chamar admin · .hud HUD", + "hud.now_off": "HUD desligado: o Ready Up fala com você no chat. .hud liga de novo.", + "hud.now_on": "HUD ligado.", "hud.outdated": "HUD desatualizado. Na plataforma, clique em ? e escolha HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Fechar" + "hud.hold_close": "Fechar", + "hud.menu_hint": "W ↑  S ↓  Segure E: escolher" } diff --git a/plugins/hud/locales/pt-PT.json b/plugins/hud/locales/pt-PT.json index 2f7e7cc6..27b669b7 100644 --- a/plugins/hud/locales/pt-PT.json +++ b/plugins/hud/locales/pt-PT.json @@ -1,6 +1,10 @@ { "menu.none": "Não há menu neste servidor neste momento.", + "menu.chat_help": "Comandos: .r pronto · .p pausa técnica · .tac tempo · .gg desistir · .admin chamar admin · .hud HUD", + "hud.now_off": "HUD desligado: o Ready Up fala contigo no chat. .hud volta a ligá-lo.", + "hud.now_on": "HUD ligado.", "hud.outdated": "HUD desatualizado. Na plataforma, clica em ? e escolhe HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Fechar" + "hud.hold_close": "Fechar", + "hud.menu_hint": "W ↑  S ↓  Mantém E: escolher" } diff --git a/plugins/hud/locales/ro.json b/plugins/hud/locales/ro.json index cde2995c..3a796495 100644 --- a/plugins/hud/locales/ro.json +++ b/plugins/hud/locales/ro.json @@ -1,6 +1,10 @@ { "menu.none": "Acum nu există meniu pe acest server.", + "menu.chat_help": "Comenzi: .r gata · .p pauză tehnică · .tac timeout · .gg abandon · .admin cheamă un admin · .hud HUD", + "hud.now_off": "HUD oprit: Ready Up îți scrie în chat. .hud îl pornește din nou.", + "hud.now_on": "HUD pornit.", "hud.outdated": "HUD-ul nu este actualizat. Pe platformă, apasă pe ? și alege HUD.", "hud.hold_menu": "Meniu", - "hud.hold_close": "Închide" + "hud.hold_close": "Închide", + "hud.menu_hint": "W ↑  S ↓  Ține E: alege" } diff --git a/plugins/hud/locales/ru.json b/plugins/hud/locales/ru.json index f291693a..68c4215b 100644 --- a/plugins/hud/locales/ru.json +++ b/plugins/hud/locales/ru.json @@ -1,6 +1,10 @@ { "menu.none": "Сейчас на этом сервере нет меню.", + "menu.chat_help": "Команды: .r готов · .p техпауза · .tac таймаут · .gg сдаться · .admin позвать админа · .hud HUD", + "hud.now_off": "HUD выключен: Ready Up пишет вам в чат. .hud включает его снова.", + "hud.now_on": "HUD включён.", "hud.outdated": "HUD устарел. На платформе нажмите ? и выберите HUD.", "hud.hold_menu": "Меню", - "hud.hold_close": "Закрыть" + "hud.hold_close": "Закрыть", + "hud.menu_hint": "W ↑  S ↓  Удерживай E: подтвердить" } diff --git a/plugins/hud/locales/sv.json b/plugins/hud/locales/sv.json index a9fc290b..35920fa3 100644 --- a/plugins/hud/locales/sv.json +++ b/plugins/hud/locales/sv.json @@ -1,6 +1,10 @@ { "menu.none": "Det finns ingen meny på den här servern just nu.", + "menu.chat_help": "Kommandon: .r redo · .p teknisk paus · .tac timeout · .gg ge upp · .admin kalla på admin · .hud HUD", + "hud.now_off": "HUD av: Ready Up skriver till dig i chatten. .hud slår på den igen.", + "hud.now_on": "HUD på.", "hud.outdated": "HUD:en är inaktuell. Klicka på ? på plattformen och välj HUD.", "hud.hold_menu": "Meny", - "hud.hold_close": "Stäng" + "hud.hold_close": "Stäng", + "hud.menu_hint": "W ↑  S ↓  Håll E: välj" } diff --git a/plugins/hud/locales/th.json b/plugins/hud/locales/th.json index a42f229b..b38e3f37 100644 --- a/plugins/hud/locales/th.json +++ b/plugins/hud/locales/th.json @@ -1,6 +1,10 @@ { "menu.none": "ตอนนี้เซิร์ฟเวอร์นี้ไม่มีเมนู", + "menu.chat_help": "คำสั่ง: .r พร้อม · .p หยุดเทคนิค · .tac ไทม์เอาต์ · .gg ยอมแพ้ · .admin เรียกแอดมิน · .hud HUD", + "hud.now_off": "ปิด HUD: Ready Up จะแจ้งในแชท .hud เพื่อเปิดอีกครั้ง", + "hud.now_on": "เปิด HUD", "hud.outdated": "HUD ไม่เป็นปัจจุบัน บนแพลตฟอร์ม คลิก ? แล้วเลือก HUD", "hud.hold_menu": "เมนู", - "hud.hold_close": "ปิด" + "hud.hold_close": "ปิด", + "hud.menu_hint": "W ↑  S ↓  กด E ค้าง: เลือก" } diff --git a/plugins/hud/locales/tr.json b/plugins/hud/locales/tr.json index 8eb1fe69..21fa5a45 100644 --- a/plugins/hud/locales/tr.json +++ b/plugins/hud/locales/tr.json @@ -1,6 +1,10 @@ { "menu.none": "Şu anda bu sunucuda menü yok.", + "menu.chat_help": "Komutlar: .r hazır · .p teknik mola · .tac mola · .gg pes et · .admin admin çağır · .hud HUD", + "hud.now_off": "HUD kapalı: Ready Up sana sohbetten yazar. .hud tekrar açar.", + "hud.now_on": "HUD açık.", "hud.outdated": "HUD güncel değil. Platformda ? simgesine tıkla ve HUD'u seç.", "hud.hold_menu": "Menü", - "hud.hold_close": "Kapat" + "hud.hold_close": "Kapat", + "hud.menu_hint": "W ↑  S ↓  E basılı tut: seç" } diff --git a/plugins/hud/locales/uk.json b/plugins/hud/locales/uk.json index 31fd1352..580f7af5 100644 --- a/plugins/hud/locales/uk.json +++ b/plugins/hud/locales/uk.json @@ -1,6 +1,10 @@ { "menu.none": "Зараз на цьому сервері немає меню.", + "menu.chat_help": "Команди: .r готовий · .p техпауза · .tac таймаут · .gg здатися · .admin покликати адміна · .hud HUD", + "hud.now_off": "HUD вимкнено: Ready Up пише вам у чат. .hud вмикає його знову.", + "hud.now_on": "HUD увімкнено.", "hud.outdated": "HUD застарів. На платформі натисніть ? і виберіть HUD.", "hud.hold_menu": "Меню", - "hud.hold_close": "Закрити" + "hud.hold_close": "Закрити", + "hud.menu_hint": "W ↑  S ↓  Утримуй E: підтвердити" } diff --git a/plugins/hud/locales/vi.json b/plugins/hud/locales/vi.json index 704d799c..8333ca80 100644 --- a/plugins/hud/locales/vi.json +++ b/plugins/hud/locales/vi.json @@ -1,6 +1,10 @@ { "menu.none": "Hiện máy chủ này không có menu.", + "menu.chat_help": "Lệnh: .r sẵn sàng · .p tạm dừng kỹ thuật · .tac hội ý · .gg đầu hàng · .admin gọi admin · .hud HUD", + "hud.now_off": "Tắt HUD: Ready Up sẽ báo bạn qua chat. .hud để bật lại.", + "hud.now_on": "Bật HUD.", "hud.outdated": "HUD đã cũ. Trên nền tảng, nhấn ? rồi chọn HUD.", "hud.hold_menu": "Menu", - "hud.hold_close": "Đóng" + "hud.hold_close": "Đóng", + "hud.menu_hint": "W ↑  S ↓  Giữ E: chọn" } diff --git a/plugins/hud/locales/zh-CN.json b/plugins/hud/locales/zh-CN.json index d8835c66..f916b658 100644 --- a/plugins/hud/locales/zh-CN.json +++ b/plugins/hud/locales/zh-CN.json @@ -1,6 +1,10 @@ { "menu.none": "此服务器目前没有菜单。", + "menu.chat_help": "指令:.r 准备 · .p 技术暂停 · .tac 暂停 · .gg 认输 · .admin 呼叫管理员 · .hud HUD", + "hud.now_off": "HUD 已关闭:Ready Up 会在聊天中通知你。输入 .hud 重新开启。", + "hud.now_on": "HUD 已开启。", "hud.outdated": "HUD 已过期。请在平台上点击 ? 并选择 HUD。", "hud.hold_menu": "菜单", - "hud.hold_close": "关闭" + "hud.hold_close": "关闭", + "hud.menu_hint": "W ↑  S ↓  长按 E:选择" } diff --git a/plugins/hud/locales/zh-TW.json b/plugins/hud/locales/zh-TW.json index 5454a3e4..44ebb2a5 100644 --- a/plugins/hud/locales/zh-TW.json +++ b/plugins/hud/locales/zh-TW.json @@ -1,6 +1,10 @@ { "menu.none": "此伺服器目前沒有選單。", + "menu.chat_help": "指令:.r 準備 · .p 技術暫停 · .tac 暫停 · .gg 認輸 · .admin 呼叫管理員 · .hud HUD", + "hud.now_off": "HUD 已關閉:Ready Up 會在聊天中通知你。輸入 .hud 重新開啟。", + "hud.now_on": "HUD 已開啟。", "hud.outdated": "HUD 已過期。請在平台上點擊 ? 並選擇 HUD。", "hud.hold_menu": "選單", - "hud.hold_close": "關閉" + "hud.hold_close": "關閉", + "hud.menu_hint": "W ↑  S ↓  長按 E:選擇" } diff --git a/plugins/hud/needs.json b/plugins/hud/needs.json index 113a0303..75229bd8 100644 --- a/plugins/hud/needs.json +++ b/plugins/hud/needs.json @@ -48,8 +48,13 @@ "HUDPanelDialogVariableString_t.m_bIsSet" ], "schema_optional": [ + "CBaseEntity.m_MoveType", + "CBaseEntity.m_nActualMoveType", "CCSCustomHudLayout.m_bObservable", - "CCSCustomHudLayoutState.m_bInputCaptureEnabled" + "CCSCustomHudLayoutState.m_bInputCaptureEnabled", + "CCSGameRules.m_bWarmupPeriod", + "CCSGameRulesProxy.m_pGameRules", + "CCSPlayerController.m_hPlayerPawn" ], "events": [ "begin_new_match", diff --git a/plugins/hud/tests/hud_screen_test.cpp b/plugins/hud/tests/hud_screen_test.cpp index 6d97af8b..38247735 100644 --- a/plugins/hud/tests/hud_screen_test.cpp +++ b/plugins/hud/tests/hud_screen_test.cpp @@ -79,6 +79,13 @@ void TestChips() { CHECK(Text(w, "ui_card_k0_c") == ".gg"); CHECK(On(w, "ui_card_k1", "gone")); // "No" has no command CHECK(!On(w, "ui_card", "has-hint")); + { + // cmd=label|.cmd|after: "Type [.menu] in chat ..."; no after = its label gone. + const auto m = hud::RenderScreen(hud::ParseScreen("title=Match is live\ncmd=Type|.menu|in chat\ncmd=Ready|.r\n"), "ui_mid"); + CHECK(Text(m, "ui_mid_k0_l") == "Type" && Text(m, "ui_mid_k0_c") == ".menu" && Text(m, "ui_mid_k0_a") == "in chat"); + CHECK(!On(m, "ui_mid_k0_a", "gone")); + CHECK(Text(m, "ui_mid_k1_a").empty() && On(m, "ui_mid_k1_a", "gone")); + } } void TestLinesAndMini() { @@ -135,6 +142,12 @@ void TestButtonIds() { CHECK(hud::ParseButtonId("ui_mid_b3", &p, &i) && p == "ui_mid" && i == 3); CHECK(hud::ParseButtonId("ui_card_close", &p, &i) && p == "ui_card" && i == -1); CHECK(hud::ParseButtonId("ui_mid_b23", &p, &i) && i == 23); + // The menu list (where=left): its rows and its close row. + CHECK(hud::ParseButtonId("ui_left_b4", &p, &i) && p == "ui_left" && i == 4); + CHECK(hud::ParseButtonId("ui_left_close", &p, &i) && p == "ui_left" && i == -1); + CHECK(hud::ParseScreen(std::string("id=pick") + char(10) + "closerow=0" + char(10)).noCloseRow); + CHECK(hud::ParseScreen("id=m\ntitle=Menu\nwhere=left\n").where == "left"); + CHECK(hud::EnterOf(hud::ParseScreen("id=m\ntitle=Menu\nwhere=left\n"), "ui_left") == "fx-slide-left"); CHECK(!hud::ParseButtonId("ui_mid_b24", &p, &i)); CHECK(!hud::ParseButtonId("ui_mid_b", &p, &i)); CHECK(!hud::ParseButtonId("at_btn_ct", &p, &i)); diff --git a/plugins/match/locales/bg.json b/plugins/match/locales/bg.json index 076f2056..0e4fee86 100644 --- a/plugins/match/locales/bg.json +++ b/plugins/match/locales/bg.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Задръж E, за да си готов, или напиши", "spec.hold_unready": "Задръж E, за да не си готов, или напиши", "spec.knife_round": "Рунд с ножове", - "spec.winners_pick": "Победителите избират страна", + "spec.winners_pick": "Спечелете, за да изберете страна", "spec.you_won_knife": "Спечелихте рунда с ножове", "spec.which_side": "Коя страна искате?", "spec.you_lost_knife": "Загубихте рунда с ножове", @@ -211,6 +211,8 @@ "card.team2": "Отбор 2", "card.glhf": "успех и приятна игра", "card.kind_live": "На живо", + "card.live_title": "Мачът започна", + "card.menu_after": "в чата за команди", "card.glhf_title": "Успех и приятна игра", "card.map_head": "КАРТА {number}", "card.map_kind": "Карта {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Отчет за щетите:", "dmg.card_round": "Рунд {round}", - "dmg.card_total": "Щети: {total}", + "dmg.card_total": "Нанесени {total} щети", + "dmg.card_totals": "Нанесени {total} · Поети {took}", "admin.practice_on": "режимът тренировка е включен.", "admin.practice_off": "режимът тренировка е изключен.", "admin.mode_idle": "режимът е неактивен (автоматичната загрявка за скрим е изключена до .ru mode scrim или смяна на картата).", @@ -536,5 +539,13 @@ "end.col7_title": "Щети от гранати", "end.col7_body": "Щети от HE гранати и огън", "end.col8_title": "Първи убийства", - "end.col8_body": "Първото убийство в рунда" + "end.col8_body": "Първото убийство в рунда", + "knife.captain_only": "само капитанът ти избира страна.", + "tip.menu": "пауза, админ или отказване? Напиши .menu", + "tip.ready_hold": "Задръжте E, за да сте готови.", + "notice.winners_stay": "Победителите с нож остават {side}", + "notice.winners_start": "Победителите с нож започват {side}", + "notice.you_chose": "Избрахте {side}", + "notice.opponents_chose": "Противниците избраха {side}", + "notice.you_start": "Започвате като {side}" } diff --git a/plugins/match/locales/cs.json b/plugins/match/locales/cs.json index 19761999..c2fdf1bb 100644 --- a/plugins/match/locales/cs.json +++ b/plugins/match/locales/cs.json @@ -177,7 +177,7 @@ "spec.hold_ready": "Podrž E pro připravenost, nebo napiš", "spec.hold_unready": "Podrž E pro zrušení připravenosti, nebo napiš", "spec.knife_round": "Nožové kolo", - "spec.winners_pick": "Vítězové volí stranu", + "spec.winners_pick": "Vyhrajte a vyberte si stranu", "spec.you_won_knife": "Vyhráli jste nožové kolo", "spec.which_side": "Kterou stranu chcete?", "spec.you_lost_knife": "Prohráli jste nožové kolo", @@ -214,6 +214,8 @@ "card.team2": "Tým 2", "card.glhf": "hodně štěstí a zábavy", "card.kind_live": "Živě", + "card.live_title": "Zápas je živě", + "card.menu_after": "do chatu pro příkazy", "card.glhf_title": "Hodně štěstí a zábavy", "card.map_head": "MAPA {number}", "card.map_kind": "Mapa {number}", @@ -474,7 +476,8 @@ "dmg.col_hp": "HP", "dmg.header": "Hlášení o poškození:", "dmg.card_round": "Kolo {round}", - "dmg.card_total": "Poškození: {total}", + "dmg.card_total": "Způsobeno {total} poškození", + "dmg.card_totals": "Způsobeno {total} · Utrženo {took}", "admin.practice_on": "tréninkový režim zapnut.", "admin.practice_off": "tréninkový režim vypnut.", "admin.mode_idle": "režim nastaven na nečinný (automatické rozehřívání scrimu vypnuté do .ru mode scrim nebo změny mapy).", @@ -550,5 +553,13 @@ "end.col7_title": "Poškození z granátů", "end.col7_body": "Poškození z HE granátů a ohně", "end.col8_title": "První zabití", - "end.col8_body": "První zabití v kole" + "end.col8_body": "První zabití v kole", + "knife.captain_only": "stranu vybírá jen tvůj kapitán.", + "tip.menu": "potřebuješ pauzu, admina nebo se vzdát? Napiš .menu", + "tip.ready_hold": "Podržte E a budete připraveni.", + "notice.winners_stay": "Vítězové nožů zůstávají {side}", + "notice.winners_start": "Vítězové nožů začínají {side}", + "notice.you_chose": "Vybrali jste {side}", + "notice.opponents_chose": "Soupeři vybrali {side}", + "notice.you_start": "Začínáte za {side}" } diff --git a/plugins/match/locales/da.json b/plugins/match/locales/da.json index 870de4d9..e320c43a 100644 --- a/plugins/match/locales/da.json +++ b/plugins/match/locales/da.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Hold E for at blive klar, eller skriv", "spec.hold_unready": "Hold E for at blive ikke klar, eller skriv", "spec.knife_round": "Knivrunde", - "spec.winners_pick": "Vinderne vælger side", + "spec.winners_pick": "Vind for at vælge side", "spec.you_won_knife": "I vandt knivrunden", "spec.which_side": "Hvilken side vil I have?", "spec.you_lost_knife": "I tabte knivrunden", @@ -211,6 +211,8 @@ "card.team2": "Hold 2", "card.glhf": "held og lykke, og hav det sjovt", "card.kind_live": "Live", + "card.live_title": "Kampen er live", + "card.menu_after": "i chatten for kommandoer", "card.glhf_title": "Held og lykke, og hav det sjovt", "card.map_head": "MAP {number}", "card.map_kind": "Map {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Skaderapport:", "dmg.card_round": "Runde {round}", - "dmg.card_total": "{total} skade", + "dmg.card_total": "Gav {total} skade", + "dmg.card_totals": "Gav {total} · Tog {took}", "admin.practice_on": "træningstilstand slået til.", "admin.practice_off": "træningstilstand slået fra.", "admin.mode_idle": "tilstand sat til hvile (automatisk scrim-opvarmning fra indtil .ru mode scrim eller baneskift).", @@ -536,5 +539,13 @@ "end.col7_title": "Granatskade", "end.col7_body": "Skade fra HE-granater og ild", "end.col8_title": "Entry-kills", - "end.col8_body": "Rundens første kill" + "end.col8_body": "Rundens første kill", + "knife.captain_only": "kun din kaptajn vælger side.", + "tip.menu": "brug for pause, en admin eller vil give op? Skriv .menu", + "tip.ready_hold": "Hold E for at melde klar.", + "notice.winners_stay": "Knivvinderne bliver {side}", + "notice.winners_start": "Knivvinderne starter {side}", + "notice.you_chose": "I valgte {side}", + "notice.opponents_chose": "Modstanderne valgte {side}", + "notice.you_start": "I starter som {side}" } diff --git a/plugins/match/locales/de.json b/plugins/match/locales/de.json index 43ec12fa..6ea23e16 100644 --- a/plugins/match/locales/de.json +++ b/plugins/match/locales/de.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Halte E, um bereit zu sein, oder tippe", "spec.hold_unready": "Halte E, um nicht mehr bereit zu sein, oder tippe", "spec.knife_round": "Knife-Runde", - "spec.winners_pick": "Die Sieger wählen eine Seite", + "spec.winners_pick": "Gewinnt, um eure Seite zu wählen", "spec.you_won_knife": "Knife-Runde gewonnen", "spec.which_side": "Welche Seite willst du?", "spec.you_lost_knife": "Knife-Runde verloren", @@ -211,6 +211,8 @@ "card.team2": "Team 2", "card.glhf": "viel Glück und viel Spaß", "card.kind_live": "Live", + "card.live_title": "Das Match ist live", + "card.menu_after": "im Chat für Befehle", "card.glhf_title": "Viel Glück und viel Spaß", "card.map_head": "MAP {number}", "card.map_kind": "Map {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Schadensbericht:", "dmg.card_round": "Runde {round}", - "dmg.card_total": "{total} Schaden", + "dmg.card_total": "{total} Schaden verursacht", + "dmg.card_totals": "Verursacht {total} · Erlitten {took}", "admin.practice_on": "Trainingsmodus eingeschaltet.", "admin.practice_off": "Trainingsmodus ausgeschaltet.", "admin.mode_idle": "Modus auf Leerlauf gesetzt (automatisches Scrim-Aufwärmen aus bis .ru mode scrim oder Mapwechsel).", @@ -536,5 +539,13 @@ "end.col7_title": "Granatenschaden", "end.col7_body": "Schaden durch HE-Granaten und Feuer", "end.col8_title": "Entry-Kills", - "end.col8_body": "Der erste Kill einer Runde" + "end.col8_body": "Der erste Kill einer Runde", + "knife.captain_only": "nur dein Kapitän wählt die Seite.", + "tip.menu": "Pause, Admin oder aufgeben? Schreib .menu", + "tip.ready_hold": "Halte E, um bereit zu sein.", + "notice.winners_stay": "Messer-Gewinner bleiben {side}", + "notice.winners_start": "Messer-Gewinner starten {side}", + "notice.you_chose": "Ihr habt {side} gewählt", + "notice.opponents_chose": "Gegner haben {side} gewählt", + "notice.you_start": "Ihr startet als {side}" } diff --git a/plugins/match/locales/el.json b/plugins/match/locales/el.json index 99b2257b..ef9b2f16 100644 --- a/plugins/match/locales/el.json +++ b/plugins/match/locales/el.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Κράτα το E για έτοιμος, ή γράψε", "spec.hold_unready": "Κράτα το E για μη έτοιμος, ή γράψε", "spec.knife_round": "Γύρος με μαχαίρια", - "spec.winners_pick": "Οι νικητές διαλέγουν πλευρά", + "spec.winners_pick": "Κερδίστε για να διαλέξετε πλευρά", "spec.you_won_knife": "Κερδίσατε τον γύρο με μαχαίρια", "spec.which_side": "Ποια πλευρά θέλετε;", "spec.you_lost_knife": "Χάσατε τον γύρο με μαχαίρια", @@ -211,6 +211,8 @@ "card.team2": "Ομάδα 2", "card.glhf": "καλή επιτυχία και καλή διασκέδαση", "card.kind_live": "Ζωντανά", + "card.live_title": "Ο αγώνας ξεκίνησε", + "card.menu_after": "στο chat για εντολές", "card.glhf_title": "Καλή επιτυχία και καλή διασκέδαση", "card.map_head": "ΧΑΡΤΗΣ {number}", "card.map_kind": "Χάρτης {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Αναφορά ζημιάς:", "dmg.card_round": "Γύρος {round}", - "dmg.card_total": "Ζημιά: {total}", + "dmg.card_total": "Προκαλέσατε {total} ζημιά", + "dmg.card_totals": "Έδωσες {total} · Δέχτηκες {took}", "admin.practice_on": "η λειτουργία προπόνησης ενεργοποιήθηκε.", "admin.practice_off": "η λειτουργία προπόνησης απενεργοποιήθηκε.", "admin.mode_idle": "η λειτουργία ορίστηκε σε αδράνεια (η αυτόματη προθέρμανση scrim είναι κλειστή μέχρι το .ru mode scrim ή μια αλλαγή χάρτη).", @@ -536,5 +539,13 @@ "end.col7_title": "Ζημιά από χειροβομβίδες", "end.col7_body": "Ζημιά από HE και φωτιά", "end.col8_title": "Πρώτα kills", - "end.col8_body": "Το πρώτο kill ενός γύρου" + "end.col8_body": "Το πρώτο kill ενός γύρου", + "knife.captain_only": "μόνο ο αρχηγός σου διαλέγει πλευρά.", + "tip.menu": "χρειάζεσαι παύση, admin ή να παραδοθείς; Γράψε .menu", + "tip.ready_hold": "Κρατήστε το E για να δηλώσετε έτοιμοι.", + "notice.winners_stay": "Οι νικητές με μαχαίρι μένουν {side}", + "notice.winners_start": "Οι νικητές με μαχαίρι ξεκινούν {side}", + "notice.you_chose": "Επιλέξατε {side}", + "notice.opponents_chose": "Οι αντίπαλοι επέλεξαν {side}", + "notice.you_start": "Ξεκινάτε ως {side}" } diff --git a/plugins/match/locales/en.json b/plugins/match/locales/en.json index 5c1c07ed..5b1b09d8 100644 --- a/plugins/match/locales/en.json +++ b/plugins/match/locales/en.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Hold E to ready up, or type", "spec.hold_unready": "Hold E to unready, or type", "spec.knife_round": "Knife round", - "spec.winners_pick": "Winners pick a side", + "spec.winners_pick": "Win to pick your side", "spec.you_won_knife": "You won the knife", "spec.which_side": "Which side do you want?", "spec.you_lost_knife": "You lost the knife", @@ -211,6 +211,8 @@ "card.team2": "Team 2", "card.glhf": "good luck, have fun", "card.kind_live": "Live", + "card.live_title": "Match is live", + "card.menu_after": "in chat for commands", "card.glhf_title": "Good luck, have fun", "card.map_head": "MAP {number}", "card.map_kind": "Map {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Damage report:", "dmg.card_round": "Round {round}", - "dmg.card_total": "{total} damage", + "dmg.card_total": "Dealt {total} damage", + "dmg.card_totals": "Dealt {total} · Took {took}", "admin.practice_on": "practice mode enabled.", "admin.practice_off": "practice mode disabled.", "admin.mode_idle": "mode set to idle (auto scrim warmup off until .ru mode scrim or a map change).", @@ -536,5 +539,13 @@ "end.col7_title": "Utility damage", "end.col7_body": "Damage from HE grenades and fire", "end.col8_title": "Entry kills", - "end.col8_body": "The first kill of a round" + "end.col8_body": "The first kill of a round", + "knife.captain_only": "only your captain picks the side.", + "tip.menu": "Need a pause, an admin or to forfeit? Type .menu in chat.", + "tip.ready_hold": "Hold E to ready up.", + "notice.winners_stay": "Knife winners stay {side}", + "notice.winners_start": "Knife winners start {side}", + "notice.you_chose": "You chose {side}", + "notice.opponents_chose": "Opponents chose {side}", + "notice.you_start": "You start {side}" } diff --git a/plugins/match/locales/es-419.json b/plugins/match/locales/es-419.json index e5cd9f1e..f475c622 100644 --- a/plugins/match/locales/es-419.json +++ b/plugins/match/locales/es-419.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Mantén E para estar listo, o escribe", "spec.hold_unready": "Mantén E para dejar de estar listo, o escribe", "spec.knife_round": "Ronda de knife", - "spec.winners_pick": "Los ganadores eligen lado", + "spec.winners_pick": "Gana para elegir tu lado", "spec.you_won_knife": "Ganaron la ronda de knife", "spec.which_side": "¿Qué lado quieren?", "spec.you_lost_knife": "Perdieron la ronda de knife", @@ -211,6 +211,8 @@ "card.team2": "Equipo 2", "card.glhf": "buena suerte y a disfrutar", "card.kind_live": "En vivo", + "card.live_title": "La partida está en vivo", + "card.menu_after": "en el chat para comandos", "card.glhf_title": "Buena suerte y a disfrutar", "card.map_head": "MAPA {number}", "card.map_kind": "Mapa {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Informe de daño:", "dmg.card_round": "Ronda {round}", - "dmg.card_total": "{total} de daño", + "dmg.card_total": "Infligiste {total} de daño", + "dmg.card_totals": "Infligido {total} · Recibido {took}", "admin.practice_on": "modo práctica activado.", "admin.practice_off": "modo práctica desactivado.", "admin.mode_idle": "modo en reposo (calentamiento de scrim automático desactivado hasta .ru mode scrim o un cambio de mapa).", @@ -536,5 +539,13 @@ "end.col7_title": "Daño de utilidad", "end.col7_body": "Daño de granadas HE y fuego", "end.col8_title": "Entry kills", - "end.col8_body": "La primera baja de una ronda" + "end.col8_body": "La primera baja de una ronda", + "knife.captain_only": "solo tu capitán elige el lado.", + "tip.menu": "¿necesitas una pausa, un admin o rendirte? Escribe .menu", + "tip.ready_hold": "Mantén E para estar listo.", + "notice.winners_stay": "Los ganadores del cuchillo se quedan en {side}", + "notice.winners_start": "Los ganadores del cuchillo empiezan en {side}", + "notice.you_chose": "Elegiste {side}", + "notice.opponents_chose": "Los rivales eligieron {side}", + "notice.you_start": "Empiezas como {side}" } diff --git a/plugins/match/locales/es.json b/plugins/match/locales/es.json index 36366c9d..414a8289 100644 --- a/plugins/match/locales/es.json +++ b/plugins/match/locales/es.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Mantén E para estar listo, o escribe", "spec.hold_unready": "Mantén E para dejar de estar listo, o escribe", "spec.knife_round": "Ronda de knife", - "spec.winners_pick": "Los ganadores eligen lado", + "spec.winners_pick": "Gana para elegir tu lado", "spec.you_won_knife": "Habéis ganado la ronda de knife", "spec.which_side": "¿Qué lado queréis?", "spec.you_lost_knife": "Habéis perdido la ronda de knife", @@ -211,6 +211,8 @@ "card.team2": "Equipo 2", "card.glhf": "buena suerte y a disfrutar", "card.kind_live": "En directo", + "card.live_title": "La partida está en directo", + "card.menu_after": "en el chat para comandos", "card.glhf_title": "Buena suerte y a disfrutar", "card.map_head": "MAPA {number}", "card.map_kind": "Mapa {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Informe de daño:", "dmg.card_round": "Ronda {round}", - "dmg.card_total": "{total} de daño", + "dmg.card_total": "Has infligido {total} de daño", + "dmg.card_totals": "Infligido {total} · Recibido {took}", "admin.practice_on": "modo práctica activado.", "admin.practice_off": "modo práctica desactivado.", "admin.mode_idle": "modo en reposo (calentamiento de scrim automático desactivado hasta .ru mode scrim o un cambio de mapa).", @@ -536,5 +539,13 @@ "end.col7_title": "Daño de utilidad", "end.col7_body": "Daño de granadas HE y fuego", "end.col8_title": "Entry kills", - "end.col8_body": "La primera baja de una ronda" + "end.col8_body": "La primera baja de una ronda", + "knife.captain_only": "solo tu capitán elige el lado.", + "tip.menu": "¿necesitas una pausa, un admin o rendirte? Escribe .menu", + "tip.ready_hold": "Mantén E para estar listo.", + "notice.winners_stay": "Los ganadores del cuchillo se quedan en {side}", + "notice.winners_start": "Los ganadores del cuchillo empiezan en {side}", + "notice.you_chose": "Elegisteis {side}", + "notice.opponents_chose": "Los rivales eligieron {side}", + "notice.you_start": "Empezáis como {side}" } diff --git a/plugins/match/locales/fi.json b/plugins/match/locales/fi.json index e6d18529..f572ccbb 100644 --- a/plugins/match/locales/fi.json +++ b/plugins/match/locales/fi.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Pidä E pohjassa ollaksesi valmis, tai kirjoita", "spec.hold_unready": "Pidä E pohjassa perataksesi valmiuden, tai kirjoita", "spec.knife_round": "Veitsierä", - "spec.winners_pick": "Voittajat valitsevat puolen", + "spec.winners_pick": "Voita ja valitse puolesi", "spec.you_won_knife": "Voititte veitsierän", "spec.which_side": "Kumman puolen haluatte?", "spec.you_lost_knife": "Hävisitte veitsierän", @@ -211,6 +211,8 @@ "card.team2": "Joukkue 2", "card.glhf": "onnea ja hauskaa peliä", "card.kind_live": "Live", + "card.live_title": "Ottelu on käynnissä", + "card.menu_after": "chattiin: komennot", "card.glhf_title": "Onnea ja hauskaa peliä", "card.map_head": "KARTTA {number}", "card.map_kind": "Kartta {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Vahinkoraportti:", "dmg.card_round": "Kierros {round}", - "dmg.card_total": "{total} vahinkoa", + "dmg.card_total": "Teit {total} vahinkoa", + "dmg.card_totals": "Tehty {total} · Otettu {took}", "admin.practice_on": "harjoitustila päällä.", "admin.practice_off": "harjoitustila pois päältä.", "admin.mode_idle": "tila asetettu lepoon (automaattinen scrim-lämmittely pois päältä, kunnes .ru mode scrim tai kartanvaihto).", @@ -536,5 +539,13 @@ "end.col7_title": "Kranaattivahinko", "end.col7_body": "Vahinko HE-kranaateista ja tulesta", "end.col8_title": "Avaustapot", - "end.col8_body": "Kierroksen ensimmäinen tappo" + "end.col8_body": "Kierroksen ensimmäinen tappo", + "knife.captain_only": "vain kapteenisi valitsee puolen.", + "tip.menu": "tarvitsetko tauon, adminin tai haluatko luovuttaa? Kirjoita .menu", + "tip.ready_hold": "Pidä E pohjassa ollaksesi valmis.", + "notice.winners_stay": "Veitsivoittajat jäävät {side}", + "notice.winners_start": "Veitsivoittajat aloittavat {side}", + "notice.you_chose": "Valitsitte {side}", + "notice.opponents_chose": "Vastustajat valitsivat {side}", + "notice.you_start": "Aloitatte puolella {side}" } diff --git a/plugins/match/locales/fr.json b/plugins/match/locales/fr.json index 7616d37b..52461bd7 100644 --- a/plugins/match/locales/fr.json +++ b/plugins/match/locales/fr.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Maintiens E pour être prêt, ou tape", "spec.hold_unready": "Maintiens E pour ne plus être prêt, ou tape", "spec.knife_round": "Manche knife", - "spec.winners_pick": "Les gagnants choisissent un camp", + "spec.winners_pick": "Gagnez pour choisir votre camp", "spec.you_won_knife": "Vous avez gagné la manche knife", "spec.which_side": "Quel camp voulez-vous ?", "spec.you_lost_knife": "Vous avez perdu la manche knife", @@ -211,6 +211,8 @@ "card.team2": "Équipe 2", "card.glhf": "bonne chance et amusez-vous bien", "card.kind_live": "En direct", + "card.live_title": "Le match est lancé", + "card.menu_after": "dans le chat pour les commandes", "card.glhf_title": "Bonne chance et amusez-vous bien", "card.map_head": "MAP {number}", "card.map_kind": "Map {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "PV", "dmg.header": "Rapport de dégâts :", "dmg.card_round": "Manche {round}", - "dmg.card_total": "{total} dégâts", + "dmg.card_total": "{total} dégâts infligés", + "dmg.card_totals": "Infligés {total} · Subis {took}", "admin.practice_on": "mode entraînement activé.", "admin.practice_off": "mode entraînement désactivé.", "admin.mode_idle": "mode mis au repos (échauffement scrim automatique désactivé jusqu’à .ru mode scrim ou un changement de carte).", @@ -536,5 +539,13 @@ "end.col7_title": "Dégâts utilitaires", "end.col7_body": "Dégâts des grenades HE et du feu", "end.col8_title": "Entry kills", - "end.col8_body": "Le premier kill d’une manche" + "end.col8_body": "Le premier kill d’une manche", + "knife.captain_only": "seul ton capitaine choisit le camp.", + "tip.menu": "besoin d’une pause, d’un admin ou d’abandonner ? Tape .menu", + "tip.ready_hold": "Maintenez E pour être prêt.", + "notice.winners_stay": "Les gagnants au couteau restent {side}", + "notice.winners_start": "Les gagnants au couteau commencent {side}", + "notice.you_chose": "Vous avez choisi {side}", + "notice.opponents_chose": "Les adversaires ont choisi {side}", + "notice.you_start": "Vous commencez en {side}" } diff --git a/plugins/match/locales/hu.json b/plugins/match/locales/hu.json index 98ae29c2..e92e947d 100644 --- a/plugins/match/locales/hu.json +++ b/plugins/match/locales/hu.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Tartsd lenyomva az E-t a készenléthez, vagy írd be", "spec.hold_unready": "Tartsd lenyomva az E-t a készenlét visszavonásához, vagy írd be", "spec.knife_round": "Késes kör", - "spec.winners_pick": "A győztesek oldalt választanak", + "spec.winners_pick": "Nyerj, és válassz oldalt", "spec.you_won_knife": "Megnyertétek a késes kört", "spec.which_side": "Melyik oldalt kéritek?", "spec.you_lost_knife": "Elvesztettétek a késes kört", @@ -211,6 +211,8 @@ "card.team2": "2. csapat", "card.glhf": "sok sikert és jó játékot", "card.kind_live": "Élő", + "card.live_title": "A meccs élőben", + "card.menu_after": "a chatbe: parancsok", "card.glhf_title": "Sok sikert és jó játékot", "card.map_head": "{number}. PÁLYA", "card.map_kind": "{number}. pálya", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Sebzésjelentés:", "dmg.card_round": "{round}. kör", - "dmg.card_total": "{total} sebzés", + "dmg.card_total": "{total} sebzést okoztál", + "dmg.card_totals": "Okozott {total} · Kapott {took}", "admin.practice_on": "edzésmód bekapcsolva.", "admin.practice_off": "edzésmód kikapcsolva.", "admin.mode_idle": "mód tétlenre állítva (az automatikus scrim-bemelegítés ki van kapcsolva a .ru mode scrim parancsig vagy pályaváltásig).", @@ -536,5 +539,13 @@ "end.col7_title": "Gránátsebzés", "end.col7_body": "Sebzés HE gránátokból és tűzből", "end.col8_title": "Nyitó ölések", - "end.col8_body": "A kör első ölése" + "end.col8_body": "A kör első ölése", + "knife.captain_only": "csak a kapitányod választ oldalt.", + "tip.menu": "szünet, admin vagy feladás? Írd be: .menu", + "tip.ready_hold": "Tartsd lenyomva az E-t, hogy kész legyél.", + "notice.winners_stay": "A késkör nyertesei maradnak: {side}", + "notice.winners_start": "A késkör nyertesei kezdenek: {side}", + "notice.you_chose": "Ti a(z) {side} oldalt választottátok", + "notice.opponents_chose": "Az ellenfél a(z) {side} oldalt választotta", + "notice.you_start": "Ti {side} oldalon kezdtek" } diff --git a/plugins/match/locales/id.json b/plugins/match/locales/id.json index a9e6fcc3..6fa33ab0 100644 --- a/plugins/match/locales/id.json +++ b/plugins/match/locales/id.json @@ -170,7 +170,7 @@ "spec.hold_ready": "Tahan E untuk siap, atau ketik", "spec.hold_unready": "Tahan E untuk batal siap, atau ketik", "spec.knife_round": "Ronde pisau", - "spec.winners_pick": "Pemenang memilih sisi", + "spec.winners_pick": "Menangkan untuk memilih sisi", "spec.you_won_knife": "Tim Anda menang ronde pisau", "spec.which_side": "Mau sisi yang mana?", "spec.you_lost_knife": "Tim Anda kalah ronde pisau", @@ -207,6 +207,8 @@ "card.team2": "Tim 2", "card.glhf": "semoga beruntung, selamat bermain", "card.kind_live": "Live", + "card.live_title": "Pertandingan dimulai", + "card.menu_after": "di chat untuk perintah", "card.glhf_title": "Semoga beruntung, selamat bermain", "card.map_head": "PETA {number}", "card.map_kind": "Peta {number}", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "Laporan damage:", "dmg.card_round": "Ronde {round}", - "dmg.card_total": "{total} damage", + "dmg.card_total": "Memberi {total} damage", + "dmg.card_totals": "Diberi {total} · Diterima {took}", "admin.practice_on": "mode latihan diaktifkan.", "admin.practice_off": "mode latihan dimatikan.", "admin.mode_idle": "mode diatur ke diam (pemanasan scrim otomatis mati sampai .ru mode scrim atau ganti map).", @@ -527,5 +530,13 @@ "end.col7_title": "Damage utility", "end.col7_body": "Damage dari granat HE dan api", "end.col8_title": "Entry kill", - "end.col8_body": "Kill pertama dalam ronde" + "end.col8_body": "Kill pertama dalam ronde", + "knife.captain_only": "hanya kaptenmu yang memilih sisi.", + "tip.menu": "perlu jeda, admin, atau menyerah? Ketik .menu", + "tip.ready_hold": "Tahan E untuk siap.", + "notice.winners_stay": "Pemenang pisau tetap {side}", + "notice.winners_start": "Pemenang pisau mulai {side}", + "notice.you_chose": "Kalian memilih {side}", + "notice.opponents_chose": "Lawan memilih {side}", + "notice.you_start": "Kalian mulai sebagai {side}" } diff --git a/plugins/match/locales/it.json b/plugins/match/locales/it.json index 28632cb1..22319f38 100644 --- a/plugins/match/locales/it.json +++ b/plugins/match/locales/it.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Tieni premuto E per essere pronto, o scrivi", "spec.hold_unready": "Tieni premuto E per non essere più pronto, o scrivi", "spec.knife_round": "Knife round", - "spec.winners_pick": "I vincitori scelgono il lato", + "spec.winners_pick": "Vinci per scegliere il lato", "spec.you_won_knife": "Avete vinto il knife round", "spec.which_side": "Che lato volete?", "spec.you_lost_knife": "Avete perso il knife round", @@ -211,6 +211,8 @@ "card.team2": "Squadra 2", "card.glhf": "buona fortuna e buon divertimento", "card.kind_live": "Live", + "card.live_title": "La partita è live", + "card.menu_after": "in chat per i comandi", "card.glhf_title": "Buona fortuna e buon divertimento", "card.map_head": "MAPPA {number}", "card.map_kind": "Mappa {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Rapporto danni:", "dmg.card_round": "Round {round}", - "dmg.card_total": "{total} danni", + "dmg.card_total": "Hai inflitto {total} danni", + "dmg.card_totals": "Inflitti {total} · Subiti {took}", "admin.practice_on": "modalità allenamento attivata.", "admin.practice_off": "modalità allenamento disattivata.", "admin.mode_idle": "modalità impostata su inattiva (riscaldamento scrim automatico disattivato fino a .ru mode scrim o a un cambio mappa).", @@ -536,5 +539,13 @@ "end.col7_title": "Danni da utility", "end.col7_body": "Danni da granate HE e fuoco", "end.col8_title": "Entry kill", - "end.col8_body": "La prima kill di un round" + "end.col8_body": "La prima kill di un round", + "knife.captain_only": "solo il tuo capitano sceglie il lato.", + "tip.menu": "serve una pausa, un admin o arrenderti? Scrivi .menu", + "tip.ready_hold": "Tieni premuto E per essere pronto.", + "notice.winners_stay": "I vincitori del coltello restano {side}", + "notice.winners_start": "I vincitori del coltello iniziano {side}", + "notice.you_chose": "Avete scelto {side}", + "notice.opponents_chose": "Gli avversari hanno scelto {side}", + "notice.you_start": "Iniziate come {side}" } diff --git a/plugins/match/locales/ja.json b/plugins/match/locales/ja.json index 915f8e26..4f0841d9 100644 --- a/plugins/match/locales/ja.json +++ b/plugins/match/locales/ja.json @@ -170,7 +170,7 @@ "spec.hold_ready": "Eを長押しで準備完了、または入力", "spec.hold_unready": "Eを長押しで準備解除、または入力", "spec.knife_round": "ナイフラウンド", - "spec.winners_pick": "勝者がサイドを選びます", + "spec.winners_pick": "勝ってサイドを選ぼう", "spec.you_won_knife": "ナイフラウンドに勝ちました", "spec.which_side": "どちらのサイドにしますか?", "spec.you_lost_knife": "ナイフラウンドに負けました", @@ -207,6 +207,8 @@ "card.team2": "チーム 2", "card.glhf": "がんばって、楽しんで", "card.kind_live": "ライブ", + "card.live_title": "試合開始", + "card.menu_after": "をチャットに入力でコマンド", "card.glhf_title": "がんばって、楽しんで", "card.map_head": "マップ {number}", "card.map_kind": "マップ {number}", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "ダメージレポート:", "dmg.card_round": "ラウンド {round}", - "dmg.card_total": "{total} ダメージ", + "dmg.card_total": "{total} ダメージを与えた", + "dmg.card_totals": "与えた {total} · 受けた {took}", "admin.practice_on": "練習モードをオンにしました。", "admin.practice_off": "練習モードをオフにしました。", "admin.mode_idle": "モードを待機にしました(自動スクリムのウォームアップは .ru mode scrim かマップ変更までオフ)。", @@ -527,5 +530,13 @@ "end.col7_title": "ユーティリティダメージ", "end.col7_body": "HE グレネードと炎によるダメージ", "end.col8_title": "エントリーキル", - "end.col8_body": "ラウンド最初のキル" + "end.col8_body": "ラウンド最初のキル", + "knife.captain_only": "サイドを選べるのはキャプテンだけです。", + "tip.menu": "一時停止、管理者、降参は .menu から", + "tip.ready_hold": "E長押しで準備完了。", + "notice.winners_stay": "ナイフラウンドの勝者は{side}のまま", + "notice.winners_start": "ナイフラウンドの勝者は{side}から開始", + "notice.you_chose": "{side} を選択しました", + "notice.opponents_chose": "相手が {side} を選択しました", + "notice.you_start": "{side} から開始" } diff --git a/plugins/match/locales/ko.json b/plugins/match/locales/ko.json index d5575e2e..c5d68cad 100644 --- a/plugins/match/locales/ko.json +++ b/plugins/match/locales/ko.json @@ -170,7 +170,7 @@ "spec.hold_ready": "E를 길게 눌러 준비, 또는 입력", "spec.hold_unready": "E를 길게 눌러 준비 취소, 또는 입력", "spec.knife_round": "칼전", - "spec.winners_pick": "승자가 진영을 고릅니다", + "spec.winners_pick": "이기면 진영을 고릅니다", "spec.you_won_knife": "칼전 승리", "spec.which_side": "어느 진영을 고를까요?", "spec.you_lost_knife": "칼전 패배", @@ -207,6 +207,8 @@ "card.team2": "팀 2", "card.glhf": "행운을 빌며, 즐겁게", "card.kind_live": "라이브", + "card.live_title": "경기 시작", + "card.menu_after": "채팅 입력: 명령어", "card.glhf_title": "행운을 빌며, 즐겁게", "card.map_head": "맵 {number}", "card.map_kind": "맵 {number}", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "피해 보고:", "dmg.card_round": "{round}라운드", - "dmg.card_total": "피해 {total}", + "dmg.card_total": "{total} 피해를 입힘", + "dmg.card_totals": "가함 {total} · 받음 {took}", "admin.practice_on": "연습 모드를 켰습니다.", "admin.practice_off": "연습 모드를 껐습니다.", "admin.mode_idle": "모드를 대기로 설정했습니다(.ru mode scrim이나 맵 변경 전까지 자동 스크림 워밍업 꺼짐).", @@ -527,5 +530,13 @@ "end.col7_title": "유틸리티 피해", "end.col7_body": "고폭 수류탄과 불로 준 피해", "end.col8_title": "엔트리 킬", - "end.col8_body": "라운드의 첫 킬" + "end.col8_body": "라운드의 첫 킬", + "knife.captain_only": "진영은 주장만 선택할 수 있습니다.", + "tip.menu": "일시정지, 관리자 호출, 항복은 .menu", + "tip.ready_hold": "E를 길게 눌러 준비하세요.", + "notice.winners_stay": "칼전 승리 팀은 {side} 유지", + "notice.winners_start": "칼전 승리 팀은 {side}로 시작", + "notice.you_chose": "{side}을(를) 선택했습니다", + "notice.opponents_chose": "상대가 {side}을(를) 선택했습니다", + "notice.you_start": "{side}(으)로 시작합니다" } diff --git a/plugins/match/locales/nb.json b/plugins/match/locales/nb.json index 7127649a..492bc93c 100644 --- a/plugins/match/locales/nb.json +++ b/plugins/match/locales/nb.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Hold E for å bli klar, eller skriv", "spec.hold_unready": "Hold E for å bli ikke klar, eller skriv", "spec.knife_round": "Knivrunde", - "spec.winners_pick": "Vinnerne velger side", + "spec.winners_pick": "Vinn for å velge side", "spec.you_won_knife": "Dere vant knivrunden", "spec.which_side": "Hvilken side vil dere ha?", "spec.you_lost_knife": "Dere tapte knivrunden", @@ -211,6 +211,8 @@ "card.team2": "Lag 2", "card.glhf": "lykke til og ha det gøy", "card.kind_live": "Live", + "card.live_title": "Kampen er i gang", + "card.menu_after": "i chatten for kommandoer", "card.glhf_title": "Lykke til og ha det gøy", "card.map_head": "KART {number}", "card.map_kind": "Kart {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Skaderapport:", "dmg.card_round": "Runde {round}", - "dmg.card_total": "{total} skade", + "dmg.card_total": "Ga {total} skade", + "dmg.card_totals": "Ga {total} · Tok {took}", "admin.practice_on": "treningsmodus er slått på.", "admin.practice_off": "treningsmodus er slått av.", "admin.mode_idle": "modus satt til tomgang (automatisk scrim-oppvarming er av til .ru mode scrim eller kartbytte).", @@ -536,5 +539,13 @@ "end.col7_title": "Granatskade", "end.col7_body": "Skade fra HE-granater og ild", "end.col8_title": "Åpningsdrap", - "end.col8_body": "Det første drapet i en runde" + "end.col8_body": "Det første drapet i en runde", + "knife.captain_only": "bare kapteinen din velger side.", + "tip.menu": "trenger du pause, en admin eller vil gi opp? Skriv .menu", + "tip.ready_hold": "Hold E for å melde klar.", + "notice.winners_stay": "Knivvinnerne blir {side}", + "notice.winners_start": "Knivvinnerne starter {side}", + "notice.you_chose": "Dere valgte {side}", + "notice.opponents_chose": "Motstanderne valgte {side}", + "notice.you_start": "Dere starter som {side}" } diff --git a/plugins/match/locales/nl.json b/plugins/match/locales/nl.json index 630dac81..2c8328b6 100644 --- a/plugins/match/locales/nl.json +++ b/plugins/match/locales/nl.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Houd E ingedrukt om klaar te zijn, of typ", "spec.hold_unready": "Houd E ingedrukt om niet meer klaar te zijn, of typ", "spec.knife_round": "Knife-round", - "spec.winners_pick": "De winnaars kiezen een kant", + "spec.winners_pick": "Win om je kant te kiezen", "spec.you_won_knife": "Knife-round gewonnen", "spec.which_side": "Welke kant wil je?", "spec.you_lost_knife": "Knife-round verloren", @@ -211,6 +211,8 @@ "card.team2": "Team 2", "card.glhf": "veel succes en veel plezier", "card.kind_live": "Live", + "card.live_title": "De match is live", + "card.menu_after": "in de chat voor commando's", "card.glhf_title": "Veel succes en veel plezier", "card.map_head": "MAP {number}", "card.map_kind": "Map {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Schaderapport:", "dmg.card_round": "Ronde {round}", - "dmg.card_total": "{total} schade", + "dmg.card_total": "{total} schade gedaan", + "dmg.card_totals": "Gedaan {total} · Gekregen {took}", "admin.practice_on": "trainingsmodus aangezet.", "admin.practice_off": "trainingsmodus uitgezet.", "admin.mode_idle": "modus op idle gezet (automatische scrim-warming-up uit tot .ru mode scrim of een mapwissel).", @@ -536,5 +539,13 @@ "end.col7_title": "Utility-schade", "end.col7_body": "Schade door HE-granaten en vuur", "end.col8_title": "Entry-kills", - "end.col8_body": "De eerste kill van een ronde" + "end.col8_body": "De eerste kill van een ronde", + "knife.captain_only": "alleen je captain kiest de kant.", + "tip.menu": "pauze, een admin of opgeven? Typ .menu", + "tip.ready_hold": "Houd E ingedrukt om klaar te zijn.", + "notice.winners_stay": "Mes-winnaars blijven {side}", + "notice.winners_start": "Mes-winnaars starten {side}", + "notice.you_chose": "Jullie kozen {side}", + "notice.opponents_chose": "Tegenstanders kozen {side}", + "notice.you_start": "Jullie beginnen als {side}" } diff --git a/plugins/match/locales/pl.json b/plugins/match/locales/pl.json index d31b8d65..c80fbcac 100644 --- a/plugins/match/locales/pl.json +++ b/plugins/match/locales/pl.json @@ -177,7 +177,7 @@ "spec.hold_ready": "Przytrzymaj E, aby być gotowym, lub wpisz", "spec.hold_unready": "Przytrzymaj E, aby cofnąć gotowość, lub wpisz", "spec.knife_round": "Runda nożowa", - "spec.winners_pick": "Zwycięzcy wybierają stronę", + "spec.winners_pick": "Wygraj, aby wybrać stronę", "spec.you_won_knife": "Wygraliście rundę nożową", "spec.which_side": "Którą stronę bierzecie?", "spec.you_lost_knife": "Przegraliście rundę nożową", @@ -214,6 +214,8 @@ "card.team2": "Drużyna 2", "card.glhf": "powodzenia i dobrej zabawy", "card.kind_live": "Na żywo", + "card.live_title": "Mecz trwa", + "card.menu_after": "na czacie: komendy", "card.glhf_title": "Powodzenia i dobrej zabawy", "card.map_head": "MAPA {number}", "card.map_kind": "Mapa {number}", @@ -474,7 +476,8 @@ "dmg.col_hp": "HP", "dmg.header": "Raport obrażeń:", "dmg.card_round": "Runda {round}", - "dmg.card_total": "Obrażenia: {total}", + "dmg.card_total": "Zadano {total} obrażeń", + "dmg.card_totals": "Zadane {total} · Otrzymane {took}", "admin.practice_on": "tryb treningu włączony.", "admin.practice_off": "tryb treningu wyłączony.", "admin.mode_idle": "tryb ustawiony na bezczynny (automatyczna rozgrzewka scrima wyłączona do .ru mode scrim lub zmiany mapy).", @@ -550,5 +553,13 @@ "end.col7_title": "Obrażenia z granatów", "end.col7_body": "Obrażenia od granatów HE i ognia", "end.col8_title": "Pierwsze zabójstwa", - "end.col8_body": "Pierwsze zabójstwo w rundzie" + "end.col8_body": "Pierwsze zabójstwo w rundzie", + "knife.captain_only": "tylko twój kapitan wybiera stronę.", + "tip.menu": "potrzebujesz pauzy, admina lub chcesz się poddać? Wpisz .menu", + "tip.ready_hold": "Przytrzymaj E, aby być gotowym.", + "notice.winners_stay": "Zwycięzcy noży zostają {side}", + "notice.winners_start": "Zwycięzcy noży zaczynają {side}", + "notice.you_chose": "Wybraliście {side}", + "notice.opponents_chose": "Przeciwnicy wybrali {side}", + "notice.you_start": "Zaczynacie jako {side}" } diff --git a/plugins/match/locales/pt-BR.json b/plugins/match/locales/pt-BR.json index 46e5195e..85a9458c 100644 --- a/plugins/match/locales/pt-BR.json +++ b/plugins/match/locales/pt-BR.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Segure E para ficar pronto, ou digite", "spec.hold_unready": "Segure E para deixar de estar pronto, ou digite", "spec.knife_round": "Round de faca", - "spec.winners_pick": "Os vencedores escolhem o lado", + "spec.winners_pick": "Vença para escolher seu lado", "spec.you_won_knife": "Vocês venceram o round de faca", "spec.which_side": "Qual lado vocês querem?", "spec.you_lost_knife": "Vocês perderam o round de faca", @@ -211,6 +211,8 @@ "card.team2": "Time 2", "card.glhf": "boa sorte e divirtam-se", "card.kind_live": "Ao vivo", + "card.live_title": "A partida começou", + "card.menu_after": "no chat para comandos", "card.glhf_title": "Boa sorte e divirtam-se", "card.map_head": "MAPA {number}", "card.map_kind": "Mapa {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Relatório de dano:", "dmg.card_round": "Round {round}", - "dmg.card_total": "{total} de dano", + "dmg.card_total": "Causou {total} de dano", + "dmg.card_totals": "Causado {total} · Recebido {took}", "admin.practice_on": "modo treino ligado.", "admin.practice_off": "modo treino desligado.", "admin.mode_idle": "modo definido como parado (aquecimento de scrim automático desligado até .ru mode scrim ou uma troca de mapa).", @@ -536,5 +539,13 @@ "end.col7_title": "Dano de utilitários", "end.col7_body": "Dano de granadas HE e fogo", "end.col8_title": "Entry kills", - "end.col8_body": "O primeiro abate de um round" + "end.col8_body": "O primeiro abate de um round", + "knife.captain_only": "só o seu capitão escolhe o lado.", + "tip.menu": "precisa de pausa, de um admin ou desistir? Digite .menu", + "tip.ready_hold": "Segure E para ficar pronto.", + "notice.winners_stay": "Vencedores da faca ficam {side}", + "notice.winners_start": "Vencedores da faca começam {side}", + "notice.you_chose": "Vocês escolheram {side}", + "notice.opponents_chose": "Os adversários escolheram {side}", + "notice.you_start": "Vocês começam de {side}" } diff --git a/plugins/match/locales/pt-PT.json b/plugins/match/locales/pt-PT.json index 504b9373..7cf67dbe 100644 --- a/plugins/match/locales/pt-PT.json +++ b/plugins/match/locales/pt-PT.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Mantém E para ficares pronto, ou escreve", "spec.hold_unready": "Mantém E para deixares de estar pronto, ou escreve", "spec.knife_round": "Ronda de knife", - "spec.winners_pick": "Os vencedores escolhem o lado", + "spec.winners_pick": "Vence para escolher o teu lado", "spec.you_won_knife": "Ganharam a ronda de knife", "spec.which_side": "Que lado querem?", "spec.you_lost_knife": "Perderam a ronda de knife", @@ -211,6 +211,8 @@ "card.team2": "Equipa 2", "card.glhf": "boa sorte e divirtam-se", "card.kind_live": "Em direto", + "card.live_title": "O jogo está em direto", + "card.menu_after": "no chat para comandos", "card.glhf_title": "Boa sorte e divirtam-se", "card.map_head": "MAPA {number}", "card.map_kind": "Mapa {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Relatório de dano:", "dmg.card_round": "Ronda {round}", - "dmg.card_total": "{total} de dano", + "dmg.card_total": "Causaste {total} de dano", + "dmg.card_totals": "Causado {total} · Recebido {took}", "admin.practice_on": "modo de treino ligado.", "admin.practice_off": "modo de treino desligado.", "admin.mode_idle": "modo definido como parado (aquecimento de scrim automático desligado até .ru mode scrim ou uma mudança de mapa).", @@ -536,5 +539,13 @@ "end.col7_title": "Dano de utilitários", "end.col7_body": "Dano de granadas HE e fogo", "end.col8_title": "Entry kills", - "end.col8_body": "O primeiro abate de uma ronda" + "end.col8_body": "O primeiro abate de uma ronda", + "knife.captain_only": "só o teu capitão escolhe o lado.", + "tip.menu": "precisas de pausa, de um admin ou de desistir? Escreve .menu", + "tip.ready_hold": "Mantém E premido para ficares pronto.", + "notice.winners_stay": "Vencedores da faca ficam {side}", + "notice.winners_start": "Vencedores da faca começam {side}", + "notice.you_chose": "Escolheram {side}", + "notice.opponents_chose": "Os adversários escolheram {side}", + "notice.you_start": "Começam como {side}" } diff --git a/plugins/match/locales/ro.json b/plugins/match/locales/ro.json index 1d168340..a176b3be 100644 --- a/plugins/match/locales/ro.json +++ b/plugins/match/locales/ro.json @@ -177,7 +177,7 @@ "spec.hold_ready": "Ține apăsat E ca să fii gata, sau scrie", "spec.hold_unready": "Ține apăsat E ca să nu mai fii gata, sau scrie", "spec.knife_round": "Runda de cuțit", - "spec.winners_pick": "Câștigătorii aleg partea", + "spec.winners_pick": "Câștigă ca să alegi partea", "spec.you_won_knife": "Ați câștigat runda de cuțit", "spec.which_side": "Ce parte vreți?", "spec.you_lost_knife": "Ați pierdut runda de cuțit", @@ -214,6 +214,8 @@ "card.team2": "Echipa 2", "card.glhf": "baftă și distracție plăcută", "card.kind_live": "Live", + "card.live_title": "Meciul a început", + "card.menu_after": "în chat pentru comenzi", "card.glhf_title": "Baftă și distracție plăcută", "card.map_head": "HARTA {number}", "card.map_kind": "Harta {number}", @@ -474,7 +476,8 @@ "dmg.col_hp": "HP", "dmg.header": "Raport de damage:", "dmg.card_round": "Runda {round}", - "dmg.card_total": "{total} damage", + "dmg.card_total": "Ai provocat {total} daune", + "dmg.card_totals": "Provocat {total} · Primit {took}", "admin.practice_on": "modul antrenament a fost pornit.", "admin.practice_off": "modul antrenament a fost oprit.", "admin.mode_idle": "modul a fost pus pe inactiv (încălzirea automată de scrim e oprită până la .ru mode scrim sau o schimbare de hartă).", @@ -550,5 +553,13 @@ "end.col7_title": "Damage din utilitare", "end.col7_body": "Damage din grenade HE și foc", "end.col8_title": "Entry kills", - "end.col8_body": "Primul kill dintr-o rundă" + "end.col8_body": "Primul kill dintr-o rundă", + "knife.captain_only": "doar căpitanul tău alege partea.", + "tip.menu": "ai nevoie de pauză, de un admin sau vrei să renunți? Scrie .menu", + "tip.ready_hold": "Ține apăsat E ca să fii gata.", + "notice.winners_stay": "Câștigătorii rundei de cuțit rămân {side}", + "notice.winners_start": "Câștigătorii rundei de cuțit încep {side}", + "notice.you_chose": "Ați ales {side}", + "notice.opponents_chose": "Adversarii au ales {side}", + "notice.you_start": "Începeți ca {side}" } diff --git a/plugins/match/locales/ru.json b/plugins/match/locales/ru.json index d50dc2ef..13d73dbb 100644 --- a/plugins/match/locales/ru.json +++ b/plugins/match/locales/ru.json @@ -177,7 +177,7 @@ "spec.hold_ready": "Удерживай E, чтобы быть готовым, или введи", "spec.hold_unready": "Удерживай E, чтобы отменить готовность, или введи", "spec.knife_round": "Ножевой раунд", - "spec.winners_pick": "Победители выбирают сторону", + "spec.winners_pick": "Победите, чтобы выбрать сторону", "spec.you_won_knife": "Вы выиграли ножевой раунд", "spec.which_side": "Какую сторону берёте?", "spec.you_lost_knife": "Вы проиграли ножевой раунд", @@ -214,6 +214,8 @@ "card.team2": "Команда 2", "card.glhf": "удачи и приятной игры", "card.kind_live": "Лайв", + "card.live_title": "Матч начался", + "card.menu_after": "в чат — команды", "card.glhf_title": "Удачи и приятной игры", "card.map_head": "КАРТА {number}", "card.map_kind": "Карта {number}", @@ -474,7 +476,8 @@ "dmg.col_hp": "HP", "dmg.header": "Отчёт об уроне:", "dmg.card_round": "Раунд {round}", - "dmg.card_total": "Урон: {total}", + "dmg.card_total": "Нанесено {total} урона", + "dmg.card_totals": "Нанесено {total} · Получено {took}", "admin.practice_on": "режим тренировки включён.", "admin.practice_off": "режим тренировки выключен.", "admin.mode_idle": "режим: простой (авторазминка скрима выключена до .ru mode scrim или смены карты).", @@ -550,5 +553,13 @@ "end.col7_title": "Урон гранатами", "end.col7_body": "Урон от HE-гранат и огня", "end.col8_title": "Первые убийства", - "end.col8_body": "Первое убийство в раунде" + "end.col8_body": "Первое убийство в раунде", + "knife.captain_only": "сторону выбирает только твой капитан.", + "tip.menu": "нужна пауза, админ или сдаться? Напиши .menu", + "tip.ready_hold": "Удерживайте E, чтобы быть готовым.", + "notice.winners_stay": "Победители ножевого раунда остаются за {side}", + "notice.winners_start": "Победители ножевого раунда начинают за {side}", + "notice.you_chose": "Вы выбрали {side}", + "notice.opponents_chose": "Соперники выбрали {side}", + "notice.you_start": "Вы начинаете за {side}" } diff --git a/plugins/match/locales/sv.json b/plugins/match/locales/sv.json index d689813a..fac56cac 100644 --- a/plugins/match/locales/sv.json +++ b/plugins/match/locales/sv.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Håll E för att bli redo, eller skriv", "spec.hold_unready": "Håll E för att bli inte redo, eller skriv", "spec.knife_round": "Knivrunda", - "spec.winners_pick": "Vinnarna väljer sida", + "spec.winners_pick": "Vinn för att välja sida", "spec.you_won_knife": "Ni vann knivrundan", "spec.which_side": "Vilken sida vill ni ha?", "spec.you_lost_knife": "Ni förlorade knivrundan", @@ -211,6 +211,8 @@ "card.team2": "Lag 2", "card.glhf": "lycka till och ha kul", "card.kind_live": "Live", + "card.live_title": "Matchen är live", + "card.menu_after": "i chatten för kommandon", "card.glhf_title": "Lycka till och ha kul", "card.map_head": "KARTA {number}", "card.map_kind": "Karta {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Skaderapport:", "dmg.card_round": "Runda {round}", - "dmg.card_total": "{total} skada", + "dmg.card_total": "Gav {total} skada", + "dmg.card_totals": "Gav {total} · Tog {took}", "admin.practice_on": "träningsläget påslaget.", "admin.practice_off": "träningsläget avstängt.", "admin.mode_idle": "läget satt till vila (automatisk scrim-uppvärmning av tills .ru mode scrim eller kartbyte).", @@ -536,5 +539,13 @@ "end.col7_title": "Granatskada", "end.col7_body": "Skada från HE-granater och eld", "end.col8_title": "Entry-kills", - "end.col8_body": "Rundans första kill" + "end.col8_body": "Rundans första kill", + "knife.captain_only": "bara din kapten väljer sida.", + "tip.menu": "behöver du paus, en admin eller vill ge upp? Skriv .menu", + "tip.ready_hold": "Håll E för att bli redo.", + "notice.winners_stay": "Knivvinnarna stannar {side}", + "notice.winners_start": "Knivvinnarna börjar {side}", + "notice.you_chose": "Ni valde {side}", + "notice.opponents_chose": "Motståndarna valde {side}", + "notice.you_start": "Ni börjar som {side}" } diff --git a/plugins/match/locales/th.json b/plugins/match/locales/th.json index 35dee8a3..9c4ff04a 100644 --- a/plugins/match/locales/th.json +++ b/plugins/match/locales/th.json @@ -170,7 +170,7 @@ "spec.hold_ready": "กด E ค้างไว้เพื่อพร้อม หรือพิมพ์", "spec.hold_unready": "กด E ค้างไว้เพื่อยกเลิกความพร้อม หรือพิมพ์", "spec.knife_round": "รอบมีด", - "spec.winners_pick": "ผู้ชนะเลือกฝั่ง", + "spec.winners_pick": "ชนะเพื่อเลือกฝั่ง", "spec.you_won_knife": "ทีมคุณชนะรอบมีด", "spec.which_side": "จะเลือกฝั่งไหน?", "spec.you_lost_knife": "ทีมคุณแพ้รอบมีด", @@ -207,6 +207,8 @@ "card.team2": "ทีม 2", "card.glhf": "ขอให้โชคดีและสนุกกับเกม", "card.kind_live": "สด", + "card.live_title": "การแข่งขันเริ่มแล้ว", + "card.menu_after": "ในแชทเพื่อดูคำสั่ง", "card.glhf_title": "ขอให้โชคดีและสนุกกับเกม", "card.map_head": "แผนที่ {number}", "card.map_kind": "แผนที่ {number}", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "รายงานความเสียหาย:", "dmg.card_round": "รอบที่ {round}", - "dmg.card_total": "ความเสียหาย {total}", + "dmg.card_total": "สร้างความเสียหาย {total}", + "dmg.card_totals": "ทำ {total} · รับ {took}", "admin.practice_on": "เปิดโหมดฝึกแล้ว", "admin.practice_off": "ปิดโหมดฝึกแล้ว", "admin.mode_idle": "ตั้งโหมดเป็นว่าง (ปิดวอร์มอัปสกริมอัตโนมัติจนกว่าจะใช้ .ru mode scrim หรือเปลี่ยนแผนที่)", @@ -527,5 +530,13 @@ "end.col7_title": "ความเสียหายจากยูทิลิตี้", "end.col7_body": "ความเสียหายจากระเบิด HE และไฟ", "end.col8_title": "เปิดเกมฆ่าก่อน", - "end.col8_body": "การฆ่าครั้งแรกของรอบ" + "end.col8_body": "การฆ่าครั้งแรกของรอบ", + "knife.captain_only": "มีแค่กัปตันของคุณที่เลือกฝั่ง", + "tip.menu": "ต้องการพัก เรียกแอดมิน หรือยอมแพ้? พิมพ์ .menu", + "tip.ready_hold": "กด E ค้างไว้เพื่อพร้อม", + "notice.winners_stay": "ผู้ชนะรอบมีดอยู่ฝั่ง {side}", + "notice.winners_start": "ผู้ชนะรอบมีดเริ่มฝั่ง {side}", + "notice.you_chose": "คุณเลือก {side}", + "notice.opponents_chose": "คู่แข่งเลือก {side}", + "notice.you_start": "คุณเริ่มเป็น {side}" } diff --git a/plugins/match/locales/tr.json b/plugins/match/locales/tr.json index 2002bdd1..e099b74c 100644 --- a/plugins/match/locales/tr.json +++ b/plugins/match/locales/tr.json @@ -174,7 +174,7 @@ "spec.hold_ready": "Hazır olmak için E'yi basılı tut ya da yaz", "spec.hold_unready": "Hazırı iptal etmek için E'yi basılı tut ya da yaz", "spec.knife_round": "Bıçak raundu", - "spec.winners_pick": "Kazananlar tarafı seçer", + "spec.winners_pick": "Kazan ve tarafını seç", "spec.you_won_knife": "Bıçak raundunu kazandınız", "spec.which_side": "Hangi tarafı istiyorsunuz?", "spec.you_lost_knife": "Bıçak raundunu kaybettiniz", @@ -211,6 +211,8 @@ "card.team2": "Takım 2", "card.glhf": "bol şans, iyi eğlenceler", "card.kind_live": "Canlı", + "card.live_title": "Maç başladı", + "card.menu_after": "sohbete yaz: komutlar", "card.glhf_title": "Bol şans, iyi eğlenceler", "card.map_head": "HARİTA {number}", "card.map_kind": "Harita {number}", @@ -460,7 +462,8 @@ "dmg.col_hp": "HP", "dmg.header": "Hasar raporu:", "dmg.card_round": "{round}. raunt", - "dmg.card_total": "{total} hasar", + "dmg.card_total": "{total} hasar verdin", + "dmg.card_totals": "Verilen {total} · Alınan {took}", "admin.practice_on": "antrenman modu açıldı.", "admin.practice_off": "antrenman modu kapatıldı.", "admin.mode_idle": "mod boşta olarak ayarlandı (otomatik scrim ısınması .ru mode scrim ya da harita değişene kadar kapalı).", @@ -536,5 +539,13 @@ "end.col7_title": "Bomba hasarı", "end.col7_body": "HE bombası ve ateş hasarı", "end.col8_title": "İlk leşler", - "end.col8_body": "Rauntun ilk leşi" + "end.col8_body": "Rauntun ilk leşi", + "knife.captain_only": "tarafı yalnızca kaptanın seçer.", + "tip.menu": "mola, admin ya da pes mi? .menu yaz", + "tip.ready_hold": "Hazır olmak için E'yi basılı tut.", + "notice.winners_stay": "Bıçak kazananları {side} kalıyor", + "notice.winners_start": "Bıçak kazananları {side} başlıyor", + "notice.you_chose": "{side} tarafını seçtiniz", + "notice.opponents_chose": "Rakipler {side} tarafını seçti", + "notice.you_start": "{side} olarak başlıyorsunuz" } diff --git a/plugins/match/locales/uk.json b/plugins/match/locales/uk.json index 19d857b8..e62921bd 100644 --- a/plugins/match/locales/uk.json +++ b/plugins/match/locales/uk.json @@ -177,7 +177,7 @@ "spec.hold_ready": "Утримуй E, щоб бути готовим, або введи", "spec.hold_unready": "Утримуй E, щоб скасувати готовність, або введи", "spec.knife_round": "Ножовий раунд", - "spec.winners_pick": "Переможці обирають сторону", + "spec.winners_pick": "Перемагайте, щоб обрати сторону", "spec.you_won_knife": "Ви виграли ножовий раунд", "spec.which_side": "Яку сторону берете?", "spec.you_lost_knife": "Ви програли ножовий раунд", @@ -214,6 +214,8 @@ "card.team2": "Команда 2", "card.glhf": "удачі й приємної гри", "card.kind_live": "Наживо", + "card.live_title": "Матч розпочався", + "card.menu_after": "у чат — команди", "card.glhf_title": "Удачі й приємної гри", "card.map_head": "КАРТА {number}", "card.map_kind": "Карта {number}", @@ -474,7 +476,8 @@ "dmg.col_hp": "HP", "dmg.header": "Звіт про шкоду:", "dmg.card_round": "Раунд {round}", - "dmg.card_total": "Шкода: {total}", + "dmg.card_total": "Завдано {total} шкоди", + "dmg.card_totals": "Завдано {total} · Отримано {took}", "admin.practice_on": "режим тренування увімкнено.", "admin.practice_off": "режим тренування вимкнено.", "admin.mode_idle": "режим: простій (авторозминка скриму вимкнена до .ru mode scrim або зміни мапи).", @@ -550,5 +553,13 @@ "end.col7_title": "Шкода гранатами", "end.col7_body": "Шкода від HE-гранат і вогню", "end.col8_title": "Перші вбивства", - "end.col8_body": "Перше вбивство в раунді" + "end.col8_body": "Перше вбивство в раунді", + "knife.captain_only": "сторону обирає лише твій капітан.", + "tip.menu": "потрібна пауза, адмін чи здатися? Напиши .menu", + "tip.ready_hold": "Утримуйте E, щоб бути готовим.", + "notice.winners_stay": "Переможці ножового раунду лишаються за {side}", + "notice.winners_start": "Переможці ножового раунду починають за {side}", + "notice.you_chose": "Ви обрали {side}", + "notice.opponents_chose": "Суперники обрали {side}", + "notice.you_start": "Ви починаєте за {side}" } diff --git a/plugins/match/locales/vi.json b/plugins/match/locales/vi.json index 7e16e76c..5c9de456 100644 --- a/plugins/match/locales/vi.json +++ b/plugins/match/locales/vi.json @@ -170,7 +170,7 @@ "spec.hold_ready": "Giữ E để sẵn sàng, hoặc gõ", "spec.hold_unready": "Giữ E để hủy sẵn sàng, hoặc gõ", "spec.knife_round": "Hiệp dao", - "spec.winners_pick": "Đội thắng chọn bên", + "spec.winners_pick": "Thắng để chọn phe", "spec.you_won_knife": "Đội bạn thắng hiệp dao", "spec.which_side": "Đội bạn chọn bên nào?", "spec.you_lost_knife": "Đội bạn thua hiệp dao", @@ -207,6 +207,8 @@ "card.team2": "Đội 2", "card.glhf": "chúc may mắn và chơi vui", "card.kind_live": "Trực tiếp", + "card.live_title": "Trận đấu đã bắt đầu", + "card.menu_after": "trong chat để xem lệnh", "card.glhf_title": "Chúc may mắn và chơi vui", "card.map_head": "BẢN ĐỒ {number}", "card.map_kind": "Bản đồ {number}", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "Báo cáo sát thương:", "dmg.card_round": "Hiệp {round}", - "dmg.card_total": "{total} sát thương", + "dmg.card_total": "Gây {total} sát thương", + "dmg.card_totals": "Gây {total} · Nhận {took}", "admin.practice_on": "đã bật chế độ luyện tập.", "admin.practice_off": "đã tắt chế độ luyện tập.", "admin.mode_idle": "đã đặt chế độ rảnh (khởi động scrim tự động tắt cho đến .ru mode scrim hoặc khi đổi bản đồ).", @@ -527,5 +530,13 @@ "end.col7_title": "Sát thương lựu", "end.col7_body": "Sát thương từ lựu HE và lửa", "end.col8_title": "Mở màn", - "end.col8_body": "Pha hạ gục đầu tiên của hiệp" + "end.col8_body": "Pha hạ gục đầu tiên của hiệp", + "knife.captain_only": "chỉ đội trưởng của bạn chọn phe.", + "tip.menu": "cần tạm dừng, gọi admin hay đầu hàng? Gõ .menu", + "tip.ready_hold": "Giữ E để sẵn sàng.", + "notice.winners_stay": "Đội thắng dao giữ {side}", + "notice.winners_start": "Đội thắng dao bắt đầu {side}", + "notice.you_chose": "Bạn đã chọn {side}", + "notice.opponents_chose": "Đối thủ đã chọn {side}", + "notice.you_start": "Bạn bắt đầu bên {side}" } diff --git a/plugins/match/locales/zh-CN.json b/plugins/match/locales/zh-CN.json index e0550f72..1a339b6f 100644 --- a/plugins/match/locales/zh-CN.json +++ b/plugins/match/locales/zh-CN.json @@ -170,7 +170,7 @@ "spec.hold_ready": "按住 E 准备,或输入", "spec.hold_unready": "按住 E 取消准备,或输入", "spec.knife_round": "刀局", - "spec.winners_pick": "获胜方选择阵营", + "spec.winners_pick": "获胜即可选边", "spec.you_won_knife": "你们赢下了刀局", "spec.which_side": "选哪个阵营?", "spec.you_lost_knife": "你们输掉了刀局", @@ -207,6 +207,8 @@ "card.team2": "队伍 2", "card.glhf": "祝好运,玩得开心", "card.kind_live": "进行中", + "card.live_title": "比赛开始", + "card.menu_after": "在聊天中输入查看指令", "card.glhf_title": "祝好运,玩得开心", "card.map_head": "第 {number} 张地图", "card.map_kind": "第 {number} 张地图", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "伤害报告:", "dmg.card_round": "第 {round} 回合", - "dmg.card_total": "伤害 {total}", + "dmg.card_total": "造成 {total} 伤害", + "dmg.card_totals": "造成 {total} · 承受 {took}", "admin.practice_on": "练习模式已开启。", "admin.practice_off": "练习模式已关闭。", "admin.mode_idle": "模式已设为空闲(自动练习赛热身已关闭,直到 .ru mode scrim 或换图)。", @@ -527,5 +530,13 @@ "end.col7_title": "道具伤害", "end.col7_body": "高爆手雷和火焰造成的伤害", "end.col8_title": "首杀", - "end.col8_body": "一回合的第一个击杀" + "end.col8_body": "一回合的第一个击杀", + "knife.captain_only": "只有你的队长可以选边。", + "tip.menu": "需要暂停、呼叫管理员或投降?输入 .menu", + "tip.ready_hold": "按住 E 准备。", + "notice.winners_stay": "刀局胜方留在{side}", + "notice.winners_start": "刀局胜方从{side}开始", + "notice.you_chose": "你们选择了 {side}", + "notice.opponents_chose": "对手选择了 {side}", + "notice.you_start": "你们从 {side} 开始" } diff --git a/plugins/match/locales/zh-TW.json b/plugins/match/locales/zh-TW.json index 25c3814c..87357f4e 100644 --- a/plugins/match/locales/zh-TW.json +++ b/plugins/match/locales/zh-TW.json @@ -170,7 +170,7 @@ "spec.hold_ready": "按住 E 準備,或輸入", "spec.hold_unready": "按住 E 取消準備,或輸入", "spec.knife_round": "刀局", - "spec.winners_pick": "獲勝方選擇陣營", + "spec.winners_pick": "獲勝即可選邊", "spec.you_won_knife": "你們贏下了刀局", "spec.which_side": "選哪個陣營?", "spec.you_lost_knife": "你們輸掉了刀局", @@ -207,6 +207,8 @@ "card.team2": "隊伍 2", "card.glhf": "祝好運,玩得開心", "card.kind_live": "進行中", + "card.live_title": "比賽開始", + "card.menu_after": "在聊天中輸入查看指令", "card.glhf_title": "祝好運,玩得開心", "card.map_head": "第 {number} 張地圖", "card.map_kind": "第 {number} 張地圖", @@ -451,7 +453,8 @@ "dmg.col_hp": "HP", "dmg.header": "傷害報告:", "dmg.card_round": "第 {round} 回合", - "dmg.card_total": "傷害 {total}", + "dmg.card_total": "造成 {total} 傷害", + "dmg.card_totals": "造成 {total} · 承受 {took}", "admin.practice_on": "練習模式已開啟。", "admin.practice_off": "練習模式已關閉。", "admin.mode_idle": "模式已設為閒置(自動練習賽熱身已關閉,直到 .ru mode scrim 或換圖)。", @@ -527,5 +530,13 @@ "end.col7_title": "道具傷害", "end.col7_body": "高爆手榴彈和火焰造成的傷害", "end.col8_title": "首殺", - "end.col8_body": "一回合的第一個擊殺" + "end.col8_body": "一回合的第一個擊殺", + "knife.captain_only": "只有你的隊長可以選邊。", + "tip.menu": "需要暫停、呼叫管理員或投降?輸入 .menu", + "tip.ready_hold": "按住 E 準備。", + "notice.winners_stay": "刀局勝方留在{side}", + "notice.winners_start": "刀局勝方從{side}開始", + "notice.you_chose": "你們選擇了 {side}", + "notice.opponents_chose": "對手選擇了 {side}", + "notice.you_start": "你們從 {side} 開始" } diff --git a/plugins/match/readyup/card_html.cpp b/plugins/match/readyup/card_html.cpp index 0bf679cb..c3ece2a4 100644 --- a/plugins/match/readyup/card_html.cpp +++ b/plugins/match/readyup/card_html.cpp @@ -244,7 +244,7 @@ std::string RawTeam(const ResultCardInfo& info, const std::string& which, const std::string GoLiveCardSpec(const GoLiveCardInfo& info, const std::string& lang) { std::string s = SpecLine("id", "golive") + SpecLine("color", "live") + SpecLine("kind", T(lang, "card.kind_live")) + - SpecLine("title", T(lang, "card.glhf_title")); + SpecLine("title", T(lang, "card.live_title")); // "Match is live" (Sivert, 2026-11-24) if (!info.team1.empty() || !info.team2.empty()) { // The names in their side's colour say who is CT and T (2026-11-03: "Simpert (CT) vs Bots (T)"). const int side2 = info.team1Side == 3 ? 2 : info.team1Side == 2 ? 3 : 0; @@ -252,8 +252,8 @@ std::string GoLiveCardSpec(const GoLiveCardInfo& info, const std::string& lang) s += std::string("vs=") + SpecText(info.team1.empty() ? T(lang, "card.team1") : info.team1) + "|" + side(info.team1Side) + "|" + SpecText(info.team2.empty() ? T(lang, "card.team2") : info.team2) + "|" + side(side2) + "\n"; } - if (info.pauses) s += "cmd=" + SpecText(T(lang, "card.tech_pause")) + "|.p\ncmd=" + SpecText(T(lang, "card.timeout")) + "|.tac\n"; - if (info.adminCall) s += "cmd=" + SpecText(T(lang, "card.call_admin")) + "|.admin\n"; + // One short line: "[.menu] in chat for commands" (Sivert, 2026-11-24: not three commands, few words). + s += "cmd=|.menu|" + SpecText(T(lang, "card.menu_after")) + "\n"; return s; } diff --git a/plugins/match/readyup/damage_ledger.cpp b/plugins/match/readyup/damage_ledger.cpp index 7f5ab2ec..33194d7d 100644 --- a/plugins/match/readyup/damage_ledger.cpp +++ b/plugins/match/readyup/damage_ledger.cpp @@ -9,6 +9,9 @@ namespace readyup { void DamageLedger::Reset() { health_.clear(); dealt_.clear(); + self_.clear(); + taken_.clear(); + burning_.clear(); } int DamageLedger::Health(int key) const { @@ -16,7 +19,7 @@ int DamageLedger::Health(int key) const { return it == health_.end() ? 100 : it->second; } -void DamageLedger::OnHurt(int attacker, int victim, int dmgHealth, int healthAfter) { +void DamageLedger::OnHurt(int attacker, int victim, int dmgHealth, int healthAfter, bool burn) { if (victim < 0 || dmgHealth <= 0) return; const int before = std::max(0, Health(victim)); const int after = std::clamp(healthAfter, 0, before); @@ -24,16 +27,39 @@ void DamageLedger::OnHurt(int attacker, int victim, int dmgHealth, int healthAft // four-hit kill of a 100 hp bot (cs, 2026-11-06), and it is the full damage on an overkill. const int actual = before - after; health_[victim] = after; + if (actual > 0) taken_[victim] += actual; + // A fire is one hit, however many ticks it burns for. + bool newHit = true; + if (burn) { + bool& seen = burning_[{attacker, victim}]; + newHit = !seen; + seen = true; + } + if ((attacker < 0 || attacker == victim) && actual > 0) { + Pair& s = self_[victim]; + s.dmg += actual; + if (newHit) s.hits += 1; + } if (attacker < 0 || attacker == victim || actual <= 0) return; Pair& p = dealt_[{attacker, victim}]; p.dmg += actual; - p.hits += 1; + if (newHit) p.hits += 1; } void DamageLedger::OnDeath(int victim) { if (victim >= 0) health_[victim] = 0; } +DamageLedger::Pair DamageLedger::Self(int key) const { + auto it = self_.find(key); + return it == self_.end() ? Pair{} : it->second; +} + +int DamageLedger::Taken(int key) const { + auto it = taken_.find(key); + return it == taken_.end() ? 0 : it->second; +} + DamageLedger::Pair DamageLedger::Dealt(int attacker, int victim) const { auto it = dealt_.find({attacker, victim}); return it == dealt_.end() ? Pair{} : it->second; diff --git a/plugins/match/readyup/damage_ledger.h b/plugins/match/readyup/damage_ledger.h index 0a4ad8a3..dab26cdf 100644 --- a/plugins/match/readyup/damage_ledger.h +++ b/plugins/match/readyup/damage_ledger.h @@ -25,7 +25,10 @@ class DamageLedger { void Reset(); // player_hurt. attacker < 0 (world, fall damage, the bomb) or == victim only moves the // victim's health. healthAfter: the event's `health`. - void OnHurt(int attacker, int victim, int dmgHealth, int healthAfter); + // burn: a fire tick (weapon "inferno": molotov / incendiary). A fire counts as one hit per + // attacker and victim, like CS2's own damage report, not one per tick (2026-11-24: "in 6" + // where CS2 said 3 for a grenade and a molotov). + void OnHurt(int attacker, int victim, int dmgHealth, int healthAfter, bool burn = false); // player_death: the victim has 0 hp for the report. void OnDeath(int victim); @@ -33,12 +36,19 @@ class DamageLedger { int Health(int key) const; // Damage `attacker` did to `victim` this round. Pair Dealt(int attacker, int victim) const; + // Damage `key` did to themselves this round: their own grenades and fire, falling (world). + Pair Self(int key) const; + // All the health `key` lost this round, from anyone. + int Taken(int key) const; // Any damage between different players this round (the caller decides what "enemy" means). bool AnyPlayerDamage() const { return !dealt_.empty(); } private: std::map health_; std::map, Pair> dealt_; // (attacker, victim) + std::map self_; // victim -> own / world damage + std::map taken_; // victim -> all health lost + std::map, bool> burning_; // (attacker, victim) already hit by fire this round }; struct DamageParticipant { diff --git a/plugins/match/readyup/damage_report.cpp b/plugins/match/readyup/damage_report.cpp index 9cd443cc..a8981813 100644 --- a/plugins/match/readyup/damage_report.cpp +++ b/plugins/match/readyup/damage_report.cpp @@ -39,6 +39,7 @@ struct Outgoing { std::vector lines; bool card = false; // the table card on the Auto Tournament HUD instead of chat lines int total = 0; + int took = 0; // all the damage the player took this round struct Row { std::string name, given, taken, hp; // given..hp in `lang` (LocalizeRows) int dmg = 0, took = 0, health = 0, hitsGiven = 0, hitsTaken = 0; @@ -69,6 +70,8 @@ void LocalizeRows(Outgoing& o) { void FillCard(Outgoing& o, const DamageParticipant& self, const std::vector& players, const DamageLedger& ledger) { for (const auto& p : players) { + // Damage on teammates counts in "Dealt X damage" too (Sivert, 2026-11-24); rows stay enemies only. + if (p.key != self.key && p.team == self.team && (p.team == 2 || p.team == 3)) o.total += ledger.Dealt(self.key, p.key).dmg; if (p.key == self.key || (p.team != 2 && p.team != 3) || p.team == self.team) continue; const auto to = ledger.Dealt(self.key, p.key); const auto from = ledger.Dealt(p.key, self.key); @@ -87,7 +90,20 @@ void FillCard(Outgoing& o, const DamageParticipant& self, const std::vector y.dmg : x.took > y.took; }); - if (static_cast(o.rows.size()) > kCardRows) o.rows.resize(kCardRows); + // Your own damage to yourself (own grenades, fire, falling) as a row under your name, last + // (Sivert, 2026-11-24); the header says what you took in all. + o.took = ledger.Taken(self.key); + const auto own = ledger.Self(self.key); + const int keep = kCardRows - (own.hits > 0 ? 1 : 0); + if (static_cast(o.rows.size()) > keep) o.rows.resize(keep); + if (own.hits > 0) { + Outgoing::Row r; + r.name = self.name; + r.dmg = own.dmg; + r.hitsGiven = own.hits; + r.health = ledger.Health(self.key); + o.rows.push_back(std::move(r)); + } LocalizeRows(o); o.card = true; // a round without a fight still gets its card ("0 damage"), not chat lines } @@ -120,7 +136,7 @@ bool ShowCard(const Outgoing& o, int round, double until = 0) { auto txt = [&](const std::string& id, const std::string& v) { h->set_text(k, s, id.c_str(), "text", v.c_str()); }; auto cls = [&](const std::string& id, const char* c, bool on) { h->set_class(k, s, id.c_str(), c, on ? 1 : 0); }; txt("at_kind_a", text::ForLang(o.lang, "dmg.card_round", {{"round", std::to_string(round)}})); - txt("at_text_a", text::ForLang(o.lang, "dmg.card_total", {{"total", std::to_string(o.total)}})); + txt("at_text_a", text::ForLang(o.lang, "dmg.card_totals", {{"total", std::to_string(o.total)}, {"took", std::to_string(o.took)}})); // Column headers in the player's language (at_kit.xml from the next addon publish on; the // published addon has them as fixed English text and ignores these). txt("at_dh_name", text::ForLang(o.lang, "dmg.col_player")); // addon version 2 on @@ -281,7 +297,9 @@ void OnGameEvent(void*, const char* name, const ru_game_event* ev) { const int victim = a->ev_get_player_slot(a->self, ev, "userid"); const int attacker = a->ev_get_player_slot(a->self, ev, "attacker"); const int dmg = a->ev_get_int(a->self, ev, "dmg_health", 0); - g_ledger.OnHurt(attacker, victim, dmg, a->ev_get_int(a->self, ev, "health", 0)); + const char* weapon = a->ev_get_string ? a->ev_get_string(a->self, ev, "weapon", "") : ""; + const bool burn = weapon && std::strcmp(weapon, "inferno") == 0; + g_ledger.OnHurt(attacker, victim, dmg, a->ev_get_int(a->self, ev, "health", 0), burn); if (attacker >= 0 && victim >= 0 && attacker != victim && dmg > 0) { const int ta = TeamOf(attacker), tv = TeamOf(victim); if ((ta == 2 || ta == 3) && (tv == 2 || tv == 3) && ta != tv) g_enemyDamage = true; diff --git a/plugins/match/readyup/golive_card.cpp b/plugins/match/readyup/golive_card.cpp index 4fa518c2..1e5395fe 100644 --- a/plugins/match/readyup/golive_card.cpp +++ b/plugins/match/readyup/golive_card.cpp @@ -200,7 +200,8 @@ void GoLiveCardTick() { : WelcomeActiveFor(slot, h.steamid64) ? "welcome card" : nullptr; if (!skip && screens) { - HudScreensNotice(slot, spec, 1.0); + // HUD off (.hud off): no card; modes.cpp sends them the go-live lines in chat. + if (!HudOffFor(h.steamid64)) HudScreensNotice(slot, spec, 1.0); ++ok; continue; } @@ -236,7 +237,8 @@ void GoLiveCardTick() { } // The same commands in chat too, once at go-live: they stay there to look up after the card is // gone (and they are the only copy when center HTML is unavailable). - if (humans > 0) { + // Not with the HUD's LIVE card: it lists them, and the chat burst was too much (2026-11-24). + if (humans > 0 && !screens) { if (!GoLiveCommandsLine(info, /*html=*/false).empty()) { host::RunOnGameThread([info] { if (const ru_api* a = host::Api()) diff --git a/plugins/match/readyup/hud_screens.cpp b/plugins/match/readyup/hud_screens.cpp index 3b69d92f..0c759aa1 100644 --- a/plugins/match/readyup/hud_screens.cpp +++ b/plugins/match/readyup/hud_screens.cpp @@ -209,7 +209,7 @@ std::string VoteSpec(int slot, uint64_t steamid64, int csTeam, const std::string Line("title", T("vote.gg_title")) + Line("timer", std::to_string(v.ggSecondsLeft)) + Line("counter", HudSpecText(T("vote.gg_counter", {{"votes", std::to_string(v.ggCount)}, {"need", std::to_string(v.ggNeed)}}))) + Line("bw", "s"); if (v.ggVoted) s += Btn(T("vote.yes"), "danger", "picked", "") + Btn(T("vote.no"), "ghost", "off", ""); - else s += Btn(T("vote.yes"), "danger", "", ".gg") + Btn(T("vote.no"), "ghost", "", "#dismiss gg") + Line("mouse", "on"); + else s += Btn(T("vote.yes"), "danger", "", ".gg") + Btn(T("vote.no"), "ghost", "", "#dismiss gg") + Line("mouse", "on") + Line("hold", "1"); return s; } } else if (dis != g_dismissed.end() && dis->second == "gg") { @@ -225,7 +225,7 @@ std::string VoteSpec(int slot, uint64_t steamid64, int csTeam, const std::string return Line("id", "stop") + Line("kind", T("vote.stop_kind")) + Line("title", HudSpecText(T("vote.wants_replay", {{"team", TeamName(v.stopTeam, lang)}}))) + Line("timer", std::to_string(v.stopSecondsLeft)) + Line("bw", "m") + Btn(T("vote.accept"), "green", "", ".stop") + - Btn(T("vote.decline"), "ghost", "", "#dismiss stop") + Line("mouse", "on"); + Btn(T("vote.decline"), "ghost", "", "#dismiss stop") + Line("mouse", "on") + Line("hold", "1"); } } else { const auto d = g_dismissed.find(slot); @@ -308,6 +308,21 @@ bool HudScreensOn() { return h && h->available(); } +bool HudOffFor(uint64_t steamid64) { + const ru_hud_v1* h = Hud(); + if (!h || !steamid64 || h->struct_size < offsetof(ru_hud_v1, player_off) + sizeof(h->player_off) || !h->player_off) + return false; + return h->player_off(steamid64) != 0; +} + +void ChatHudOff(const std::string& key, const i18n::Args& args) { + if (!HudScreensOn()) return; // then everyone gets the chat line already + for (const auto& p : ListHumans()) { + const int slot = p.slot >= 0 ? p.slot : p.userid; + if (slot >= 0 && HudOffFor(p.steamid64)) text::ChatSlot(slot, key, args); + } +} + bool HudMidRound() { // Not while the end-of-map scoreboard is up: the map is over, and its buttons need the cursor. return GetMode() == ReadyUpMode::MatchLive && !MatchFeaturesInFreeze() && !PauseStateGet().paused && !EndScreenActive(); @@ -328,12 +343,18 @@ void HudScreensRun(const std::function& baseF present.insert(slot); std::string spec; auto m = g_menus.find(slot); - if (m != g_menus.end() && (now > m->second.until || mid || m->second.steamid64 != h.steamid64)) { + // A menu stays open through a round start (Sivert, 2026-11-24: a pause or an admin is needed + // mid-round too); W S and hold E need no cursor. + if (m != g_menus.end() && (now > m->second.until || m->second.steamid64 != h.steamid64)) { g_menus.erase(m); m = g_menus.end(); } const std::string lang = i18n::LanguageOf(host::Api(), slot); - if (m != g_menus.end()) spec = MenuSpec(m->second, h.team, lang); + if (m != g_menus.end()) { + spec = MenuSpec(m->second, h.team, lang); + // Menus are the list on the left (hud.so ui_left, v4 Hold E): W S choose, holding E picks. + if (!spec.empty()) spec += Line("where", "left"); + } if (spec.empty()) spec = VoteSpec(slot, h.steamid64, h.team, lang); if (spec.empty()) { std::lock_guard lk(g_noticeMu); @@ -348,7 +369,7 @@ void HudScreensRun(const std::function& baseF } } if (spec.empty()) spec = baseFor(h); - if (!spec.empty() && mid) spec += "chips=1\n"; + if (!spec.empty() && mid && m == g_menus.end()) spec += "chips=1\n"; // a menu keeps its rows hud->screen(slot, spec.c_str(), &OnClick, nullptr); } for (int slot : g_shown) { @@ -393,7 +414,7 @@ void HudScreensUninstall() { } bool HudScreensOpenMenu(int slot, uint64_t steamid64, const std::string& which) { - if (slot < 0 || slot > 63 || !HudScreensOn() || HudMidRound()) return false; + if (slot < 0 || slot > 63 || !HudScreensOn()) return false; // mid-round too const ReadyUpMode mode = GetMode(); if (mode == ReadyUpMode::Practice || mode == ReadyUpMode::External) return false; if (which == "admin" && !IsReadyUpAdmin(steamid64)) return false; @@ -401,6 +422,30 @@ bool HudScreensOpenMenu(int slot, uint64_t steamid64, const std::string& which) return true; } +void ChatUnlessHud(bool hudShows, const std::string& key, const i18n::Args& args) { + if (hudShows) ChatHudOff(key, args); + else text::ChatAll(key, args); +} + +void WarmupMenuTipTick() { + static double next = 0; + const double now = host::NowSeconds(); + if (!Warmup()) { + next = now + 20; // the first tip 20 s into the next warmup + return; + } + if (now < next) return; + next = now + 60; + // Star lines (chat only), one per sentence: "Hold E to ready up." (with the HUD's chip; Sivert, + // 2026-11-24) and the .menu tip. + const bool holdTip = HudScreensOn() && GetMode() == ReadyUpMode::MatchWarmup; + text::ImportantAllFn( + [holdTip](const std::string& lang) { + return (holdTip ? text::ForLang(lang, "tip.ready_hold") + " " : std::string()) + text::ForLang(lang, "tip.menu"); + }, + 0); +} + void HudOutdatedHoldTick() { const ReadyUpMode mode = GetMode(); const bool hold = mode == ReadyUpMode::MatchKnife || mode == ReadyUpMode::MatchLive || diff --git a/plugins/match/readyup/hud_screens.h b/plugins/match/readyup/hud_screens.h index 224cc604..c46e6b3b 100644 --- a/plugins/match/readyup/hud_screens.h +++ b/plugins/match/readyup/hud_screens.h @@ -28,6 +28,14 @@ struct HumanIdentity; // True when the clickable HUD draws the match screens: readyup.cfg hud_screens (default on), and // hud.so is loaded with `screen` and can draw on this CS2 build. Off: the center-HTML panels. bool HudScreensOn(); +// The player turned the custom HUD off (.hud off, or the platform's player setting; hud.so keeps +// it, ru_hud_v1 1.4 player_off). They get the centre panel and the chat lines instead. +bool HudOffFor(uint64_t steamid64); +// What the HUD says, in chat for the players who turned it off (when the HUD is on for the rest). +void ChatHudOff(const std::string& key, const i18n::Args& args = {}); +// A chat line for everyone when the HUD doesn't show it (hudShows false), else only for the players +// who turned the HUD off (.hud off): chat is their whole ready-up UI. +void ChatUnlessHud(bool hudShows, const std::string& key, const i18n::Args& args = {}); // A live round is running (not freeze time, not paused): nothing may take the cursor. bool HudMidRound(); @@ -36,6 +44,8 @@ bool HudMidRound(); // the knife round to the next map's warmup (and in modes another plugin runs) it sets class `hold` // on #ui_ver, and hud.so leaves the pill off. Once a tick, game thread. void HudOutdatedHoldTick(); +// Warmup: every 60 s a chat tip that .menu has pause, admin and forfeit (tip.menu). +void WarmupMenuTipTick(); // One tick: shows every connected human their screen (menu, vote, else baseFor(h); "" = none) // and hides it for players who left. Game thread. diff --git a/plugins/match/readyup/match_plugin.cpp b/plugins/match/readyup/match_plugin.cpp index f1e0b126..6d2e11e3 100644 --- a/plugins/match/readyup/match_plugin.cpp +++ b/plugins/match/readyup/match_plugin.cpp @@ -309,6 +309,7 @@ void OnTick(void*, const ru_tick_info* t) { if (FeatureEnabled(Feature::MatchFlow)) s.Run("golive_card", [] { GoLiveCardTick(); }); s.Run("result_card", [] { ResultCardTick(); }); // map / series result (result_card.h) s.Run("hud_outdated", [] { HudOutdatedHoldTick(); }); // "HUD out of date" in warmup only + s.Run("menu_tip", [] { WarmupMenuTipTick(); }); // ".menu" tip in warmup chat s.Run("admin_call", [] { AdminCallTick(); }); // `.admin` cards for in-game admins (admin_call.h) if (FeatureEnabled(Feature::WelcomeHtml)) s.Run("welcome", [] { WelcomeTick(); }); if (FeatureEnabled(Feature::ReadyHud)) s.Run("ready_hud", [] { ReadyHudTick(); }); // skips welcome cards diff --git a/plugins/match/readyup/match_router.cpp b/plugins/match/readyup/match_router.cpp index 5c61a018..15adfb88 100644 --- a/plugins/match/readyup/match_router.cpp +++ b/plugins/match/readyup/match_router.cpp @@ -322,9 +322,9 @@ void MatchChatCommand(uint64_t steamid64, const std::string& playerName, const s first == ".nr")) { const bool nowReady = first == ".r" || first == ".ready"; const bool was = SetReady(steamid64, nowReady); - if (was != nowReady && !HudReplacesChat()) { - text::ChatAll(nowReady ? "ready.spectator_ready" : "ready.spectator_not_ready", {{"name", playerName}}); - } + if (was != nowReady) + ChatUnlessHud(HudReplacesChat(), nowReady ? "ready.spectator_ready" : "ready.spectator_not_ready", + {{"name", playerName}}); return; } @@ -452,9 +452,9 @@ void MatchChatCommand(uint64_t steamid64, const std::string& playerName, const s Print("ready: %s (%llu) READY %s\n", playerName.c_str(), static_cast(steamid64), progress().c_str()); if (wasReady) { - if (!HudReplacesChat()) text::ChatAll("ready.already_ready", readyArgs()); + ChatUnlessHud(HudReplacesChat(), "ready.already_ready", readyArgs()); } else { - if (!HudReplacesChat()) text::ChatAll("ready.now_ready", readyArgs()); + ChatUnlessHud(HudReplacesChat(), "ready.now_ready", readyArgs()); emitReady(true); } ScrimNoteReadyChanged(); // scrim countdown / go-live runs in ScrimTick @@ -465,9 +465,9 @@ void MatchChatCommand(uint64_t steamid64, const std::string& playerName, const s Print("ready: %s (%llu) NOT READY %s\n", playerName.c_str(), static_cast(steamid64), progress().c_str()); if (!wasReady) { - if (!HudReplacesChat()) text::ChatAll("ready.already_not_ready", readyArgs()); + ChatUnlessHud(HudReplacesChat(), "ready.already_not_ready", readyArgs()); } else { - if (!HudReplacesChat()) text::ChatAll("ready.now_not_ready", readyArgs()); + ChatUnlessHud(HudReplacesChat(), "ready.now_not_ready", readyArgs()); emitReady(false); } ScrimNoteReadyChanged(); @@ -750,6 +750,11 @@ void MatchRuCommand(uint64_t steamid64, const std::string& playerName, const std text::ChatAll("knife.winner_only"); return; } + // A captain set for that team: only they pick. + if (const uint64_t cap = KnifeWinnerCaptain(); cap && cap != steamid64) { + replyKey("knife.captain_only"); + return; + } } if (!KnifeApplySideChoice(choice, steamid64, steamid64 == 0 ? std::string("Console") : playerName, admin)) { replyKey("reply.side_invalid"); diff --git a/plugins/match/readyup/modes.cpp b/plugins/match/readyup/modes.cpp index 424456e9..496cf8dc 100644 --- a/plugins/match/readyup/modes.cpp +++ b/plugins/match/readyup/modes.cpp @@ -604,16 +604,45 @@ static bool ApplyKnifeSideChoiceLocked(State& st, Print("knife: side picked by %s: %s (%s) -> %s; live rules + mp_restartgame 1\n", by.c_str(), c.c_str(), winnerName.c_str(), stayed ? "stay" : "mp_swapteams"); - // Let players know. - text::ChatAll(std::string(pickerName == "timeout" ? "knife.picked_timeout" : "knife.picked") + (stayed ? "_stay" : "_swap"), - {{"team", winnerName}, {"side", *winnerWantsCt ? "CT" : "T"}}); + // Let players know: the Sides card with the HUD, chat without it. + if (!HudScreensOn()) + text::ChatAll(std::string(pickerName == "timeout" ? "knife.picked_timeout" : "knife.picked") + (stayed ? "_stay" : "_swap"), + {{"team", winnerName}, {"side", *winnerWantsCt ? "CT" : "T"}}); if (HudScreensOn()) { const bool timedOut = pickerName == "timeout"; const std::string side = *winnerWantsCt ? "CT" : "T"; - HudScreensNoticeAll(NoticeSpec(std::string("id=sides\ncolor=") + (timedOut ? "muted" : (*winnerWantsCt ? "ct" : "t")) + "\n", - timedOut ? "walkover.time_up" : "notice.sides_chosen", stayed ? "notice.team_stays" : "notice.team_starts", - {}, {{"team", winnerName}, {"side", side}}), - 8.0); + const std::string otherSide = *winnerWantsCt ? "T" : "CT"; + const std::string head = std::string("id=sides\ncolor=") + (timedOut ? "muted" : (*winnerWantsCt ? "ct" : "t")) + "\n"; + const char* kind = timedOut ? "walkover.time_up" : "notice.sides_chosen"; + // Each player reads it from their own team: "You chose CT" / "Opponents chose CT" (Sivert, + // 2026-11-24: "Knife winners start CT" read as nonsense). The swap is still queued, so the + // players are on their knife sides here: team1 had CT in the knife round. + const int winnerKnifeTeam = winnerIsTeam1 ? 3 : 2; + for (const auto& h : ListHumans()) { + const int slot = h.slot >= 0 ? h.slot : h.userid; + if (HudOffFor(h.steamid64)) { + text::ChatSlot(slot, std::string(timedOut ? "knife.picked_timeout" : "knife.picked") + (stayed ? "_stay" : "_swap"), + {{"team", winnerName}, {"side", side}}); + continue; + } + if (h.team != 2 && h.team != 3) { + // Spectators: the team line. A scrim's teams are called CT and T: "CT stays CT" made no sense. + HudScreensNotice(slot, + NoticeSpec(head, kind, + (winnerName == "CT" || winnerName == "T") + ? (stayed ? "notice.winners_stay" : "notice.winners_start") + : (stayed ? "notice.team_stays" : "notice.team_starts"), + {}, {{"team", winnerName}, {"side", side}}), + 8.0); + continue; + } + const bool won = h.team == winnerKnifeTeam; + if (timedOut) + HudScreensNotice(slot, NoticeSpec(head, kind, "notice.you_start", {}, {{"side", won ? side : otherSide}}), 8.0); + else + HudScreensNotice(slot, NoticeSpec(head, kind, won ? "notice.you_chose" : "notice.opponents_chose", {}, {{"side", side}}), + 8.0); + } } return true; } @@ -673,8 +702,7 @@ static void MaybeShowWarmupUiLocked(State& st) { // Periodic chat reminder listing who is not ready yet (cap for spam). Only // when the ready HUD is not on screen: the HUD is the ready-up UI. const auto chatInterval = std::chrono::seconds(12); - if (!ReadyHudShowing() && - (st.lastNotReadyChat.time_since_epoch().count() == 0 || (now - st.lastNotReadyChat) >= chatInterval)) { + if (st.lastNotReadyChat.time_since_epoch().count() == 0 || (now - st.lastNotReadyChat) >= chatInterval) { std::string list; int count = 0; const int maxNames = 6; @@ -699,7 +727,8 @@ static void MaybeShowWarmupUiLocked(State& st) { } if (!list.empty() && rosterTotal > 0 && rosterReady < rosterTotal) { - text::ChatAll("match.waiting_for", + // The ready HUD shows this; players who turned it off get it in chat. + ChatUnlessHud(ReadyHudShowing(), "match.waiting_for", {{"ready", std::to_string(rosterReady)}, {"total", std::to_string(rosterTotal)}, {"names", list}}); st.lastNotReadyChat = now; } @@ -1729,14 +1758,20 @@ void OnMatchRoundStarted() { readyup::persisted_match_state::PersistLiveFlag(true); match_recovery::NoteProgress(); WebhookSetHeartbeatStatus("live"); - text::ChatAll("match.live"); + // With the HUD the LIVE card says it (and .menu has the rules): no chat lines (Sivert, + // 2026-11-24: "why does it spam the chat"). Without it, chat as before. + // Players who turned the HUD off get the chat lines either way (ChatHudOff). + const bool hudSays = HudScreensOn(); + if (!hudSays) text::ChatAll("match.live"); + else ChatHudOff("match.live"); if (const auto ctx = WebhookGetMatchContext()) { const int mapNo = std::max(1, MatchStateGet().map_number); const std::string mapName = mapNo - 1 < static_cast(ctx->maplist.size()) ? ctx->maplist[mapNo - 1] : ""; for (const auto& line : GoLiveRulesLines(mapNo, std::max(1, ctx->num_maps), mapName, ctx->maxRounds, ctx->overtime_enabled, ctx->overtimeSegments, ctx->maxOvertimes, ctx->damageTiebreakEnabled)) { - text::ChatAll(line.key, line.args); + if (!hudSays) text::ChatAll(line.key, line.args); + else ChatHudOff(line.key, line.args); } } GoLiveCardArm("go-live round start", /*restartPending=*/false); // "LIVE · GO GO GO" + commands @@ -2411,7 +2446,17 @@ KnifeHudInfo KnifeHudSnapshot() { out.phase = st.knifePhase; out.winnerCs = st.knifeWinnerCs; out.reasonShort = st.knifeReasonShort; - if (ctxOpt && st.knifePhase == KnifePhase::Picking) out.winnerName = KnifeWinnerNameLocked(st, *ctxOpt); + if (ctxOpt && st.knifePhase == KnifePhase::Picking) { + out.winnerName = KnifeWinnerNameLocked(st, *ctxOpt); + // Only the captain picks when the match names one (Sivert, 2026-11-24). + out.captain = st.knifeWinner == WebhookTeam::Team1 ? ctxOpt->team1_captain_steamid64 + : st.knifeWinner == WebhookTeam::Team2 ? ctxOpt->team2_captain_steamid64 + : 0; + if (out.captain) { + const auto n = ctxOpt->roster_names.find(out.captain); + out.captainName = n != ctxOpt->roster_names.end() && !n->second.empty() ? n->second : out.winnerName; + } + } if (st.knifePhase == KnifePhase::Picking && st.knifePickDeadline.time_since_epoch().count() != 0) { const auto left = std::chrono::duration_cast(st.knifePickDeadline - std::chrono::steady_clock::now()) @@ -2421,6 +2466,8 @@ KnifeHudInfo KnifeHudSnapshot() { return out; } +uint64_t KnifeWinnerCaptain() { return KnifeHudSnapshot().captain; } + const char* KnifeWinnerTeamString() { auto& st = St(); std::lock_guard lk(st.mu); diff --git a/plugins/match/readyup/modes.h b/plugins/match/readyup/modes.h index 755807a0..4f4173ea 100644 --- a/plugins/match/readyup/modes.h +++ b/plugins/match/readyup/modes.h @@ -139,8 +139,12 @@ struct KnifeHudInfo { std::string winnerName; // team name (scrim: "CT"/"T") std::string reasonShort; // "elimination" | "more alive" | "more HP" | "coin flip" int secondsLeft = 0; // pick window + uint64_t captain = 0; // the winning team's captain (match config); 0 = anyone on the team picks + std::string captainName; // their roster name, or the team name when there is none }; KnifeHudInfo KnifeHudSnapshot(); +// The knife-winning team's captain while a side pick is pending (0: none set, or no pick). +uint64_t KnifeWinnerCaptain(); // Non-default `ru_warmup_message_html` text (empty when default/unset). std::string WarmupHtmlCustom(); diff --git a/plugins/match/readyup/ready_hud.cpp b/plugins/match/readyup/ready_hud.cpp index 5919764d..76792c31 100644 --- a/plugins/match/readyup/ready_hud.cpp +++ b/plugins/match/readyup/ready_hud.cpp @@ -494,6 +494,15 @@ static std::string ReadySpec(const Board& b, uint64_t viewer, const std::string& "|" + tName + "|" + std::to_string(std::min(ready[1], 5)) + "|" + std::to_string(std::clamp(total[1], 0, 5)) + "\n"; } const std::string count = std::to_string(b.ready) + " / " + std::to_string(b.total); + // v4 (Hold E): no ready card any more. The chip above the AT logo says the button and the count + // (hud.so where=chip), green once ready; holding E presses it. Spectators and players without a + // button (waiting for the team) still get the small card below. + if (!btn.empty()) { + // One id for both states: the chip updates in place (slides down, turns green) instead of + // fading out and in when you ready up (Sivert, 2026-11-24). + return L("id", "readychip") + L("where", "chip") + L("color", ok ? "live" : "acc") + L("kind", kind) + + L("title", title) + btn + L("counter", count) + L("hold", "1"); + } // Ready: the card shrinks to a one-line pill (dots, count, a small Unready), welcome or not. It // waited for the welcome to end, which starts over at every respawn, so in warmup it stayed big // (2026-11-07). @@ -523,14 +532,24 @@ static bool ViewerTeamShort(const Board& b, uint64_t viewer) { } // Knife: "knives only" before the fight, then the side pick (winners) or the wait (everyone else). -static std::string KnifeSpec(const KnifeHudInfo& k, int viewerSide, const std::string& lang) { +static std::string KnifeSpec(const KnifeHudInfo& k, int viewerSide, uint64_t viewer, const std::string& lang) { if (k.phase == KnifePhase::Starting) { - return L("id", "knife") + L("color", "live") + L("kind", T(lang, "spec.knife_round")) + L("title", T(lang, "spec.winners_pick")); + // Orange, not green: green read as "someone already won" (Sivert, 2026-11-24). Green = done / live. + return L("id", "knife") + L("kind", T(lang, "spec.knife_round")) + L("title", T(lang, "spec.winners_pick")); } const std::string secs = std::to_string(std::max(0, k.secondsLeft)); + if (viewerSide == k.winnerCs && k.captain && viewer != k.captain) { + // The captain picks (a captain is set): the rest of the team only sees who is picking. + return L("id", "captain") + L("color", "live") + L("kind", T(lang, "spec.you_won_knife")) + + L("title", T(lang, "spec.team_picking", {{"team", HudSpecText(k.captainName)}})) + L("timer", secs); + } if (viewerSide == k.winnerCs) { - return L("id", "pick") + L("color", "live") + L("kind", T(lang, "spec.you_won_knife")) + L("title", T(lang, "spec.which_side")) + - L("timer", secs) + "btn=CT|ct||.ct\nbtn=T|t||.t\n" + L("mouse", "on"); + // The menu panel on the left (v4, Hold E): W S choose, holding E picks. The side the team is on + // now comes first, so holding E at once stays. + const std::string rows = viewerSide == 2 ? "btn=T|t||.t\nbtn=CT|ct||.ct\n" : "btn=CT|ct||.ct\nbtn=T|t||.t\n"; + return L("id", "pick") + L("where", "left") + L("color", "live") + L("kind", T(lang, "spec.you_won_knife")) + + L("title", T(lang, "spec.which_side")) + L("timer", secs) + rows + L("mouse", "on") + + L("closerow", "0"); // a choice that must be made: no Close (Sivert, 2026-11-24) } const bool playing = viewerSide == 2 || viewerSide == 3; return L("id", "lost") + L("kind", T(lang, playing ? "spec.you_lost_knife" : "spec.knife_round")) + @@ -551,7 +570,7 @@ static std::string LiveSpec(const LiveHudInfo& l, int viewerSide, const std::str const bool done = mine == WebhookTeam::Team1 ? l.team1Confirmed : l.team2Confirmed; if (done) return s + "btn=" + T(lang, "spec.waiting_for", {{"team", mine == WebhookTeam::Team1 ? t2 : t1}}) + "|ghost|off|\n" + L("bw", "xl"); - return s + "btn=" + T(lang, "spec.btn_unpause") + "|warn|pulse|.up\n" + L("bw", "l") + L("mouse", "on"); + return s + "btn=" + T(lang, "spec.btn_unpause") + "|warn|pulse|.up\n" + L("bw", "l") + L("mouse", "on") + L("hold", "1"); }; if (l.paused && l.pendingFreeze) { // Asked for mid-round: the round goes on until freeze time. Only the pausing team is told, on @@ -673,7 +692,7 @@ void ReadyHudTick() { } // The clickable HUD draws these screens (and menus and votes on top) when it can; the center - // HTML then has nothing to carry. + // HTML then only carries them for players who turned the HUD off. if (enabled && HudScreensOn()) { const Board hudBoard = what == What::Ready ? BuildBoard(mode, ctx, ListHumans()) : Board{}; HudScreensRun([&](const HumanIdentity& h) -> std::string { @@ -691,11 +710,13 @@ void ReadyHudTick() { if (left >= 0 && ViewerTeamShort(hudBoard, h.steamid64)) s += L("timer", std::to_string(left)); return s; } - if (what == What::Knife) return KnifeSpec(knife, h.team, lang); + if (what == What::Knife) return KnifeSpec(knife, h.team, h.steamid64, lang); if (mode == ReadyUpMode::MatchLive) return LiveSpec(live, h.team, lang); return {}; }); g_showing.store(true, std::memory_order_relaxed); + // No centre panel next to the HUD: players who turned it off (.hud off) get chat lines instead + // (ChatUnlessHud; Sivert, 2026-11-24: the old HTML panel should be gone). what = What::None; } if (what == What::None) { diff --git a/plugins/match/readyup/scrim_flow.cpp b/plugins/match/readyup/scrim_flow.cpp index f14d1064..38133a83 100644 --- a/plugins/match/readyup/scrim_flow.cpp +++ b/plugins/match/readyup/scrim_flow.cpp @@ -9,6 +9,7 @@ #include "readyup/logging.h" #include "readyup/match_state.h" #include "readyup/modes.h" +#include "readyup/hud_screens.h" #include "readyup/ready_hud.h" #include "readyup/players.h" #include "readyup/server_settings.h" @@ -220,12 +221,13 @@ static std::string NotReadyNames(const ScrimRoster& roster, int maxNames) { } static void SendReminder(const ScrimRoster& roster, const ScrimCounts& c) { - if (HudReplacesChat()) return; // the ready panel shows this + // The ready HUD shows this; players who turned it off get it in chat. + const bool hud = HudReplacesChat() || ReadyHudShowing(); const std::string waiting = NotReadyNames(roster, 5); text::Args args = ReadyArgs(c); args.emplace_back("names", waiting); - text::ChatAll(waiting.empty() ? "scrim.reminder" : "scrim.reminder_waiting", args); - if (!c.bothSides) text::ChatAll(DevBotsReadyEnabled() ? "scrim.need_both_sides_bots" : "scrim.need_both_sides"); + ChatUnlessHud(hud, waiting.empty() ? "scrim.reminder" : "scrim.reminder_waiting", args); + if (!c.bothSides) ChatUnlessHud(hud, DevBotsReadyEnabled() ? "scrim.need_both_sides_bots" : "scrim.need_both_sides"); } static void CancelCountdownLocked(FlowState& f) { @@ -300,7 +302,7 @@ static void ScrimWarmupStepLocked(FlowState& f, Clock::time_point now, const Scr // note); chat reminders only when it is not on screen. if (IsZero(f.lastReminder) || (now - f.lastReminder) >= kReminderInterval) { f.lastReminder = now; - if (!ReadyHudShowing()) SendReminder(roster, c); + SendReminder(roster, c); } } diff --git a/plugins/match/tests/damage_votes_test.cpp b/plugins/match/tests/damage_votes_test.cpp index 6fe3a130..d7e06bd3 100644 --- a/plugins/match/tests/damage_votes_test.cpp +++ b/plugins/match/tests/damage_votes_test.cpp @@ -43,6 +43,14 @@ static void TestLedger() { l.OnHurt(-1, 2, 10, 90); l.OnHurt(2, 2, 15, 75); CHECK(l.Health(2) == 75 && l.Dealt(2, 2).dmg == 0 && !l.Dealt(-1, 2).hits); + // ...and they are the player's own damage (the card's row under their name) and in what they took. + CHECK(l.Self(2).dmg == 25 && l.Self(2).hits == 2 && l.Taken(2) == 25); + // A fire is one hit, however many ticks: an HE, then a molotov burning three times. + l.OnHurt(8, 9, 30, 70); + l.OnHurt(8, 9, 8, 62, true); + l.OnHurt(8, 9, 8, 54, true); + l.OnHurt(8, 9, 8, 46, true); + CHECK(l.Dealt(8, 9).dmg == 54 && l.Dealt(8, 9).hits == 2 && l.Taken(9) == 54); // A hit on a player with 0 hp left (dead) counts nothing more. l.OnHurt(3, 5, 20, 0); CHECK(l.Dealt(3, 5).dmg == 0 && l.Dealt(3, 5).hits == 0);