Conversation
WalkthroughОсуществлена рефакторизация системы видимости компонентов для сущностей Heretic и Polymorph. Заменена жестко закодированная маска видимости (значение 69) на использование enum VisibilityFlags.Eldritch в компоненте EldritchInfluenceComponent. Добавлено новое поле ParentVisibilityMask в PolymorphedEntityComponent для сохранения маски видимости глаза при трансформации. Расширена PolymorphSystem для синхронизации маски видимости между исходной и полиморфной сущностью при создании и откате трансформации. Обновлен файл прототипа сущности с соответствующим значением слоя видимости. Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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.
🧹 Nitpick comments (2)
Content.Server/ADT/Heretic/EntitySystems/HereticSystem.cs (1)
27-27: Стоит выровнять порядокusingпо алфавиту в этом /ADT/ файле.На Line [27] новый импорт добавлен, но общий блок
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/Heretic/EntitySystems/HereticSystem.cs` at line 27, The using directives in HereticSystem.cs are not alphabetically ordered after adding the new import Content.Shared.Eye; open the using block at the top of HereticSystem.cs and reorder all using statements into strict alphabetical order (by namespace string) so Content.Shared.Eye appears in the correct position; keep related groups (system vs project usings) separated per project convention and ensure no duplicates remain.Content.Server/Polymorph/Components/PolymorphedEntityComponent.cs (1)
40-41: Добавь краткий/// <summary>дляParentVisibilityMask.Поле на Line [41] важное для восстановления состояния после полиморфа, лучше явно задокументировать назначение.
Пример правки
// ADT-Tweak start + /// <summary> + /// Сохраняет VisibilityMask исходной сущности перед полиморфом, + /// чтобы восстановить его при возврате. + /// </summary> [DataField] public int? ParentVisibilityMask; // ADT-Tweak endAs 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/Polymorph/Components/PolymorphedEntityComponent.cs` around lines 40 - 41, Добавь краткую XML-документацию /// <summary> для поля ParentVisibilityMask в классе PolymorphedEntityComponent: опиши, что это nullable целочисленное поле хранит маску видимости родителя (ParentVisibilityMask) для восстановления состояния видимости сущности после отмены полиморфа; укажи, что оно сериализуется через [DataField] и может быть null, если маска неизвестна. Это поможет ясно понять назначение поля при чтении кода и при восстановлении состояния.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@Content.Server/ADT/Heretic/EntitySystems/HereticSystem.cs`:
- Line 27: The using directives in HereticSystem.cs are not alphabetically
ordered after adding the new import Content.Shared.Eye; open the using block at
the top of HereticSystem.cs and reorder all using statements into strict
alphabetical order (by namespace string) so Content.Shared.Eye appears in the
correct position; keep related groups (system vs project usings) separated per
project convention and ensure no duplicates remain.
In `@Content.Server/Polymorph/Components/PolymorphedEntityComponent.cs`:
- Around line 40-41: Добавь краткую XML-документацию /// <summary> для поля
ParentVisibilityMask в классе PolymorphedEntityComponent: опиши, что это
nullable целочисленное поле хранит маску видимости родителя
(ParentVisibilityMask) для восстановления состояния видимости сущности после
отмены полиморфа; укажи, что оно сериализуется через [DataField] и может быть
null, если маска неизвестна. Это поможет ясно понять назначение поля при чтении
кода и при восстановлении состояния.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6736e462-3f2a-4916-9d54-d50c291155bc
📒 Files selected for processing (6)
Content.Server/ADT/Heretic/Components/EldritchInfluenceComponent.csContent.Server/ADT/Heretic/EntitySystems/HereticSystem.csContent.Server/Polymorph/Components/PolymorphedEntityComponent.csContent.Server/Polymorph/Systems/PolymorphSystem.csContent.Shared/Eye/VisibilityFlags.csResources/Prototypes/ADT/Heretic/Entities/Structures/Specific/Heretic/eldritch_influence.yml
Описание PR
Исправил, что при AshHaute у еретик пропадала маска связанная с разломами. И он переставал их видеть. Теперь полиморф возвращает его маску обратно
Техническая информация
Чейнджлог
🆑 CrimeMoot