Conversation
|
Опять |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoRun configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughДобавлены серверные проверки и очистка инвентаря перед трансформацией в Geras: выбрасываются/изымаются запрещённые предметы (включая рекурсивную очистку вложенных контейнеров) и блокировка морфа при наличии аномалии; добавлены зависимости систем для этих проверок. В систему полиморфизма добавлена передача состояния пламени, урона выносливости и температуры между формами с новыми флагами конфигурации. Уменьшена задержка действия морфа Geras. Обновлены русские строки локализации и прототипы слизней (температурная механика). В клиентском Geras удалены неиспользуемые using-директивы. Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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: 1
🧹 Nitpick comments (1)
Content.Server/ADT/Geras/GerasSystem.cs (1)
1-21: Директивыusingдолжны быть в алфавитном порядке.Согласно рекомендациям проекта,
usingдирективы в системах и компонентах/ADT/должны быть упорядочены по алфавиту.♻️ Предлагаемое исправление порядка using
-using Content.Server.Polymorph.Systems; -using Content.Shared.Zombies; -using Content.Server.Actions; -using Content.Server.Popups; -using Content.Shared.ADT.Geras; -using Robust.Shared.Player; -using Content.Shared.Humanoid; -using Content.Shared.Mobs.Components; -using Content.Shared.Mobs.Systems; -using Content.Shared.ActionBlocker; -using Robust.Shared.Utility; -using Content.Shared.Hands.Components; -using Content.Shared.Hands.EntitySystems; -using Content.Shared.Anomaly.Components; -using Content.Shared.Inventory; -using Content.Shared.Nuke; -using Content.Server.Ghost.Roles.Components; -using Content.Shared.Mind.Components; -using Content.Shared.Storage; -using Robust.Shared.Containers; -using System.Linq; +using System.Linq; +using Content.Server.Actions; +using Content.Server.Ghost.Roles.Components; +using Content.Server.Polymorph.Systems; +using Content.Server.Popups; +using Content.Shared.ActionBlocker; +using Content.Shared.ADT.Geras; +using Content.Shared.Anomaly.Components; +using Content.Shared.Hands.Components; +using Content.Shared.Hands.EntitySystems; +using Content.Shared.Humanoid; +using Content.Shared.Inventory; +using Content.Shared.Mind.Components; +using Content.Shared.Mobs.Components; +using Content.Shared.Mobs.Systems; +using Content.Shared.Nuke; +using Content.Shared.Storage; +using Content.Shared.Zombies; +using Robust.Shared.Containers; +using Robust.Shared.Player; +using Robust.Shared.Utility;Согласно coding guidelines: "using должен быть в алфавитном порядке в наших /ADT/ системах и компонентах".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/Geras/GerasSystem.cs` around lines 1 - 21, The using directives in GerasSystem.cs are not alphabetized; reorder all top-level using statements in the file alphabetically (case-insensitive) to satisfy the ADT coding guideline. Locate the using block at the top of the GerasSystem.cs file (around the GerasSystem class definition) and sort entries such as Content.Server.Polymorph.Systems, Content.Server.Popups, Content.Shared.ADT.Geras, Content.Shared.Humanoid, Robust.Shared.Player, System.Linq, etc., into a single alphabetical list, removing any duplicates and preserving grouping only if project conventions require (otherwise keep them as one sorted list).
🤖 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/ADT/Geras/GerasSystem.cs`:
- Around line 106-107: The current drop call only drops the active hand item;
change the logic in GerasSystem (where you call TryComp<HandsComponent>(uid, out
var hands) and _handsSystem.TryDrop(uid, Transform(uid).Coordinates)) to iterate
over all hands on the HandsComponent and drop each held item: obtain the
list/collection of hands from HandsComponent (e.g., HandsComponent.Hands or an
equivalent enumerator), and for each hand that currently holds an entity call
the hands system drop method (use _handsSystem.TryDrop or the overload that
accepts a specific hand/name if available) with Transform(uid).Coordinates so
every held item is dropped rather than only the active hand.
---
Nitpick comments:
In `@Content.Server/ADT/Geras/GerasSystem.cs`:
- Around line 1-21: The using directives in GerasSystem.cs are not alphabetized;
reorder all top-level using statements in the file alphabetically
(case-insensitive) to satisfy the ADT coding guideline. Locate the using block
at the top of the GerasSystem.cs file (around the GerasSystem class definition)
and sort entries such as Content.Server.Polymorph.Systems,
Content.Server.Popups, Content.Shared.ADT.Geras, Content.Shared.Humanoid,
Robust.Shared.Player, System.Linq, etc., into a single alphabetical list,
removing any duplicates and preserving grouping only if project conventions
require (otherwise keep them as one sorted list).
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
Content.Client/ADT/Geras/GerasSystem.csContent.Server/ADT/Geras/GerasSystem.csContent.Server/Polymorph/Systems/PolymorphSystem.csContent.Shared/Polymorph/PolymorphPrototype.csResources/Locale/ru-RU/ADT/geras/geras.ftlResources/Prototypes/ADT/Actions/types.ymlResources/Prototypes/ADT/Entities/Mobs/NPCs/slimes.ymlResources/Prototypes/ADT/Polymorphs/polymorphs.ymlResources/Prototypes/Entities/Mobs/Species/slime.yml
💤 Files with no reviewable changes (1)
- Content.Client/ADT/Geras/GerasSystem.cs
Снова 🙄 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
Content.Server/ADT/Geras/GerasSystem.cs (2)
60-89: Добавьте/// <summary>к новым helper-методам.Для
HasForbiddenComponentиEjectForbiddenRecursiveстоит добавить краткую XML-документацию: методы важны для правил безопасности инвентаря при морфе.As per coding guidelines: "и предлагай /// summary документацию к C# коду, к важным функциям или классам".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/Geras/GerasSystem.cs` around lines 60 - 89, Добавьте XML-документацию /// <summary> для новых helper-методов HasForbiddenComponent и EjectForbiddenRecursive: кратко опишите назначение каждого метода (проверяет запрещённые компоненты в сущности; рекурсивно извлекает запрещённые сущности из контейнеров при морфе) и укажите параметры (uid/item, owner) и поведение (что происходит при отсутствии StorageComponent, что делает _container/_transform). Используйте стандартный стиль C# XML-комментариев и поместите их непосредственно над объявлениями методов HasForbiddenComponent и EjectForbiddenRecursive.
1-21: Приведитеusingк алфавитному порядку в /ADT/ файле.Сейчас блок
usingне отсортирован; лучше выровнять для единообразия и снижения шума в диффах.As per coding guidelines: "И ещё смотри за тем чтобы using был в алфавитном порядке в наших /ADT/ системах и компонентах".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/Geras/GerasSystem.cs` around lines 1 - 21, Reorder the using directives at the top of GerasSystem.cs into a single alphabetically sorted list (case-insensitive) and remove any duplicates; for example ensure entries like Content.Server.Polymorph.Systems, Content.Server.Actions, Content.Server.Popups, Content.Shared.ADT.Geras, Content.Shared.Humanoid, Content.Shared.Inventory, Robust.Shared.Utility, System.Linq, etc. appear in strict alphabetical order so the using block is consistent with other /ADT/ systems.
🤖 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/ADT/Geras/GerasSystem.cs`:
- Around line 68-71: EjectForbiddenRecursive currently returns early when the
target lacks StorageComponent, skipping other container types; change it to not
return immediately and instead check for other containment components (e.g.,
ContainerManagerComponent, ItemSlotsComponent) and fall back to enumerating
transform children (TransformComponent) so nested items (slots/containers like
PDAs) are traversed; for each found contained entity (from StorageComponent,
ContainerManagerComponent, ItemSlotsComponent or transform children) call
EjectForbiddenRecursive(itemChild, owner) and perform the existing eject logic,
using TryComp checks for StorageComponent, ContainerManagerComponent,
ItemSlotsComponent and TransformComponent to locate and iterate contained
entities instead of exiting early.
---
Nitpick comments:
In `@Content.Server/ADT/Geras/GerasSystem.cs`:
- Around line 60-89: Добавьте XML-документацию /// <summary> для новых
helper-методов HasForbiddenComponent и EjectForbiddenRecursive: кратко опишите
назначение каждого метода (проверяет запрещённые компоненты в сущности;
рекурсивно извлекает запрещённые сущности из контейнеров при морфе) и укажите
параметры (uid/item, owner) и поведение (что происходит при отсутствии
StorageComponent, что делает _container/_transform). Используйте стандартный
стиль C# XML-комментариев и поместите их непосредственно над объявлениями
методов HasForbiddenComponent и EjectForbiddenRecursive.
- Around line 1-21: Reorder the using directives at the top of GerasSystem.cs
into a single alphabetically sorted list (case-insensitive) and remove any
duplicates; for example ensure entries like Content.Server.Polymorph.Systems,
Content.Server.Actions, Content.Server.Popups, Content.Shared.ADT.Geras,
Content.Shared.Humanoid, Content.Shared.Inventory, Robust.Shared.Utility,
System.Linq, etc. appear in strict alphabetical order so the using block is
consistent with other /ADT/ systems.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Content.Server/ADT/Geras/GerasSystem.cs (1)
1-21: 🛠️ Refactor suggestion | 🟠 MajorОтсортируйте
using-директивы по алфавиту в ADT-системе.Блок импортов не соответствует алфавитному порядку. Используйте следующий порядок:
using Content.Server.Actions; using Content.Server.Ghost.Roles.Components; using Content.Server.Polymorph.Systems; using Content.Server.Popups; using Content.Shared.ActionBlocker; using Content.Shared.ADT.Geras; using Content.Shared.Anomaly.Components; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.Humanoid; using Content.Shared.Inventory; using Content.Shared.Mind.Components; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Nuke; using Content.Shared.Storage; using Content.Shared.Zombies; using Robust.Shared.Containers; using Robust.Shared.Player; using Robust.Shared.Utility; using System.Linq;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/Geras/GerasSystem.cs` around lines 1 - 21, The using directives at the top of GerasSystem.cs (the ADT system) are out of alphabetical order; reorder the using statements to match the provided alphabetic sequence (ensure you include and place entries like Content.Server.Actions, Content.Server.Ghost.Roles.Components, Content.Server.Polymorph.Systems, Content.Server.Popups, Content.Shared.ActionBlocker, Content.Shared.ADT.Geras, Content.Shared.Anomaly.Components, Content.Shared.Hands.Components, Content.Shared.Hands.EntitySystems, Content.Shared.Humanoid, Content.Shared.Inventory, Content.Shared.Mind.Components, Content.Shared.Mobs.Components, Content.Shared.Mobs.Systems, Content.Shared.Nuke, Content.Shared.Storage, Content.Shared.Zombies, Robust.Shared.Containers, Robust.Shared.Player, Robust.Shared.Utility, System.Linq) so the imports at the top of GerasSystem.cs are strictly alphabetized as requested.
♻️ Duplicate comments (1)
Content.Server/ADT/Geras/GerasSystem.cs (1)
60-65:⚠️ Potential issue | 🟠 MajorУберите
MobStateComponentиз forbidden-проверки.Сейчас фильтр помечает как запрещённые любые сущности с
MobStateComponent, из-за чего рекурсивный eject может выбрасывать нецелевые сущности из контейнеров. По задаче здесь достаточно проверки наGhostRoleComponentиNukeDiskComponent.💡 Предлагаемая правка
private bool HasForbiddenComponent(EntityUid uid) { return HasComp<NukeDiskComponent>(uid) || - HasComp<GhostRoleComponent>(uid) || - HasComp<MobStateComponent>(uid); + HasComp<GhostRoleComponent>(uid); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/Geras/GerasSystem.cs` around lines 60 - 65, The forbidden-entity check in HasForbiddenComponent currently treats any entity with MobStateComponent as forbidden, causing unintended ejections; update the HasForbiddenComponent method to remove the MobStateComponent check so it only returns true for HasComp<NukeDiskComponent>(uid) || HasComp<GhostRoleComponent>(uid), and run/adjust any unit tests or callers that relied on the previous behavior to ensure recursive eject now only excludes nuke disks and ghost-role entities.
🧹 Nitpick comments (1)
Content.Server/ADT/Geras/GerasSystem.cs (1)
25-25: Добавьте/// summaryдля ключевого класса и новых методов.Для
GerasSystem,HasForbiddenComponentиEjectForbiddenRecursiveне хватает краткой XML-документации.As per coding guidelines "и предлагай /// summary документацию к C# коду, к важным функциям или классам".
Also applies to: 60-90
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/Geras/GerasSystem.cs` at line 25, Добавьте краткую XML-документацию /// <summary> для класса GerasSystem и для методов HasForbiddenComponent и EjectForbiddenRecursive: для класса опишите назначение системы (что она контролирует/обрабатывает), для HasForbiddenComponent укажите что проверяет метод и какие параметры принимает/что возвращает (например: проверяет наличие запрещённого компонента у сущности, возвращает bool), для EjectForbiddenRecursive опишите действие метода (рекурсивно выталкивает/удаляет запрещённые компоненты или сущности) и поведение по ошибкам/побочным эффектам; при необходимости добавьте /// <param> и /// <returns> для параметров и результата, следуя существующему стилю XML-доков в проекте.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Resources/Prototypes/ADT/Entities/Mobs/NPCs/slimes.yml`:
- Around line 198-199: Удалите поле postingSayDamage из текущего блока
StunVisuals в YAML: StunVisuals / StunVisualsComponent поддерживает только
DataField-ы StarsPath и State, поэтому оставьте только эти поля внутри
StunVisuals и уберите postingSayDamage; если намерение было задать
postingSayDamage для компонента, переместите/добавьте это поле в соответствующий
BloodCoughComponent вместо StunVisuals (проверьте наличие BloodCoughComponent в
этом прототипе и добавьте туда postingSayDamage).
---
Outside diff comments:
In `@Content.Server/ADT/Geras/GerasSystem.cs`:
- Around line 1-21: The using directives at the top of GerasSystem.cs (the ADT
system) are out of alphabetical order; reorder the using statements to match the
provided alphabetic sequence (ensure you include and place entries like
Content.Server.Actions, Content.Server.Ghost.Roles.Components,
Content.Server.Polymorph.Systems, Content.Server.Popups,
Content.Shared.ActionBlocker, Content.Shared.ADT.Geras,
Content.Shared.Anomaly.Components, Content.Shared.Hands.Components,
Content.Shared.Hands.EntitySystems, Content.Shared.Humanoid,
Content.Shared.Inventory, Content.Shared.Mind.Components,
Content.Shared.Mobs.Components, Content.Shared.Mobs.Systems,
Content.Shared.Nuke, Content.Shared.Storage, Content.Shared.Zombies,
Robust.Shared.Containers, Robust.Shared.Player, Robust.Shared.Utility,
System.Linq) so the imports at the top of GerasSystem.cs are strictly
alphabetized as requested.
---
Duplicate comments:
In `@Content.Server/ADT/Geras/GerasSystem.cs`:
- Around line 60-65: The forbidden-entity check in HasForbiddenComponent
currently treats any entity with MobStateComponent as forbidden, causing
unintended ejections; update the HasForbiddenComponent method to remove the
MobStateComponent check so it only returns true for
HasComp<NukeDiskComponent>(uid) || HasComp<GhostRoleComponent>(uid), and
run/adjust any unit tests or callers that relied on the previous behavior to
ensure recursive eject now only excludes nuke disks and ghost-role entities.
---
Nitpick comments:
In `@Content.Server/ADT/Geras/GerasSystem.cs`:
- Line 25: Добавьте краткую XML-документацию /// <summary> для класса
GerasSystem и для методов HasForbiddenComponent и EjectForbiddenRecursive: для
класса опишите назначение системы (что она контролирует/обрабатывает), для
HasForbiddenComponent укажите что проверяет метод и какие параметры
принимает/что возвращает (например: проверяет наличие запрещённого компонента у
сущности, возвращает bool), для EjectForbiddenRecursive опишите действие метода
(рекурсивно выталкивает/удаляет запрещённые компоненты или сущности) и поведение
по ошибкам/побочным эффектам; при необходимости добавьте /// <param> и ///
<returns> для параметров и результата, следуя существующему стилю XML-доков в
проекте.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Content.Server/ADT/Geras/GerasSystem.csResources/Prototypes/ADT/Entities/Mobs/NPCs/slimes.yml
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Resources/Prototypes/ADT/Entities/Mobs/NPCs/slimes.yml (1)
119-120:⚠️ Potential issue | 🟠 MajorДобавить механизм 7-секундной задержки перед обратной трансформацией Geras.
По конфигурации
SlimeMorphGerasвResources/Prototypes/ADT/Polymorphs/polymorphs.ymlотсутствует полеduration, которое контролирует автоматическую обратную трансформацию. Согласно PR-чеклисту, требуется реализовать 7-секундную задержку обратной трансформации после трансформации в слайма, но текущая конфигурация этого не предусматривает. Добавьтеduration: 7в блокconfigurationили реализуйте альтернативный механизм задержки.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/ADT/Entities/Mobs/NPCs/slimes.yml` around lines 119 - 120, The Geras slime morph lacks an automatic revert duration—update the SlimeMorphGeras configuration in Resources/Prototypes/ADT/Polymorphs/polymorphs.yml to include duration: 7 inside the configuration block for SlimeMorphGeras (or implement an equivalent 7-second revert mechanism tied to the SlimeMorphGeras behavior); ensure the configuration key is named exactly "duration" and set to 7 so the polymorph system triggers the automatic reverse after seven seconds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Resources/Prototypes/ADT/Entities/Mobs/NPCs/slimes.yml`:
- Around line 119-120: The Geras slime morph lacks an automatic revert
duration—update the SlimeMorphGeras configuration in
Resources/Prototypes/ADT/Polymorphs/polymorphs.yml to include duration: 7 inside
the configuration block for SlimeMorphGeras (or implement an equivalent 7-second
revert mechanism tied to the SlimeMorphGeras behavior); ensure the configuration
key is named exactly "duration" and set to 7 so the polymorph system triggers
the automatic reverse after seven seconds.
Описание PR
Почему / Баланс
Техническая информация
Чейнджлог
🆑 Kerfus