Добавление нового объекта 933. Его механики#954
Добавление нового объекта 933. Его механики#954helper342 wants to merge 32 commits intospace-sunrise:masterfrom
Conversation
Refactor code structure for improved readability and maintainability
…ocalization; remove unused server-side code and enhance face erasure logic for victims.
Refactor SCP-933 master system to improve interaction mechanics and l…
Cursor/scp 933 victims d9b6c
Rename controlled component to Scp933FaceTornComponent; trim master component; update en-US strings. Includes staged RSI meta change. Made-with: Cursor
Made-with: Cursor
Deletes Content.Server._Scp/Scp9332 orphan file; real 933 is Content.Server/_Scp/Scp933 only. Made-with: Cursor
Cursor/scp 933 victims d9b6c
…ity with do-after events. Added sound effects for applying and removing tape, and updated dependencies for interaction and audio systems. Removed outdated update logic and improved event handling for tape application and removal.
Refactor Scp933MasterSystem to implement full SCP-933 tape functional…
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 10 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughДобавлена новая система игровой механики SCP-933, основанная на изоленте. Реализованы компоненты для отслеживания состояния ленты, её применения и удаления. Добавлены серверные системы для управления взаимодействиями и состояниями жертв. Включены прототипы сущностей, спрайты и локализация на английском и русском языках. Changes
Sequence Diagram(s)sequenceDiagram
participant User as Пользователь
participant TapeSystem as Scp933TapeSystem
participant Target as Цель (Humanoid)
participant MasterSystem as SharedScp933MasterSystem
participant Components as Компоненты
User->>TapeSystem: Использует DuctTape
TapeSystem->>TapeSystem: TryPeelTape()
TapeSystem->>Components: Создаёт Scp933PeelTapeDoAfterEvent
TapeSystem->>User: Показывает PopUp (начало снятия)
Note over TapeSystem: Ожидание завершения DoAfter
TapeSystem->>TapeSystem: OnPeelTapeDoAfter (завершение)
TapeSystem->>Components: Спавнит TapeMask прототип
TapeSystem->>Components: Уменьшает UseCount
TapeSystem->>User: Воспроизводит PullFromRollSound
User->>TapeSystem: Взаимодействует с Target (с маской)
TapeSystem->>TapeSystem: TryApplyTape()
TapeSystem->>Components: Создаёт Scp933ApplyTapeDoAfterEvent
TapeSystem->>User: Показывает PopUp (начало применения)
Note over TapeSystem: Ожидание завершения DoAfter
TapeSystem->>Target: Экипирует маску в слот "mask"
TapeSystem->>Components: Добавляет TapedFaceComponent
TapeSystem->>Components: Скрывает слои лица (Eyes, Snout)
TapeSystem->>Components: Добавляет MutedComponent
TapeSystem->>Target: Воспроизводит ApplyToFaceSound
User->>TapeSystem: Взаимодействует RipTape с Target
TapeSystem->>TapeSystem: TryRipTape()
TapeSystem->>Components: Создаёт Scp933RipTapeDoAfterEvent
TapeSystem->>User: Показывает PopUp (начало снятия)
Note over TapeSystem: Ожидание завершения DoAfter
TapeSystem->>TapeSystem: OnRipTapeDoAfter (завершение)
alt Режим Emergency
TapeSystem->>MasterSystem: ConvertToMaster()
MasterSystem->>Components: Добавляет Scp933MasterComponent
MasterSystem->>MasterSystem: EraseFaceFor933()
TapeSystem->>MasterSystem: ApplyHostBuffs()
else Обычный режим
TapeSystem->>MasterSystem: ApplyFaceTornAfterRip()
MasterSystem->>Components: Добавляет Scp933FaceTornComponent
MasterSystem->>MasterSystem: Скрывает лицо жертвы
end
TapeSystem->>Components: Удаляет маску (unequip)
TapeSystem->>Target: Показывает успех PopUp
sequenceDiagram
participant MasterSystem as SharedScp933MasterSystem
participant Master as Сущность-Master
participant Victim as Жертва (Face Torn)
participant Components as Компоненты
Note over MasterSystem: ComponentStartup: Scp933MasterComponent
MasterSystem->>MasterSystem: EraseFaceFor933()
MasterSystem->>Components: Скрывает слои лица Master
MasterSystem->>Master: Показывает PopUp (хозяин появился)
loop Каждая жертва в FaceTornVictims
Note over MasterSystem: ComponentShutdown: Scp933FaceTornComponent
MasterSystem->>Victim: Проверяет MutedComponent
MasterSystem->>Victim: Удаляет MutedComponent (если применена)
MasterSystem->>Master: Удаляет жертву из FaceTornVictims
end
Note over MasterSystem: MobStateChangedEvent (Victim → Dead)
MasterSystem->>Victim: Удаляет Scp933FaceTornComponent
MasterSystem->>Components: Вызывает ComponentShutdown цепь
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (3 errors, 1 warning)
✅ 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 |
|
Всё заяц, сиди ещё час |
|
Ух еба, даже заяц не ноет |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Content.Server/_Scp/Scp933/Scp933MasterSystem.cs`:
- Around line 319-323: Здесь мы модифицируем tapeMask.EmergencyRipAvailable
после того, как та же сущность помечена на удаление (removed -> QueueDel),
поэтому изменение не сохранится; переместите присвоение
tapeMask.EmergencyRipAvailable = false так, чтобы оно выполнялось до вызова
QueueDel(removed.Value) (или, если флаг должен быть глобальным, вместо изменения
tapeMask установите/сбросьте соответствующий системный флаг в
Scp933MasterSystem), и убедитесь, что вы используете тот же объект tapeMask (и
проверяете args.EmergencyMode) перед удалением, чтобы изменение вступило в силу.
- Around line 65-66: Remove the redundant TryComp<DuctTapeComponent> call since
`tape` is already an Entity<DuctTapeComponent> and its component is accessible
via `tape.Comp`; replace the TryComp usage with a null-check (or guard) on
`tape.Comp` and return if it is null, ensuring any subsequent uses reference
`tape.Comp` directly (refer to the variable `tape`, the component type
`DuctTapeComponent`, and the existing TryComp<DuctTapeComponent> call to locate
the code).
- Around line 99-100: В методе OnPeelTapeDoAfter есть лишний вызов
TryComp<DuctTapeComponent> для переменной tape; удалите этот дублирующий TryComp
и вместо него используйте уже полученный компонент (ductTape) из предыдущей
проверки/контекста или выполните единственный TryComp в согласованном месте,
чтобы избежать повторного запроса компонента DuctTapeComponent для сущности
tape.
- Around line 172-173: Remove the redundant TryComp check: the variable tapeMask
is an Entity<Scp933TapeMaskComponent> and always has the component, so delete
the if (!TryComp<Scp933TapeMaskComponent>(tapeMask, out _)) return; guard in
Scp933MasterSystem (remove the TryComp call and early return) and use the
component directly where needed (e.g., access via the entity/typed variable or
Comp/GetComponent calls that assume presence).
In `@Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs`:
- Around line 76-90: EraseFaceFor933 currently calls
_humanoid.SetLayerVisibility eight times which can trigger Dirty() repeatedly;
change to use a batched update by using the SetLayerVisibility overload that
accepts a ref bool dirty (or otherwise accumulate a dirty flag) — e.g. create a
local bool dirty = false, call _humanoid.SetLayerVisibility(humanoidEnt,
HumanoidVisualLayers.Eyes, false, ref dirty) for each layer (Eyes, Snout, Head,
Hair, FacialHair, HeadTop, HeadSide, SnoutCover), then after the loop call the
single dirty commit method (e.g. _humanoid.Dirty(humanoidEnt) or the API's
equivalent) if dirty is true so only one Dirty() is emitted; keep references to
EraseFaceFor933, _humanoid.SetLayerVisibility, HumanoidVisualLayers and the
Entity<HumanoidAppearanceComponent?> usage to locate the code.
- Around line 162-165: Метод Clone() в Scp933RipTapeDoAfterEvent не должен
возвращать this — нужно вернуть новый экземпляр с копией состояния; измените
реализацию метода Clone() (в классе Scp933RipTapeDoAfterEvent / метод Clone)
чтобы создавать и возвращать новый объект и скопировать все мутируемые поля
(минимум ExpectedMask и EmergencyMode) и при необходимости другие наследуемые
поля/идентификаторы, вместо возвращения this, чтобы избежать повреждения данных
при сериализации/параллельной обработке.
In `@Resources/Locale/ru-RU/_prototypes/_scp/entities/objects/scp/scp933.ftl`:
- Around line 1-22: This file uses general keys like scp933-duct-tape,
scp933-master-desc, scp933-apply-success-user, etc., but prototype files must
use the ent-{PrototypeID} schema and prototype attributes; rename these keys to
the prototype format (e.g., ent-scp933, ent-scp933.desc for the prototype
description and ent-scp933.suffix where applicable) and convert per-item
prototype attributes to .desc/.suffix forms (replace scp933-duct-tape ->
ent-scp933.duct-tape or ent-scp933.duct-tape.desc as appropriate); move shared
runtime strings (like tape/equip/fail/peel messages such as scp933-tape-already,
scp933-tape-equip-fail, scp933-peel-start, scp933-apply-success-target, etc.)
out of this _prototypes file into the common runtime locale (e.g.,
Resources/Locale/ru-RU/_Scp/ or equivalent) so only prototype-specific metadata
remains here.
- Around line 1-22: Fix Russian typos and clarify target-action wording while
keeping parser-safe, lowercase item names: change scp933-duct-tape and
scp933-tape-mask values to start with lowercase (e.g., "изолента", "ленточка
изоленты"); correct spelling in scp933-master-desc ("первая жертва" or
"первая/основная жертва" instead of "первинная"), scp933-tape-equip-fail ("Лента
тут не прикрепляется" or "Лента не прикрепляется здесь" instead of "Лента не
крепиться здесь"), scp933-peel-hand-fail ("скручивается" instead of
"скручиваеться") and any other misspellings; change scp933-apply-start from "Вы
начинаете заклеивать своё лицо." to a target-focused phrase like "Вы начинаете
заклеивать лицо цели." to avoid implying self-action; ensure all edited strings
remain grammatically correct, consistent in meaning with other keys
(scp933-apply-success-user, scp933-apply-success-target,
scp933-victim-face-torn) and contain no extra punctuation that could break the
parser.
In `@Resources/Prototypes/_Scp/Entities/Clothing/Masks/masks.yml`:
- Around line 40-45: Добавьте в файлы локализации ru-RU и en-US отсутствующие
ключи для прототипа ClothingMaskScp933Tape: как минимум
ent-ClothingMaskScp933Tape, ent-ClothingMaskScp933Tape.desc и, если требуется по
шаблону, ent-ClothingMaskScp933Tape.suffix; поместите в соответствующие .ftl
файлы переводы названия и описания (русский и английский) и убедитесь, что имена
ключей точно совпадают с id прототипа ClothingMaskScp933Tape и со схемой
локализации, используемой для других масок (например с префиксом ent- и
суффиксом .desc/.suffix).
In `@Resources/Prototypes/_Scp/Entities/Objects/Scp/scp933.yml`:
- Line 1: Remove the redundant fork marker "# Fire added" from scp933.yml in the
_Scp/Entities/Objects/Scp directory because this is a new fork-only file and
fork markers are only required when modifying upstream files; open scp933.yml,
delete the leading comment line containing "# Fire added" (ensure any intended
Russian description remains intact) and save the file so the file no longer
begins with the fork marker.
🪄 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
Run ID: 05fa677f-13e2-435d-afa5-c430aafe67e1
⛔ Files ignored due to path filters (7)
Resources/Audio/_Scp/Scp933/ducttape.oggis excluded by!**/*.oggResources/Audio/_Scp/Scp933/peeloff.oggis excluded by!**/*.oggResources/Textures/_Scp/Objects/Scp/scp-933.rsi/equipped.pngis excluded by!**/*.pngResources/Textures/_Scp/Objects/Scp/scp-933.rsi/peel.pngis excluded by!**/*.pngResources/Textures/_Scp/Objects/Scp/scp-933.rsi/tape.pngis excluded by!**/*.pngResources/Textures/_Scp/Structures/Wallmounts/scp-posters.rsi/scp933.pngis excluded by!**/*.pngResources/Textures/_Scp/Structures/Wallmounts/signs-directional.rsi/933.pngis excluded by!**/*.png
📒 Files selected for processing (16)
Content.Server/_Scp/Scp933/Scp933MasterSystem.csContent.Shared/_Scp/Scp933/DuctTapeComponent.csContent.Shared/_Scp/Scp933/Scp933FaceTornComponent.csContent.Shared/_Scp/Scp933/Scp933MasterComponent.csContent.Shared/_Scp/Scp933/Scp933MasterSystem.csContent.Shared/_Scp/Scp933/Scp933PendingHostComponent.csContent.Shared/_Scp/Scp933/Scp933TapeMaskComponent.csContent.Shared/_Scp/Scp933/TapedFaceComponent.csContent.Shared/_Scp/Scp933/TapedFaceSystem.csResources/Locale/en-US/_Scp/scp933.ftlResources/Locale/ru-RU/_prototypes/_scp/entities/objects/scp/scp933.ftlResources/Prototypes/_Scp/Entities/Clothing/Masks/masks.ymlResources/Prototypes/_Scp/Entities/Objects/Scp/scp933.ymlResources/Textures/_Scp/Objects/Scp/scp-933.rsi/meta.jsonResources/Textures/_Scp/Structures/Wallmounts/scp-posters.rsi/meta.jsonResources/Textures/_Scp/Structures/Wallmounts/signs-directional.rsi/meta.json
Co-authored-by: ThereDrD <88589686+ThereDrD0@users.noreply.github.com>
|
@ThereDrD0 Что там? |
|
@coderabbitai Что там с ПРом, всё чисто? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 33440
Статус PR: 🔴 Запрошены изменения ( CI-проверки: ✅ Label, ✅ Diff RSI — всё зелёное. Из моих 10 комментариев 4 уже закрыты, но ~6 остаются открытыми:
Пункт #2 (Clone возвращает |
|
@coderabbitai Где ты тут нашёл лишний форк маркер SCP-933 - Duct Tape SystemSCP-933-01: The Duct Tape Item
SCP-933-02: The Tape Master (Faceless Entity)
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 22
Актуальные открытые замечания — это пункты #1–#5 из таблицы выше (батчинг в (。•́︿•̀。) |
|
@coderabbitai А ну читай опять. Я всё давным давно исправил |
|
Ебать бот, даже не видит новый коммит, нужно пальчиком указывать |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainСейчас проверю текущее состояние файлов. 🏁 Script executed: Length of output: 6469 Проверяю полностью — одну секунду. 🏁 Script executed: Length of output: 1266
Все замечания устранены. |
ThereDrD0
left a comment
There was a problem hiding this comment.
Плюс предыдущее ревью не было сделано до конца, доделывай
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Content.Server/_Scp/Scp933/Scp933TapeSystem.cs`:
- Around line 270-283: В текущем DoAfter-инициализаторе (DoAfterArgs с
Scp933ApplyTapeDoAfterEvent, передаваемый tapeMask и target: victim) отсутствует
прерывание при перемещении цели, поэтому действие завершается даже если жертва
уходит; добавьте в объект инициализации свойство BreakOnTargetMove = true. То же
самое исправьте в втором DoAfter (тот, что использует
Scp933RemoveTapeDoAfterEvent / связанный tapeMask и target: victim в блоке
~343-357): установить BreakOnTargetMove = true в инициализаторе DoAfterArgs
рядом с BreakOnMove/BreakOnDamage/и т.д.
- Around line 169-185: Сделайте так, чтобы SCP-933 снимал только собственный
mute: добавьте уникальный маркер-компонент (например Scp933MutedTagComponent) и
в OnTapeMaskGotEquipped (и в логике, где накладывается mute при порванном лице)
ставьте одновременно EnsureComp<MutedComponent>(...) и
EnsureComp<Scp933MutedTagComponent>(...). В OnTapeMaskGotUnequipped проверяйте
только наличие этого маркера (HasComp<Scp933MutedTagComponent>(args.Equipee)) и
при его наличии удаляйте RemComp<Scp933MutedTagComponent>(args.Equipee) и только
затем RemComp<MutedComponent>(args.Equipee); не выполняйте
RemComp<MutedComponent> если маркер отсутствует. Это гарантирует, что вы не
удалите чужой mute; примените тот же паттерн в ветке с Scp933FaceTornComponent.
- Around line 99-144: Extract all permission and emergency-mode logic and popup
decisions out of OnHumanoidInteractHand into two methods: CanRipTape and
TryRipTape. Implement CanRipTape(user, targetUid, out string popupMessage, out
bool emergencyMode) to encapsulate checks for HasComp<Scp933MasterComponent>,
_master.HasAnyScp933Host(), TryGetScp933TapeMask,
TryComp<Scp933TapeMaskComponent>, and EmergencyRipAvailable and return a clear
denial popupMessage when not allowed. Implement TryRipTape(user, targetUid, out
DoAfterEventArgs doAfter) to call CanRipTape, set emergencyMode accordingly,
create the doAfter if allowed, and return true/false. Finally simplify
OnHumanoidInteractHand to only check args.Handled, call TryRipTape(args.User,
target.Owner, out var doAfter), start _doAfter.TryStartDoAfter(doAfter), show
the "scp933-rip-start" popup and set args.Handled; remove all moved
checks/popups from the handler.
In `@Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs`:
- Around line 65-70: The handler OnFaceTornMobStateChanged removes
Scp933FaceTornComponent on death but runs on clients too; guard the mutation by
checking the network role and only call RemComp<Scp933FaceTornComponent>(ent)
when _net.IsServer is true (e.g., early-return when !_net.IsServer or wrap the
RemComp call inside if (_net.IsServer) { ... }) so only the server mutates
component state.
In `@Resources/Locale/en-US/_prototypes/entities/clothing/masks/masks.ftl`:
- Around line 84-85: The new FTL entry ent-ClothingMaskScp933Tape (.desc) was
added without the required fork marker; update the masks.ftl block by adding the
Fire fork marker (e.g., add a line with "# Fire edit" or "# Fire added")
immediately above the ent-ClothingMaskScp933Tape entry so the
ent-ClothingMaskScp933Tape and its .desc are properly annotated per the
repository guideline.
In `@Resources/Locale/ru-RU/_prototypes/entities/clothing/masks/masks.ftl`:
- Around line 88-89: The new FTL key ent-ClothingMaskScp933Tape (and its .desc)
was added without the required Fire fork marker; update the ru-RU masks.ftl by
adding the appropriate "# Fire edit" marker at the top of this edit block (or
immediately above the ent-ClothingMaskScp933Tape entry) so the file uses the
mandated "# Fire edit" format for FTL changes, leaving the key name and .desc
text intact.
In `@Resources/Locale/ru-RU/_strings/_scp/scp/scp933.ftl`:
- Line 13: Строка локали с ключом scp933-rip-master-only содержит внеигровую
подсказку, добавьте префикс "OOC: " перед текстом значения (т.е. превратите
"Только текущая первая жертва может выполнить финальный ритуал срыва." в строку,
начинающуюся с "OOC: "), чтобы явно пометить её как OOC согласно правилам для
Resources/Locale/**/*.ftl.
🪄 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
Run ID: 46bcc2a8-9d19-4f9c-8fca-d3fe8f4f234e
📒 Files selected for processing (14)
Content.Server/_Scp/Scp933/Scp933MasterSystem.csContent.Server/_Scp/Scp933/Scp933TapeSystem.csContent.Shared/_Scp/Scp933/DuctTapeComponent.csContent.Shared/_Scp/Scp933/Scp933MasterComponent.csContent.Shared/_Scp/Scp933/Scp933MasterSystem.csContent.Shared/_Scp/Scp933/Scp933TapeMaskComponent.csContent.Shared/_Scp/Scp933/TapedFaceSystem.csResources/Locale/en-US/_prototypes/_scp/entities/objects/scp/scp933.ftlResources/Locale/en-US/_prototypes/entities/clothing/masks/masks.ftlResources/Locale/ru-RU/_prototypes/_scp/entities/objects/scp/scp933.ftlResources/Locale/ru-RU/_prototypes/entities/clothing/masks/masks.ftlResources/Locale/ru-RU/_strings/_scp/scp/scp933.ftlResources/Prototypes/_Scp/Entities/Clothing/Masks/masks.ymlResources/Prototypes/_Scp/Entities/Objects/Scp/scp933.yml
|
Почему ClothingMaskScp933Tape находится по пути |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
Content.Server/_Scp/Scp933/Scp933TapeSystem.cs (1)
142-159:⚠️ Potential issue | 🟠 MajorНе снимайте
MutedComponentбез собственного маркера SCP-933.Если цель уже была заглушена другой механикой, вы всё равно ставите
MutedByScp933 = true, а на снятии маски безусловно делаетеRemComp<MutedComponent>. Это удалит чужой mute. Здесь нужен отдельный маркер/учёт причины, и тот же паттерн надо применить в веткеApplyFaceTornAfterRip/OnFaceTornShutdown.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/_Scp/Scp933/Scp933TapeSystem.cs` around lines 142 - 159, You currently add/remove MutedComponent unconditionally which can remove mutes applied by other systems; instead add a dedicated marker component (e.g., Scp933MutedComponent) when you mute in ApplyTapeMask/OnTapeMaskGotEquipped and only remove the shared MutedComponent if that marker is present on the target. Concretely: when muting (EnsureComp<MutedComponent>(...), tapeMask.Comp.MutedByScp933 = true) also AddComp<Scp933MutedComponent>(args.Equipee) (do not skip adding the marker even if MutedComponent already existed); when unmuting (OnTapeMaskGotUnequipped and in ApplyFaceTornAfterRip / OnFaceTornShutdown) check HasComp<Scp933MutedComponent>(args.Equipee) before calling RemComp<MutedComponent>, then Remove the marker and clear tapeMask.Comp.MutedByScp933/Dirty as before; apply the same marker-check pattern in both face-torn methods.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs`:
- Around line 62-63: После удаления элемента из коллекции FaceTornVictims в
Scp933MasterComponent пометьте компонент как изменённый для сетевой
синхронизации: в блоке где проверяется TryComp<Scp933MasterComponent>(bearer,
out var master) и выполняется master.FaceTornVictims.Remove(ent) вызовите
Dirty(bearer, master) (или Dirty(ent) если уместно) сразу после Remove, чтобы
изменения коллекции были отправлены клиентам.
---
Duplicate comments:
In `@Content.Server/_Scp/Scp933/Scp933TapeSystem.cs`:
- Around line 142-159: You currently add/remove MutedComponent unconditionally
which can remove mutes applied by other systems; instead add a dedicated marker
component (e.g., Scp933MutedComponent) when you mute in
ApplyTapeMask/OnTapeMaskGotEquipped and only remove the shared MutedComponent if
that marker is present on the target. Concretely: when muting
(EnsureComp<MutedComponent>(...), tapeMask.Comp.MutedByScp933 = true) also
AddComp<Scp933MutedComponent>(args.Equipee) (do not skip adding the marker even
if MutedComponent already existed); when unmuting (OnTapeMaskGotUnequipped and
in ApplyFaceTornAfterRip / OnFaceTornShutdown) check
HasComp<Scp933MutedComponent>(args.Equipee) before calling
RemComp<MutedComponent>, then Remove the marker and clear
tapeMask.Comp.MutedByScp933/Dirty as before; apply the same marker-check pattern
in both face-torn methods.
🪄 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
Run ID: 75e9773c-c31b-4d70-b886-f86725f9d6b1
📒 Files selected for processing (7)
Content.Server/_Scp/Scp933/Scp933MasterSystem.csContent.Server/_Scp/Scp933/Scp933TapeSystem.csContent.Shared/_Scp/Scp933/Scp933FaceTornComponent.csContent.Shared/_Scp/Scp933/Scp933MasterComponent.csContent.Shared/_Scp/Scp933/Scp933MasterSystem.csContent.Shared/_Scp/Scp933/Scp933MutedTagComponent.csContent.Shared/_Scp/Scp933/Scp933TapeMaskComponent.cs
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (2)
Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs (1)
145-161: 🧹 Nitpick | 🔵 TrivialРассмотрите использование
SimpleDoAfterEventбез ручногоClone().Для событий без состояния (
Scp933PeelTapeDoAfterEvent,Scp933ApplyTapeDoAfterEvent) можно использовать базовыйSimpleDoAfterEventбез переопределенияClone(), если он корректно обрабатывает клонирование.Предлагаемый рефакторинг (если SimpleDoAfterEvent поддерживает автоклонирование)
[Serializable, NetSerializable] -public sealed partial class Scp933PeelTapeDoAfterEvent : SimpleDoAfterEvent -{ - public override DoAfterEvent Clone() - { - return new Scp933PeelTapeDoAfterEvent(); - } -} +public sealed partial class Scp933PeelTapeDoAfterEvent : SimpleDoAfterEvent; [Serializable, NetSerializable] -public sealed partial class Scp933ApplyTapeDoAfterEvent : DoAfterEvent -{ - public override DoAfterEvent Clone() - { - return new Scp933ApplyTapeDoAfterEvent(); - } -} +public sealed partial class Scp933ApplyTapeDoAfterEvent : SimpleDoAfterEvent;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs` around lines 145 - 161, Эти два пустых события (Scp933PeelTapeDoAfterEvent и Scp933ApplyTapeDoAfterEvent) лишь повторяют поведение SimpleDoAfterEvent, поэтому уберите их кастомные классы/переопределения Clone() и используйте SimpleDoAfterEvent напрямую (или замените их типы/создания на SimpleDoAfterEvent) — проверьте все места, где упоминаются Scp933PeelTapeDoAfterEvent и Scp933ApplyTapeDoAfterEvent, и замените их на SimpleDoAfterEvent, удалив ненужные определения Clone() в Scp933PeelTapeDoAfterEvent и Scp933ApplyTapeDoAfterEvent если SimpleDoAfterEvent самостоятельно корректно клонируется.Content.Server/_Scp/Scp933/Scp933TapeSystem.cs (1)
150-158:⚠️ Potential issue | 🟠 MajorРиск перезаписи чужого
MutedComponent.Если у сущности уже есть
MutedComponentот другой механики, текущий код установитMutedByScp933 = true, и при снятии маски удалит чужой мут.Предлагаемое исправление
private void OnTapeMaskGotEquipped(Entity<Scp933TapeMaskComponent> tapeMask, ref GotEquippedEvent args) { if (args.Slot != "mask") return; - EnsureComp<MutedComponent>(args.Equipee); - tapeMask.Comp.MutedByScp933 = true; + if (!HasComp<MutedComponent>(args.Equipee)) + { + EnsureComp<MutedComponent>(args.Equipee); + tapeMask.Comp.MutedByScp933 = true; + } Dirty(tapeMask); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/_Scp/Scp933/Scp933TapeSystem.cs` around lines 150 - 158, В текущем OnTapeMaskGotEquipped вы можете перезаписать чужой MutedComponent — измените логику: вместо безусловного EnsureComp+перезаписи, сначала попытайтесь получить существующий компонент через TryGetComp(args.Equipee, out MutedComponent comp); если не найден — создайте его через EnsureComp; в обоих случаях выставьте только флаг comp.MutedByScp933 = true и вызовите Dirty(comp) (не затирая другие флаги). Также откройте обработчик снятия (OnTapeMaskGotUnequipped) и измените его так, чтобы он только очищал comp.MutedByScp933 и удалял сам MutedComponent только если ни один из флагов (например MutedByScp933 и другие) не установлен; используйте RemComp только в этом безопасном случае.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Content.Server/_Scp/Scp933/Scp933TapeSystem.cs`:
- Around line 431-438: Re-evaluate the emergency rip condition at completion:
inside TryCompleteRipTape (before calling DoRipTape/ConvertToMaster) call
CanRipTape(target, expectedMask, out var tapeMask) again and recompute
emergencyMode (or bail out) so you don't proceed with a stale emergencyMode
computed in TryRipTape; ensure DoRipTape/ConvertToMaster only run when the
rechecked emergencyMode is still valid (or update the flag passed to DoRipTape)
to prevent multiple masters being created.
In `@Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs`:
- Around line 131-134: After modifying the Scp933FaceTornComponent instance
(obtained via EnsureComp<Scp933FaceTornComponent>(victim)) — setting TornBy and
MutedByScp933 — mark the component dirty so the AutoNetworkedField changes are
synchronized by calling Dirty for the entity/component (e.g., Dirty(victim,
torn) or Dirty(victim)) immediately after those assignments.
In `@Resources/Locale/en-US/_prototypes/_scp/entities/clothing/masks/masks.ftl`:
- Around line 5-6: Lowercase the entity key ent-ClothingMaskScp933Tape to
ent-clothingmaskscp933tape and update its .desc to a more natural phrasing with
a capitalized sentence start (e.g., change ".desc = Silver strips pressed over
the eyes. It does not breathe with you." to ".desc = Silver strips pressed over
the eyes. They do not move with your breathing."). Ensure you modify the entry
with the exact identifiers ent-ClothingMaskScp933Tape ->
ent-clothingmaskscp933tape and the corresponding .desc line.
---
Duplicate comments:
In `@Content.Server/_Scp/Scp933/Scp933TapeSystem.cs`:
- Around line 150-158: В текущем OnTapeMaskGotEquipped вы можете перезаписать
чужой MutedComponent — измените логику: вместо безусловного
EnsureComp+перезаписи, сначала попытайтесь получить существующий компонент через
TryGetComp(args.Equipee, out MutedComponent comp); если не найден — создайте его
через EnsureComp; в обоих случаях выставьте только флаг comp.MutedByScp933 =
true и вызовите Dirty(comp) (не затирая другие флаги). Также откройте обработчик
снятия (OnTapeMaskGotUnequipped) и измените его так, чтобы он только очищал
comp.MutedByScp933 и удалял сам MutedComponent только если ни один из флагов
(например MutedByScp933 и другие) не установлен; используйте RemComp только в
этом безопасном случае.
In `@Content.Shared/_Scp/Scp933/Scp933MasterSystem.cs`:
- Around line 145-161: Эти два пустых события (Scp933PeelTapeDoAfterEvent и
Scp933ApplyTapeDoAfterEvent) лишь повторяют поведение SimpleDoAfterEvent,
поэтому уберите их кастомные классы/переопределения Clone() и используйте
SimpleDoAfterEvent напрямую (или замените их типы/создания на
SimpleDoAfterEvent) — проверьте все места, где упоминаются
Scp933PeelTapeDoAfterEvent и Scp933ApplyTapeDoAfterEvent, и замените их на
SimpleDoAfterEvent, удалив ненужные определения Clone() в
Scp933PeelTapeDoAfterEvent и Scp933ApplyTapeDoAfterEvent если SimpleDoAfterEvent
самостоятельно корректно клонируется.
🪄 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
Run ID: ec8ce2ad-8394-43ca-8eb5-9f72616d342d
📒 Files selected for processing (4)
Content.Server/_Scp/Scp933/Scp933TapeSystem.csContent.Shared/_Scp/Scp933/Scp933MasterSystem.csResources/Locale/en-US/_prototypes/_scp/entities/clothing/masks/masks.ftlResources/Locale/ru-RU/_prototypes/_scp/entities/clothing/masks/masks.ftl
|
@coderabbitai Проверь опять |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 103554
По поводу вопроса С моей стороны замечаний нет. 🎉 |
|
@coderabbitai Ещё жалобы от @ThereDrD0 ожидаются или всё уже оптимизировано и готово к merge? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 78326
🔴 Открытые треды от
|
| Файл | Замечание |
|---|---|
Content.Server/.../Scp933MasterSystem.cs |
Использовать отдельный компонент для возможных целей SCP-933 вместо HumanoidAppearanceComponent |
Content.Server/.../Scp933MasterSystem.cs |
Слоты вынести в компонент как список (настраиваемый через YAML) |
Content.Server/.../Scp933MasterSystem.cs |
Валидацию делать внутри поля компонента через get/set, а не в системе |
Content.Server/.../Scp933MasterSystem.cs |
Хардкод — должно настраиваться через компоненты |
Content.Shared/.../DuctTapeComponent.cs |
Почему не Stack-компонент вместо своего счётчика UseCount? |
Content.Shared/.../Scp933MasterComponent.cs |
[ViewVariables(VVAccess.ReadOnly)] → достаточно просто [ViewVariables] |
Content.Shared/.../Scp933MasterSystem.cs |
Серверный код перенести на сервер |
Content.Shared/.../Scp933MasterSystem.cs |
Слои для скрытия лица сделать списком в компоненте и проходить циклом, а не хардкодить |
🟡 Мои открытые замечания (из последнего ревью, актуальные):
| Файл | Замечание |
|---|---|
Content.Server/.../Scp933TapeSystem.cs (строка ~431) |
Повторно проверять emergencyMode при завершении DoAfter, чтобы не создавать лишних мастеров |
Content.Shared/.../Scp933MasterSystem.cs (строка ~131) |
Вызывать Dirty(victim, torn) после установки TornBy/MutedByScp933 для сетевой синхронизации |
Content.Server/.../Scp933TapeSystem.cs (строка ~150) |
MutedComponent может удалить чужой мут — нужен маркер-компонент Scp933MutedTagComponent |
Итого: PR ещё требует доработки. Основные блокеры — замечания @ThereDrD0.
|
А ну пересмотрит коммиты |
|
✅ Actions performedReview triggered.
|





Краткое описание | Short description
О великий 933 был добавлен, наконец я смогу заклеить дыру в 173.
Объект 933 — это клейкая лента, создающая сущности, которые подчиняются первому заражённому и пытаются наклеить ленту на всех, срывая при этом лицо.
Ссылка на багрепорт/Предложение | Related Issue/Bug Report
Медиа (Видео/Скриншоты) | Media (Video/Screenshots)
Changelog
Добавлен SCP-933, включая: сам объект 933, 933-1, 933-2 (Хост) и 933-2 (Миньон). Механика: Наклеивания ленты, отклеивания, порабощение персонала в ряды SCP-933.
🆑 Fire Helper/Helper_Never_Dies
Summary by CodeRabbit
Новые функции