Фикс акцентов - #195
Conversation
Главное изменение
Prediction / networking
Resources / localization
Validation / risk
WalkthroughТри системы речевых акцентов получили обработку кириллических символов. ChangesОбработка речевых акцентов
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/Speech/EntitySystems/MothAccentSystem.cs`:
- Around line 37-38: Update the RegexLowerZhRus replacement in MothAccentSystem
so each matched lowercase ж sequence is replaced with three lowercase ж
characters, matching the existing uppercase RegexUpperZhRus behavior.
In `@Content.Server/Speech/EntitySystems/OwOAccentSystem.cs`:
- Around line 38-39: В методе Accentuate сохраните существующие латинские замены
r/R и l/L на w/W, а затем добавьте кириллические замены р/Р и л/Л на в/В. Не
удаляйте латинскую обработку, чтобы акцент применялся к русскому и латинскому
тексту.
🪄 Autofix
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: 21e453a3-3697-4e96-a838-6439c11f3929
📒 Files selected for processing (3)
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: YAML map schema validator
- GitHub Check: YAML Linter
- GitHub Check: Test Packaging
🧰 Additional context used
📓 Path-based instructions (6)
**/*.cs
📄 CodeRabbit inference engine (GEMINI.md)
**/*.cs: Keep components data-only and behavior in systems
UseOn... -> Try... -> Can... -> Do...pattern for gameplay actions
PreferEntity<T?>,ProtoId<T>,EntProtoId, and localized strings for type usage
**/*.cs: When writing or editing C# gameplay code, load skills:ss14-ecs-components,ss14-ecs-entities,ss14-ecs-prototypes,ss14-ecs-systems,ss14-events, andss14-prediction.
If the C# change is large or the task needs reviewable notes, load skillss14-documentation-writing.
If the code touches hot paths,Update(), or frequently raised events, load skillss14-standard-optimizations.
If the task adds or changes player-facing text, load skillsss14-localization-stringsandss14-localization-codewhen the change also touchesLoc.GetString(...),LocId, popup text, or localized component fields.
If the task touches network events,NetEntity, replicated state routing, or shared/server/client message flow, load skillss14-netcode.
If the task touchesAppearance,GenericVisualizer, visual state enums, or sprite-layer toggles, load skillss14-graphics-generic-visualizer-appearance.
If the task touches sprites, RSI metadata, overlays, shaders, or custom client visual effects, load skillss14-sprite-overlays-shaders.
If the task is about learning or explaining SS14 architecture, first features, or where code belongs, load skillsss14-prototype-basics,ss14-ecs-basics, andss14-client-server-shared.
If the task is about bug hunting, VV, logs, breakpoints, or runtime inspection, load skillsss14-debugging-workflowandss14-common-api-patterns.
If the task touches common gameplay helpers such as entity-system methods, spawning, prototypes, audio, popups, or random, load skillsss14-common-api-patternsandss14-audiowhen the work changes audio routing, sound assets, sound collections, or predicted sound feedback.
If the task ports code or assets from another repository, or needs license or attribution guidance,...
Files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
+(Content.Shared|Content.Server|Content.Client|Content.Goobstation.Shared|Content.Goobstation.Server|Content.Goobstation.Client|Content.Goobstation.Common|Content.Goobstation.Maths|Content.Goobstation.UIKit|Content.Server.Database|Content.Shared.Database|Content.Tests|Content.IntegrationTests)/**/*.cs
📄 CodeRabbit inference engine (.cursor/rules/ss14-csharp.mdc)
+(Content.Shared|Content.Server|Content.Client|Content.Goobstation.Shared|Content.Goobstation.Server|Content.Goobstation.Client|Content.Goobstation.Common|Content.Goobstation.Maths|Content.Goobstation.UIKit|Content.Server.Database|Content.Shared.Database|Content.Tests|Content.IntegrationTests)/**/*.cs: Apply C# ECS style rules from ss14-interaction-flow.md
Apply ss14-csharp-style.md rules for C# code formatting and conventions
Follow ss14-naming-conventions for variable, method, and type naming in C# gameplay code
Files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
**/*.{cs,xaml,yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
If the task adds tests or you need to choose the right test layer, load skill
ss14-tests-authoring.
Files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
{Content.Server,Content.Goobstation.Server}/**/*.cs
📄 CodeRabbit inference engine (AGENTS.md)
Put main server-only authority and non-predicted server simulation in
Content.Server/; useContent.Goobstation.Server/for features already rooted in that module.
Files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
**/*System.cs
📄 CodeRabbit inference engine (AGENTS.md)
Public entity-system APIs that operate on entities should usually take
Entity<T?>orEntityUidfirst and callResolve(...)early.
Files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
Content.Server/**/*.cs
⚙️ CodeRabbit configuration file
Content.Server/**/*.cs: Review Content.Server for authority and fork-maintenance discipline:
- Server owns authority, persistence, round logic, and non-predicted side effects.
- If a player action should feel immediate, call out missing shared prediction rather than accepting a server-only path.
- Keep upstream diffs narrow and prefer fork-scoped extensions over broad edits to upstream behavior.
- When player-visible behavior changes, check whether matching prototype and locale updates are missing.
Files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
🧠 Learnings (6)
📚 Learning: 2026-06-04T21:17:36.815Z
Learnt from: MataVsn
Repo: ArcaneSS14/arcane-station PR: 31
File: Content.Client/Fluids/PuddleSystem.cs:41-41
Timestamp: 2026-06-04T21:17:36.815Z
Learning: In this repo (ArcaneSS14/arcane-station), reviewers should use the Arcane inline fork-edit marker naming for single-line edits outside `_Arcane` paths: prefer `// Arcane` or `// Arcane-edit` and do not use `// Orion` for this purpose. Repo-specific AGENTS guidance that mentions `// Orion` does not apply to these single-line changes; only `_Arcane` paths follow the applicable different convention.
Applied to files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
📚 Learning: 2026-06-28T19:37:26.732Z
Learnt from: MataVsn
Repo: ArcaneSS14/arcane-station PR: 96
File: Content.Client/IoC/ClientContentIoC.cs:151-151
Timestamp: 2026-06-28T19:37:26.732Z
Learning: For ArcaneSS14/arcane-station C# files whose path is outside any `_Arcane` directories, avoid adding an inline fork marker (e.g., `// Arcane` or `// Arcane-edit`) to `using` directives when the imported namespace already clearly indicates the `_Arcane` fork. For example, if the `using` namespace itself contains `_Arcane` (such as `using Content.Client._Arcane.ERP.Preferences;`), the `// Arcane`/`// Arcane-edit` marker is unnecessary.
Applied to files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
📚 Learning: 2026-07-04T03:37:47.373Z
Learnt from: UmbiMax
Repo: ArcaneSS14/arcane-station PR: 101
File: Content.Goobstation.Server/Chemistry/EntitySystems/EnergyReagentDispenserSystem.cs:59-59
Timestamp: 2026-07-04T03:37:47.373Z
Learning: In ArcaneSS14/arcane-station, C# source files must never have fork-edit markers (e.g., comments like `// Arcane`, `// Arcane-edit`, `// Orion`) on `using` directives. During code review, do not flag existing markers on any `using` line and do not suggest adding/removing them based on `_Arcane` folder placement or whether the imported namespace contains `_Arcane`—this rule applies universally to all `using` statements.
Applied to files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
📚 Learning: 2026-07-28T16:30:37.419Z
Learnt from: UmbiMax
Repo: ArcaneSS14/arcane PR: 133
File: Content.Server/Speech/EntitySystems/StutteringSystem.cs:28-29
Timestamp: 2026-07-28T16:30:37.419Z
Learning: При внесении одиночных fork-правок в репозитории ArcaneSS14/arcane вне путей `_Arcane` добавляйте в конец каждой изменённой строки комментарий-маркер `// Arcane-Edit`. Это нужно для упрощения последующего поиска/обновления подобных правок при код-ревью и синхронизациях.
Applied to files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
📚 Learning: 2026-07-01T17:19:52.100Z
Learnt from: UmbiMax
Repo: ArcaneSS14/arcane-station PR: 101
File: Content.Shared/Mobs/MobState.cs:0-0
Timestamp: 2026-07-01T17:19:52.100Z
Learning: When reviewing ArcaneSS14/arcane-station C# code, ensure all usages of the `MobState` enum (`MobState.Dead`, `MobState.SoftCritical`, `MobState.HardCritical`, `MobState.Critical`) reference the enum members symbolically rather than via hardcoded numeric literals or casts from numeric values (e.g., avoid patterns like `(MobState)4` or `MobState` comparisons to `byte`/`int` literals). Treat direct numeric usage as a code-level dependency that should be flagged. Also avoid persisting `MobState` numeric values in `Content.Server.Database` or `Content.Replay`; if persistence/replay of the raw byte value is introduced, renumbering the `[NetSerializable] MobState : byte` enum becomes a data-compatibility risk. Renumbering the enum is compile-safe as long as there are no numeric literal dependencies, but the remaining risk is network wire-protocol mismatch if mixed old/new client-server builds are running during a rolling update—coordinate deployment to maintain net compatibility.
Applied to files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
📚 Learning: 2026-07-03T18:41:44.286Z
Learnt from: UmbiMax
Repo: ArcaneSS14/arcane-station PR: 101
File: Content.Shared/_Orion/EntityEffects/Effects/Special/ChemConvermol.cs:0-0
Timestamp: 2026-07-03T18:41:44.286Z
Learning: In ArcaneSS14/arcane-station, the hardcoded 1.2f base used by RefreshPartsEvent.GetLinearMultiplier(tier, step, min, max) (Math.Clamp(1.2f - tier * step, min, max)) is an intentional repo-wide balance convention: callers typically pass max: 1.2f, so a tier-1 part yields a 10% penalty (e.g., GetLinearMultiplier(tier: 1, step: 0.1f, min: 0.5f, max: 1.2f) => 1.1), while tier-2 is the neutral baseline. Do not flag the hardcoded 1.2f as a bug when reviewing shared multiplier/linear scaling usage. If a specific system needs a tier-1 baseline that produces 0% penalty instead, implement a locally-scoped formula in that system (e.g., adjust the constant to match the desired neutral baseline) rather than changing the shared helper, since modifying it would affect all callers’ balance.
Applied to files:
Content.Server/Speech/EntitySystems/LizardAccentSystem.csContent.Server/Speech/EntitySystems/MothAccentSystem.csContent.Server/Speech/EntitySystems/OwOAccentSystem.cs
🔇 Additional comments (3)
Content.Server/Speech/EntitySystems/LizardAccentSystem.cs (1)
16-25: LGTM!Also applies to: 47-60
Content.Server/Speech/EntitySystems/MothAccentSystem.cs (1)
13-18: LGTM!Content.Server/Speech/EntitySystems/OwOAccentSystem.cs (1)
53-53: LGTM!
| message = RegexLowerZhRus.Replace(message, "ж"); | ||
| message = RegexUpperZhRus.Replace(message, "ЖЖЖ"); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Исправьте замену строчной ж.
RegexLowerZhRus сопоставляет одну или несколько ж, но результатом всегда становится одна ж. Поэтому строчные сообщения не получают жужжащий акцент. Верхний регистр уже заменяется на три символа.
Предлагаемое исправление
- message = RegexLowerZhRus.Replace(message, "ж");
+ message = RegexLowerZhRus.Replace(message, "жжж");Основание: цель PR требует русское жужжание для MothAccentSystem.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| message = RegexLowerZhRus.Replace(message, "ж"); | |
| message = RegexUpperZhRus.Replace(message, "ЖЖЖ"); | |
| message = RegexLowerZhRus.Replace(message, "жжж"); | |
| message = RegexUpperZhRus.Replace(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/Speech/EntitySystems/MothAccentSystem.cs` around lines 37 -
38, Update the RegexLowerZhRus replacement in MothAccentSystem so each matched
lowercase ж sequence is replaced with three lowercase ж characters, matching the
existing uppercase RegexUpperZhRus behavior.
| .Replace("р", "в").Replace("Р", "В") | ||
| .Replace("л", "в").Replace("Л", "В"); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Сохраните существующие латинские замены.
Из Accentuate удалены замены r/R и l/L на w/W. Поэтому латинский текст больше не получает прежний OwO-акцент. Метод по-прежнему обрабатывает речевые события, а Content.Server/Administration/Commands/OwoifyCommand.cs также применяет его к именам и описаниям сущностей.
Добавьте кириллические замены после существующих латинских, а не заменяйте ими старое поведение.
Предлагаемое исправление
return message.Replace("!", _random.Pick(Faces))
+ .Replace("r", "w").Replace("R", "W")
+ .Replace("l", "w").Replace("L", "W")
.Replace("р", "в").Replace("Р", "В")
.Replace("л", "в").Replace("Л", "В");Основание: PR описывает добавление русских замен; Content.Server/Administration/Commands/OwoifyCommand.cs вызывает Accentuate для имени и описания сущности.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .Replace("р", "в").Replace("Р", "В") | |
| .Replace("л", "в").Replace("Л", "В"); | |
| .Replace("r", "w").Replace("R", "W") | |
| .Replace("l", "w").Replace("L", "W") | |
| .Replace("р", "в").Replace("Р", "В") | |
| .Replace("л", "в").Replace("Л", "В"); |
🤖 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/Speech/EntitySystems/OwOAccentSystem.cs` around lines 38 - 39,
В методе Accentuate сохраните существующие латинские замены r/R и l/L на w/W, а
затем добавьте кириллические замены р/Р и л/Л на в/В. Не удаляйте латинскую
обработку, чтобы акцент применялся к русскому и латинскому тексту.
| .Replace("r", "w").Replace("R", "W") | ||
| .Replace("l", "w").Replace("L", "W"); | ||
| .Replace("р", "в").Replace("Р", "В") | ||
| .Replace("л", "в").Replace("Л", "В"); |
Описание PR
Пофиксил некоторые расовые акценты.
Медиа
Тип PR
Лицензионное соглашение
Изменения
🆑 seemah