Skip to content

антики фантики фанфики - #566

Open
Fooksy2304 wants to merge 4 commits into
makura-games:masterfrom
Fooksy2304:antik
Open

Fooksy2304 wants to merge 4 commits into
makura-games:masterfrom
Fooksy2304:antik

Conversation

@Fooksy2304

@Fooksy2304 Fooksy2304 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

по просьбам игроков полностью функциональный антигост чат
image
проверено, всё работает корректно

🆑 Fooksy2304

  • add: добавлен антигост чат, его не видно за стеной или в гостах, админ-призраки его видят.

Summary by CodeRabbit

  • Новые возможности
    • Добавлен канал «Анти-призрак» в HUD-чате с отдельным названием и цветом.
    • Призраки и игроки в голосовой/недоступной блокировкам зоне теперь получают анти-призрачные сообщения с оформлением.
    • Добавлена консольная команда antighost <текст>, поддерживающая отправку анти-призрачных сообщений.
    • Добавлены локализации и подсказки команды на русском и английском языках.
  • Исправления
    • Сообщения из канала эмоций теперь отправляются как «Анти-призрак», а не командами для обычного поведения.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Добавлена команда antighost: канал эмоций запускает её, сервер проверяет контекст игрока, обрабатывает сообщение, выбирает получателей, отправляет его в канал эмоций и записывает действие в админ-лог.

Changes

Анти-гостовой чат

Layer / File(s) Summary
Клиентское отображение и запуск команды
Content.Client/Chat/Managers/ChatManager.cs, Content.Client/UserInterface/Systems/Chat/Controls/ChannelSelectorButton.cs, Resources/Locale/*-*/_strings/_lust/chat/anti_ghost.ftl
Канал эмоций получает отдельное название и цвет, а отправка сообщений переключается с me на antighost; добавлены локализационные строки.
Консольная команда
Content.Server/_Lust/Chat/Commands/AntiGhostCommand.cs
Команда antighost проверяет игровой контекст, связанную сущность и непустой текст перед вызовом серверной отправки.
Обработка и доставка сообщения
Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs
ChatSystem проверяет источник и ограничения, фильтрует сообщение, определяет интерактивных призраков и игроков в зоне слышимости, отправляет сообщение и добавляет админ-лог.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested labels: 📚 Изменения: Локализация 📚, 🪟 Интерфейс 🪟

Suggested reviewers: kanopus952

Sequence Diagram(s)

sequenceDiagram
  participant ChatManager
  participant AntiGhostCommand
  participant ChatSystem
  participant Recipients
  ChatManager->>AntiGhostCommand: Выполняет antighost с текстом
  AntiGhostCommand->>ChatSystem: Вызывает TrySendAntiGhostMessage
  ChatSystem->>ChatSystem: Проверяет, фильтрует и форматирует сообщение
  ChatSystem->>Recipients: Отправляет anti-ghost сообщение выбранным получателям
Loading
🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive Заголовок шутливый и слишком общий; он не отражает, что PR добавляет анти-ghost чат и новую консольную команду. Переименуйте PR в краткое, но конкретное описание, например: «Добавить анти-ghost чат и команду antighost».
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Ss14 Bridge Sync ✅ Passed PR меняет только чат и локализацию; в diff нет файлов .agents/.agent/.claude/.cursor/.github для rules/skills.
Ss14 Fork/Project Folder Selection ✅ Passed Активный форк — Lust: новый код и локали лежат в _Lust/_lust и помечены Lust edit; vanilla-хуки тоже используют Lust-маркеры.
Ss14 C# Rules ✅ Passed Нарушений SS14 C#-правил не нашёл: имена/_chat корректны, новое fork-коде в _Lust, а ванильные правки помечены Lust edit.
Ss14 Yaml/Ftl Rules ✅ Passed В изменённых FTL-файлах ключи kebab-case, entity-ключей без ent- и опасных multiline/FTL-нарушений нет.
Ss14 Prototype ↔ Ftl Parity ✅ Passed В PR нет изменений Resources/Prototypes или migration.yml; добавлены только FTL-строки чата без ent-* парности.
Ss14 Prediction Safety ✅ Passed В diff нет Content.Shared/** и predicted/input-кода; изменения только в клиентском UI, серверной команде и локалях, так что prediction-hazards не затронуты.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs`:
- Around line 19-38: Разделите проверки и выполнение в
ChatSystem.TrySendAntiGhostMessage: добавьте публичный Can-метод с bool quiet =
false, выполняющий только проверки HasComp<GhostComponent>, CanSendInGame, rate
limit и AttachedEntity без изменения состояния, а Try-метод должен вызывать его,
затем обрабатывать сообщение и возвращать bool об успехе. Сохраните отправку в
отдельном Do-методе согласно цепочке OnEvent → TryDo → CanDo → Do и добавьте ///
<summary> к публичным методам.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0031d8d1-0325-404a-a706-56ba54bcf7f7

📥 Commits

Reviewing files that changed from the base of the PR and between f7e6933 and 6c8ee67.

📒 Files selected for processing (6)
  • Content.Client/Chat/Managers/ChatManager.cs
  • Content.Client/UserInterface/Systems/Chat/Controls/ChannelSelectorButton.cs
  • Content.Server/_Lust/Chat/Commands/AntiGhostCommand.cs
  • Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs
  • Resources/Locale/en-US/_strings/_lust/chat/anti_ghost.ftl
  • Resources/Locale/ru-RU/_strings/_lust/chat/anti_ghost.ftl

Comment thread Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs Outdated
нет мы слушаем тухоллиса блять мы слушаем Тухоллиса неттспенда плейбой карти и кен карсона всё!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs (1)

111-113: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Добавьте устойчивую атрибуцию в admin-log.

Сейчас запись содержит только ToPrettyString(source) и текст сообщения. Для пост-раундового анализа явно сохраните player.UserId, имя сущности и Prototype(source)?.ID; одного EntityUid/форматированного представления недостаточно, поскольку идентификатор сущности после раунда недоступен.

As per coding guidelines: логи должны содержать prototype ID, имя сущности и релевантные идентификаторы для анализа после раунда.

Предлагаемый вариант
+        var entityName = Identity.Name(source, EntityManager);
+        var prototypeId = Prototype(source)?.ID ?? "unknown";
         _adminLogger.Add(LogType.Chat,
             LogImpact.Low,
-            $"Anti-ghost chat from {ToPrettyString(source):Player}: {message}");
+            $"Anti-ghost chat from user {player.UserId}, entity {entityName}, prototype {prototypeId}: {message}");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs` around lines 111 -
113, Update the admin-log entry in the Anti-ghost chat handling to include the
player.UserId, the source entity name, and Prototype(source)?.ID alongside the
existing message and attribution. Preserve the current LogType.Chat and
LogImpact.Low values while making these fields explicit for post-round analysis.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs`:
- Around line 21-24: Translate the XML documentation for the anti-ghost chat
method, including its summary and quiet parameter description, into English.
Apply the same translation to the additional documented block noted in the
review, while leaving inline comments and reason strings unchanged.
- Around line 25-30: Обновите CanSendAntiGhostMessage и вынесите чистую проверку
антигост-доступа в отдельный метод, принимающий источник как
Entity<GhostComponent?> и использующий Resolve(...). Используйте эту проверку в
обеих ветках quiet, сохранив одинаковую валидацию длины сообщения через
CanSendInGame(...) до санитайзера, чтобы quiet=true не разрешал короткое
исходное сообщение, которое затем будет обрезано.

---

Outside diff comments:
In `@Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs`:
- Around line 111-113: Update the admin-log entry in the Anti-ghost chat
handling to include the player.UserId, the source entity name, and
Prototype(source)?.ID alongside the existing message and attribution. Preserve
the current LogType.Chat and LogImpact.Low values while making these fields
explicit for post-round analysis.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 85a3be0c-490a-4703-b4bd-660354a183cc

📥 Commits

Reviewing files that changed from the base of the PR and between 6c8ee67 and 5234805.

📒 Files selected for processing (3)
  • Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs
  • Resources/Locale/en-US/_strings/_lust/chat/anti_ghost.ftl
  • Resources/Locale/ru-RU/_strings/_lust/chat/anti_ghost.ftl

Comment on lines +21 to +24
/// <summary>
/// Проверяет, может ли игрок отправить сообщение в антигост-чат.
/// </summary>
/// <param name="quiet">Не выводить игроку причину отказа.</param>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Переведите XML-документацию на английский.

Новые summary и param написаны на русском, хотя документация в C# должна быть на английском. Русский оставьте для inline-комментариев и reason-фраз; XML-документацию переведите.

As per coding guidelines and path instructions: документация в C# должна быть на английском.

Also applies to: 46-49

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs` around lines 21 -
24, Translate the XML documentation for the anti-ghost chat method, including
its summary and quiet parameter description, into English. Apply the same
translation to the additional documented block noted in the review, while
leaving inline comments and reason strings unchanged.

Sources: Coding guidelines, Path instructions

Comment on lines +25 to +30
public bool CanSendAntiGhostMessage(
EntityUid source,
string message,
IConsoleShell shell,
ICommonSession player,
bool quiet = false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Проверьте реализацию общей проверки и все вызовы quiet-ветки.
rg -n -A60 -B10 'CanSendInGame\s*\(' Content.Server/Chat/Systems/ChatSystem.cs
rg -n --glob '*.cs' 'CanSendAntiGhostMessage\s*\(' .

Repository: space-sunrise/lust-station

Length of output: 9476


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Candidate files =="
fd -a 'ChatSystem\.AntiGhost\.cs|ChatSystem\.cs' Content.Server | sed 's#^\./##'

echo
echo "== ChatSystem.AntiGhost.cs =="
cat -n Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs

echo
echo "== References to TrySendAntiGhostMessage/CanSendAntiGhostMessage =="
rg -n --glob '*.cs' 'TrySendAntiGhostMessage|CanSendAntiGhostMessage|CanSendInGame' Content.Server Content.Shared | sed -n '1,220p'

echo
echo "== Relevant ChatSystem public overrides/API around anti-ghost symbols =="
rg -n --glob '*.cs' 'TrySendAntiGhostMessage|CanSendAntiGhostMessage|IsGhost\(|HasComp<GhostComponent>|MessageCharacterLimit' Content.Server/Chat/Systems/ChatSystem.cs Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs

Repository: space-sunrise/lust-station

Length of output: 7026


Приведите антигост-проверку к общему Entity<T?>-контракту.

CanSendAntiGhostMessage(...) принимает EntityUid, а для чекером с опциональным компонентом правило требует Entity<GhostComponent?> с Resolve(...). Кроме того, quiet = true меняет набор разрешений: при quiet = false возвращается CanSendInGame(...) с проверкой лимита символов, а при quiet = true проверяется длина только через message.Length, поэтому короткое сообщение может получить true и только потом быть отрезано санитайзером. Вынесите чистую проверку антигост-доступа и используйте её из обеих веток, передавая источник через Entity<GhostComponent?>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Content.Server/_Lust/Chat/Systems/ChatSystem.AntiGhost.cs` around lines 25 -
30, Обновите CanSendAntiGhostMessage и вынесите чистую проверку антигост-доступа
в отдельный метод, принимающий источник как Entity<GhostComponent?> и
использующий Resolve(...). Используйте эту проверку в обеих ветках quiet,
сохранив одинаковую валидацию длины сообщения через CanSendInGame(...) до
санитайзера, чтобы quiet=true не разрешал короткое исходное сообщение, которое
затем будет обрезано.

Source: Path instructions

@AlexL1ne

AlexL1ne commented Aug 19, 2026

Copy link
Copy Markdown
Member

Чо-та говно.
Эмоуты заменяются анти-гост системой, т.е. убиваются. ( по крайней мере консольное me )
Что насчёт администрации, которая должна отслеживать нарушения связанные с отыгрышем? Сомнительные фетиши и т.д. и т.п. ?

@matizzze
matizzze self-requested a review August 24, 2026 22:33
@Fooksy2304

Copy link
Copy Markdown
Contributor Author

Агост видит.
Консолька да, недоработал

@Kinar7

Kinar7 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Я против замены стандартных эмоутов сомнительной "анти ГОСТ" системой
Во первых, если игрокам не нравится что госты видят их эмоуты, то могут ерпшить на локалках как адекватные люди
Во вторых, если и делать такую систему то как отдельный чат, НО НЕ КАК НЕ ЗАМЕНУ СУЩЕСТВУЮЩЕГО.

@matizzze

matizzze commented Sep 8, 2026

Copy link
Copy Markdown
Member

рил бред какой то

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants