Skip to content

[FIX] Heretic LayerMask#2642

Open
CrimeMoot wants to merge 2 commits intoAdventureTimeSS14:masterfrom
CrimeMoot:fix_hhhfggfg
Open

[FIX] Heretic LayerMask#2642
CrimeMoot wants to merge 2 commits intoAdventureTimeSS14:masterfrom
CrimeMoot:fix_hhhfggfg

Conversation

@CrimeMoot
Copy link
Contributor

Описание PR

Исправил, что при AshHaute у еретик пропадала маска связанная с разломами. И он переставал их видеть. Теперь полиморф возвращает его маску обратно

Техническая информация

  • Изменения были протестированы на локальном сервере, и всё работает отлично.
  • PR закончен и требует просмотра изменений.

Чейнджлог

🆑 CrimeMoot

  • fix: Телепортация за Еретика больше не забирает взор и способность видеть разломы.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

Walkthrough

Осуществлена рефакторизация системы видимости компонентов для сущностей Heretic и Polymorph. Заменена жестко закодированная маска видимости (значение 69) на использование enum VisibilityFlags.Eldritch в компоненте EldritchInfluenceComponent. Добавлено новое поле ParentVisibilityMask в PolymorphedEntityComponent для сохранения маски видимости глаза при трансформации. Расширена PolymorphSystem для синхронизации маски видимости между исходной и полиморфной сущностью при создании и откате трансформации. Обновлен файл прототипа сущности с соответствующим значением слоя видимости.

Suggested labels

Status: Needs Review, size/M, S: Untriaged

Suggested reviewers

  • Darkiich
  • Red-Lis
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title '[FIX] Heretic LayerMask' directly refers to the main change of this pull request, which fixes a LayerMask-related issue affecting Heretic gameplay.
Description check ✅ Passed The description clearly explains the bug being fixed: loss of Heretic's visibility mask after teleportation, and how the polymorph system now preserves this mask upon reversion.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 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 end

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/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

📥 Commits

Reviewing files that changed from the base of the PR and between c1f609c and e9e8bce.

📒 Files selected for processing (6)
  • Content.Server/ADT/Heretic/Components/EldritchInfluenceComponent.cs
  • Content.Server/ADT/Heretic/EntitySystems/HereticSystem.cs
  • Content.Server/Polymorph/Components/PolymorphedEntityComponent.cs
  • Content.Server/Polymorph/Systems/PolymorphSystem.cs
  • Content.Shared/Eye/VisibilityFlags.cs
  • Resources/Prototypes/ADT/Heretic/Entities/Structures/Specific/Heretic/eldritch_influence.yml

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.

2 participants