Skip to content

Project Helios Chapter 1#1486

Merged
Rxup merged 13 commits into
Rxup:masterfrom
GTTEDMI:Supermatter_Reflector
Jul 19, 2026
Merged

Project Helios Chapter 1#1486
Rxup merged 13 commits into
Rxup:masterfrom
GTTEDMI:Supermatter_Reflector

Conversation

@GTTEDMI

@GTTEDMI GTTEDMI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Улучшение работы с суперматерией, добавление отражателей и консоль мониторинга состояния.

Summary by CodeRabbit

  • Новые возможности
    • Добавлен направленный отражатель: энергетические снаряды могут перенаправляться в сторону “выхода”, учитывая угол попадания.
    • Добавлены рама отражателя и новый способ сборки с возможностью поворота.
  • Игровой процесс
    • При столкновении эффект включает всплывающее сообщение и звук; при попадании в “поглощающую” зону снаряды поглощаются.
    • Повышены требования к прочности и последствия разрушения: выпадение материалов и эффекты уничтожения.
  • Локализация
    • Обновлены описания и сообщения для отражателя, рамы и рецепта сборки (RU/EN).
  • Тесты
    • Добавлены интеграционные проверки поведения отражателя.

@GTTEDMI
GTTEDMI requested a review from Rxup as a code owner July 11, 2026 21:18
@github-actions github-actions Bot added Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. Changes: Localization Can be reviewed or fixed by people who are knowledgeable with translation S: Untriaged size/M labels Jul 11, 2026
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

RSI Diff Bot; head commit 2aa9b13 merging into 53b82ee
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Backmen/Objects/Devices/tablets.rsi

State Old New Status
supermatterconsole Added
tablet Added

Resources/Textures/Backmen/Supermatter/computers.rsi

State Old New Status
computer Added
generic_keyboard Added
generic_panel_open Added
supermatter-0 Added
supermatter-1 Added
supermatter-2 Added
supermatter-3 Added
supermatter-4 Added
supermatter-5 Added
supermatter-6 Added
supermatter_keys Added

Resources/Textures/Backmen/Supermatter/reflector.rsi

State Old New Status
reflector Added

Resources/Textures/Backmen/Supermatter/reflectorframe.rsi

State Old New Status
reflector Added

Edit: diff updated after 2aa9b13

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Добавлены направленный отражатель суперматтера, ECS-механика перенаправления снарядов, прототипы каркаса и устройства, граф строительства, материалы разрушения, локализация, текстурные метаданные и интеграционные тесты.

Changes

Направленный отражатель

Layer / File(s) Summary
Механика направленного отражения
Content.Shared/Backmen/Supermatter/Components/DirectionalReflectComponent.cs, Content.Shared/Backmen/Supermatter/DirectionalReflectSystem.cs
Компонент задаёт тип отражения, фронтальный угол поглощения и звук; система проверяет попытки отражения, перенаправляет снаряды, обновляет их состояние и выполняет серверные эффекты.
Прототипы и визуальные ресурсы отражателя
Resources/Prototypes/_Backmen/Entities/Supermatter/reflector.yml, Resources/Textures/Backmen/Supermatter/reflector*.rsi/meta.json
Добавлены каркас и готовый отражатель с конструкцией, разрушением, физическими фикстурами, спавном материалов и состояниями текстур.
Строительство и локализация
Resources/Prototypes/_Backmen/Recipes/Construction/reflector.yml, Resources/Locale/.../reflector.ftl, Resources/Locale/en-US/backmen/supermatter/supermatter.ftl
Добавлены граф и рецепт строительства, а также строки названий, описаний, сообщения об отражении и требований к материалам на русском и английском языках.
Интеграционные проверки отражения
Content.IntegrationTests/Tests/Backmen/Supermatter/ReflectorTest.cs
Проверяются фронтальное поглощение, перенаправление задних и боковых попаданий, обновление стрелка и наличие компонента в прототипе.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ProjectileReflectAttemptEvent
  participant DirectionalReflectSystem
  participant Reflector
  participant ProjectileComponent
  ProjectileReflectAttemptEvent->>DirectionalReflectSystem: попытка отражения
  DirectionalReflectSystem->>Reflector: проверить Reflects и FrontAbsorbAngle
  Reflector-->>DirectionalReflectSystem: поглотить или разрешить отражение
  DirectionalReflectSystem->>ProjectileComponent: изменить скорость, ориентацию, Shooter и Weapon
  DirectionalReflectSystem-->>ProjectileReflectAttemptEvent: отмена, звук, popup и admin-лог
Loading

Poem

Я兔ик прыгнул к зеркалу — блеск!
Снаряд свернул, меняя рейс.
Каркас собрался: сталь, стекло,
Алмаз добавил серебро.
И отражатель в нужный миг
Вернул лучом весёлый пик!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive Заголовок слишком общий и не отражает конкретно добавление направленного отражателя для supermatter и связанных ресурсов. Переименуйте PR так, чтобы он кратко описывал основное изменение, например: «Добавить направленный отражатель для supermatter».
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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.Shared/Backmen/Supermatter/DirectionalReflectSystem.cs`:
- Around line 77-78: В обработке отражения снаряда замените вызов
SetLocalRotation на SetWorldRotation для outputAngle, сохранив существующее
обновление скорости через _physics.SetLinearVelocity. Это обеспечит применение
мирового угла независимо от вращения грида.

In `@Resources/Locale/ru-RU/backmen/supermatter/supermatter.ftl`:
- Around line 22-26: Remove the duplicate localization entries ent-Reflector and
ent-ReflectorFrame from supermatter.ftl, keeping their existing definitions only
in the specialized reflector.ftl file.

In `@Resources/Prototypes/_Backmen/Entities/Supermatter/reflector.yml`:
- Around line 9-11: The ReflectorFrame and completed Reflector currently share
the same reflector texture state. Update the ReflectorFrame sprite definition to
use a distinct frame state, such as reflector_frame, and add or reference the
corresponding RSI state so unfinished frames are visually distinguishable while
keeping Reflector on the existing reflector state.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cc1d64ca-cf4c-45fa-99ff-377be5ed6f10

📥 Commits

Reviewing files that changed from the base of the PR and between d201578 and 0bf126d.

⛔ Files ignored due to path filters (1)
  • Resources/Textures/Backmen/Supermatter/reflector.rsi/reflector.png is excluded by !**/*.png
📒 Files selected for processing (9)
  • Content.Shared/Backmen/Supermatter/Components/DirectionalReflectComponent.cs
  • Content.Shared/Backmen/Supermatter/DirectionalReflectSystem.cs
  • Resources/Locale/en-US/backmen/supermatter/supermatter.ftl
  • Resources/Locale/en-US/ss14-ru/prototypes/_backmen/entities/supermatter/reflector.ftl
  • Resources/Locale/ru-RU/backmen/supermatter/supermatter.ftl
  • Resources/Locale/ru-RU/ss14-ru/prototypes/_backmen/entities/supermatter/reflector.ftl
  • Resources/Prototypes/_Backmen/Entities/Supermatter/reflector.yml
  • Resources/Prototypes/_Backmen/Recipes/Construction/reflector.yml
  • Resources/Textures/Backmen/Supermatter/reflector.rsi/meta.json

Comment thread Content.Shared/Backmen/Supermatter/DirectionalReflectSystem.cs Outdated
Comment thread Resources/Locale/ru-RU/backmen/supermatter/supermatter.ftl Outdated
Comment on lines +9 to +11
- type: Sprite
sprite: Backmen/Supermatter/reflector.rsi
state: reflector

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Каркас и готовый отражатель используют одинаковую текстуру.

ReflectorFrame (строки 9-11) и Reflector (строки 43-45) используют один и тот же спрайт state: reflector из одного RSI. В meta.json определён только один state. Игроки не смогут визуально отличить каркас от готового отражателя, что может привести к путанице — например, попытке использовать каркас как отражатель (он не содержит DirectionalReflect и не будет отражать снаряды).

Рассмотрите возможность добавления отдельного state для каркаса (например, reflector_frame) или использования визуального индикатора незавершённости.

Also applies to: 43-45

🤖 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 `@Resources/Prototypes/_Backmen/Entities/Supermatter/reflector.yml` around
lines 9 - 11, The ReflectorFrame and completed Reflector currently share the
same reflector texture state. Update the ReflectorFrame sprite definition to use
a distinct frame state, such as reflector_frame, and add or reference the
corresponding RSI state so unfinished frames are visually distinguishable while
keeping Reflector on the existing reflector state.

GTTEDMI added 3 commits July 12, 2026 02:42
Добавление текстуры каркасу, небольшое изменение текстуры отражателя

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Resources/Textures/Backmen/Supermatter/reflectorframe.rsi/meta.json (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

UTF-8 BOM в начале файла может вызвать проблемы парсинга.

Строка 1 начинается с символа UTF-8 BOM (). Хотя многие JSON-парсеры обрабатывают BOM корректно, стандарт JSON (RFC 8259) не рекомендует его использование, и строгие парсеры могут выдать ошибку. Рекомендуется удалить BOM.

♻️ Предлагаемое исправление
-{
+{
     "version": 1,
🤖 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 `@Resources/Textures/Backmen/Supermatter/reflectorframe.rsi/meta.json` at line
1, Remove the UTF-8 BOM character at the beginning of meta.json so the file
starts directly with the opening JSON brace. Preserve the existing JSON content
and formatting otherwise.
🤖 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.

Nitpick comments:
In `@Resources/Textures/Backmen/Supermatter/reflectorframe.rsi/meta.json`:
- Line 1: Remove the UTF-8 BOM character at the beginning of meta.json so the
file starts directly with the opening JSON brace. Preserve the existing JSON
content and formatting otherwise.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0c49d61e-f9bf-425d-8e05-1c311170a0c4

📥 Commits

Reviewing files that changed from the base of the PR and between 5d7e835 and a0a329d.

⛔ Files ignored due to path filters (2)
  • Resources/Textures/Backmen/Supermatter/reflector.rsi/reflector.png is excluded by !**/*.png
  • Resources/Textures/Backmen/Supermatter/reflectorframe.rsi/reflector.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • Resources/Prototypes/_Backmen/Entities/Supermatter/reflector.yml
  • Resources/Textures/Backmen/Supermatter/reflectorframe.rsi/meta.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • Resources/Prototypes/_Backmen/Entities/Supermatter/reflector.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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.IntegrationTests/Tests/Backmen/Supermatter/ReflectorTest.cs`:
- Around line 83-111: Update SideHit_IsRedirectedAlongOutputFace to capture the
bolt’s original speed and assign a distinct shooter entity before raising
ProjectileReflectAttemptEvent, then assert redirected.Length() preserves that
speed and projectile.Shooter is reassigned as
BackHit_IsRedirectedAlongOutputFace does. Keep the existing cancellation and
output-direction assertions.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 46166d38-bc8a-40f2-b177-44961954d591

📥 Commits

Reviewing files that changed from the base of the PR and between a0a329d and 280929c.

📒 Files selected for processing (2)
  • Content.IntegrationTests/Tests/Backmen/Supermatter/ReflectorTest.cs
  • Content.Shared/Backmen/Supermatter/DirectionalReflectSystem.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Content.Shared/Backmen/Supermatter/DirectionalReflectSystem.cs

Comment on lines +83 to +111
[Test]
public async Task SideHit_IsRedirectedAlongOutputFace()
{
var map = await Pair.CreateTestMap();

await Server.WaitAssertion(() =>
{
var entMan = Server.EntMan;
var physics = entMan.System<SharedPhysicsSystem>();
var xformSys = entMan.System<SharedTransformSystem>();

var reflector = entMan.SpawnEntity(Reflector, map.MapCoords);
xformSys.SetWorldRotation(reflector, Angle.Zero);

var bolt = entMan.SpawnEntity(EmitterBolt, map.MapCoords);
var boltPhysics = entMan.GetComponent<PhysicsComponent>(bolt);
physics.SetLinearVelocity(bolt, new Vector2(10f, 0f), body: boltPhysics);

var projectile = entMan.GetComponent<ProjectileComponent>(bolt);
var attempt = new ProjectileReflectAttemptEvent(bolt, projectile, false);
entMan.EventBus.RaiseLocalEvent(reflector, ref attempt);

Assert.That(attempt.Cancelled, Is.True, "Side hits should be redirected.");

var redirected = physics.GetMapLinearVelocity(bolt, component: boltPhysics);
var outputDir = Angle.Zero.ToWorldVec();
Assert.That(Vector2.Dot(Vector2.Normalize(redirected), outputDir), Is.GreaterThan(0.99f));
});
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Добавьте проверки скорости и Shooter в SideHit-тест для консистентности с BackHit.

Тест BackHit_IsRedirectedAlongOutputFace проверяет сохранение скорости (redirected.Length()) и переназначение projectile.Shooter, но SideHit_IsRedirectedAlongOutputFace опускает обе проверки. Система DirectionalReflectSystem.TryReflectProjectile одинаково изменяет скорость и Shooter для всех перенаправленных снарядов, поэтому SideHit-тест должен покрывать те же инварианты.

🛡️ Предлагаемое исправление
             Assert.That(attempt.Cancelled, Is.True, "Side hits should be redirected.");
 
             var redirected = physics.GetMapLinearVelocity(bolt, component: boltPhysics);
             var outputDir = Angle.Zero.ToWorldVec();
             Assert.That(Vector2.Dot(Vector2.Normalize(redirected), outputDir), Is.GreaterThan(0.99f));
+            Assert.That(redirected.Length(), Is.EqualTo(10f).Within(0.01f));
+            Assert.That(projectile.Shooter, Is.EqualTo(reflector));
         });
📝 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.

Suggested change
[Test]
public async Task SideHit_IsRedirectedAlongOutputFace()
{
var map = await Pair.CreateTestMap();
await Server.WaitAssertion(() =>
{
var entMan = Server.EntMan;
var physics = entMan.System<SharedPhysicsSystem>();
var xformSys = entMan.System<SharedTransformSystem>();
var reflector = entMan.SpawnEntity(Reflector, map.MapCoords);
xformSys.SetWorldRotation(reflector, Angle.Zero);
var bolt = entMan.SpawnEntity(EmitterBolt, map.MapCoords);
var boltPhysics = entMan.GetComponent<PhysicsComponent>(bolt);
physics.SetLinearVelocity(bolt, new Vector2(10f, 0f), body: boltPhysics);
var projectile = entMan.GetComponent<ProjectileComponent>(bolt);
var attempt = new ProjectileReflectAttemptEvent(bolt, projectile, false);
entMan.EventBus.RaiseLocalEvent(reflector, ref attempt);
Assert.That(attempt.Cancelled, Is.True, "Side hits should be redirected.");
var redirected = physics.GetMapLinearVelocity(bolt, component: boltPhysics);
var outputDir = Angle.Zero.ToWorldVec();
Assert.That(Vector2.Dot(Vector2.Normalize(redirected), outputDir), Is.GreaterThan(0.99f));
});
}
[Test]
public async Task SideHit_IsRedirectedAlongOutputFace()
{
var map = await Pair.CreateTestMap();
await Server.WaitAssertion(() =>
{
var entMan = Server.EntMan;
var physics = entMan.System<SharedPhysicsSystem>();
var xformSys = entMan.System<SharedTransformSystem>();
var reflector = entMan.SpawnEntity(Reflector, map.MapCoords);
xformSys.SetWorldRotation(reflector, Angle.Zero);
var bolt = entMan.SpawnEntity(EmitterBolt, map.MapCoords);
var boltPhysics = entMan.GetComponent<PhysicsComponent>(bolt);
physics.SetLinearVelocity(bolt, new Vector2(10f, 0f), body: boltPhysics);
var projectile = entMan.GetComponent<ProjectileComponent>(bolt);
var attempt = new ProjectileReflectAttemptEvent(bolt, projectile, false);
entMan.EventBus.RaiseLocalEvent(reflector, ref attempt);
Assert.That(attempt.Cancelled, Is.True, "Side hits should be redirected.");
var redirected = physics.GetMapLinearVelocity(bolt, component: boltPhysics);
var outputDir = Angle.Zero.ToWorldVec();
Assert.That(Vector2.Dot(Vector2.Normalize(redirected), outputDir), Is.GreaterThan(0.99f));
Assert.That(redirected.Length(), Is.EqualTo(10f).Within(0.01f));
Assert.That(projectile.Shooter, Is.EqualTo(reflector));
});
}
🤖 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.IntegrationTests/Tests/Backmen/Supermatter/ReflectorTest.cs` around
lines 83 - 111, Update SideHit_IsRedirectedAlongOutputFace to capture the bolt’s
original speed and assign a distinct shooter entity before raising
ProjectileReflectAttemptEvent, then assert redirected.Length() preserves that
speed and projectile.Shooter is reassigned as
BackHit_IsRedirectedAlongOutputFace does. Keep the existing cancellation and
output-direction assertions.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

GTTEDMI added 2 commits July 15, 2026 01:49
Добавлена консоль мониторинга суперматреии. Оригинальный пр (Goob-Station/Goob-Station#5788 Goob-Station/Goob-Station#6808). Так же была работа по адаптированию к  нашему билду с улучшением определённых частей кода.
@github-actions github-actions Bot added size/L Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design and removed size/L size/M labels Jul 16, 2026
@GTTEDMI GTTEDMI changed the title Project Helios Project Helios Chapter 1 Jul 16, 2026
@Rxup
Rxup merged commit a43e564 into Rxup:master Jul 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes: Localization Can be reviewed or fixed by people who are knowledgeable with translation Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design S: Untriaged size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants