[TWEAK] Обнова КПБ - визуал и звуки#2640
[TWEAK] Обнова КПБ - визуал и звуки#2640kerfus-owo wants to merge 35 commits intoAdventureTimeSS14:masterfrom
Conversation
|
RSI Diff Bot; head commit 585e8b9 merging into 55e3e56 Resources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi
|
|
Алло-алло? Да-да, вайбкод |
Уволен |
|
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:
WalkthroughКоротко: добавлена поддержка управления цветом point‑light в MidroundCustomization (UI-чекбокс, BUI‑сообщение, серверная обработка включения), серверная логика кастомизации расширена: буферизация/восстановление маркировок при удалении/добавлении слотов, правила замены слотов по состоянию моба и привязка point‑light к цвету первой отметки facial‑hair. Также введены изменения для IPC: трейты с whitelist/переписыванием компонентов, новые маркировки/спрайты/звуки/локализации и логика отключения point‑light при смерти. 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)
📝 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.
Actionable comments posted: 8
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/MidroundCustomization/MidroundCustomizationSystem.cs (1)
190-206:⚠️ Potential issue | 🟠 MajorЦвет фонарика рассинхронизируется после удаления/добавления слота экрана.
После
RemoveMarking/AddMarkingвы не пересчитываете point light, аUpdatePointLightColorIfEnabled()при пустомFacialHairпросто выходит. В итоге при включённом наследовании фонарик продолжает светить старым цветом до следующего ручного переключения или перекраски.💡 Что поправить
@@ _humanoid.RemoveMarking(uid, args.Category, args.Slot); + if (args.Category == MarkingCategories.FacialHair) + UpdatePointLightColorIfEnabled(uid, component); _audio.PlayPvs(component.ChangeMarkingSound, uid); UpdateInterface(uid, component); @@ _humanoid.AddMarking(uid, markingId, colors.Count > 0 ? colors[0] : Color.White); _humanoid.SetMarkingColor(uid, args.Category, newSlotIndex, colors, force: false); + if (args.Category == MarkingCategories.FacialHair) + UpdatePointLightColorIfEnabled(uid, component); UpdateInterface(uid, component); @@ if (!TryComp<HumanoidAppearanceComponent>(uid, out var humanoid) || !humanoid.MarkingSet.TryGetCategory(MarkingCategories.FacialHair, out var markings) || markings.Count == 0 || markings[0].MarkingColors.Count == 0) - return; + { + _pointLight.SetColor(uid, component.OriginalPointLightColor); + return; + }Also applies to: 227-264, 528-540
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs` around lines 190 - 206, Remove/add slot handlers (e.g., OnRemoveSlotDoAfter and the corresponding AddSlot handler in MidroundCustomizationSystem) update markings but do not recalc the facial point light, leaving inherited point light color stale; after calling _humanoid.RemoveMarking/_humanoid.AddMarking and UpdateInterface(uid, component) call UpdatePointLightColorIfEnabled(uid, component) (or the existing point-light update helper) to recompute the point light color when FacialHair/markings change so the light stays in sync; apply the same fix to the other similar handlers mentioned (lines around 227-264 and 528-540).
🧹 Nitpick comments (10)
Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs (1)
81-81: Сделайте технический комментарий нейтральным и однозначнымФраза на Line 81 с “Надеюсь…” выглядит как временная заметка и ухудшает поддержку. Лучше оставить короткое техническое описание причины изменения без субъективной формулировки.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs` at line 81, Replace the subjective Russian inline comment in CrewMonitoringServerSystem (the comment currently containing “Надеюсь…”) with a neutral, technical one: succinctly state why the change is needed (e.g., that without this change a remnant entity with OnMob: true remains in the monitor) and remove any speculative or personal wording; locate the comment near the CrewMonitoringServerSystem class/method and update it to a single clear sentence describing the behavior being fixed.Content.Shared/Medical/SuitSensors/SuitSensorComponent.cs (1)
99-100: Добавьте/// <summary>дляOnMob.Поле переключает новый режим работы сенсора, но сейчас его смысл приходится искать в
SharedSuitSensorSystem. Короткая XML-документация здесь сильно упростит поддержку.📝 Вариант правки
//ADT-Tweak-Start + /// <summary> + /// Если true, сенсор считается встроенным в моба и привязывает <see cref="User"/> к владельцу сущности. + /// </summary> [DataField, AutoNetworkedField] public bool OnMob = false; //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.Shared/Medical/SuitSensors/SuitSensorComponent.cs` around lines 99 - 100, Add an XML summary comment for the OnMob field explaining its purpose: above the [DataField, AutoNetworkedField] public bool OnMob = false; declaration add a /// <summary> that states this boolean toggles the sensor's new operating mode (i.e., when true the component uses the alternate/“OnMob” behavior implemented in SharedSuitSensorSystem), and note default value/behavior if helpful; ensure the comment is concise and placed immediately above the field declaration.Content.Shared/ADT/Silicons/MobIpcComponent.cs (1)
6-13: Рекомендуется добавить XML-документацию для компонента и полей.Компонент и его поля не имеют
/// <summary>документации. Это поможет понять назначение полей другим разработчикам.📝 Предложенная документация
namespace Content.Shared.ADT.Silicon; +/// <summary> +/// Компонент для управления специфичным поведением IPC (КПБ). +/// </summary> [RegisterComponent] public sealed partial class MobIpcComponent : Component { + /// <summary> + /// Если true - точечный свет (фонарик) будет выключаться при смерти IPC. + /// </summary> [DataField] public bool DisablePointLightOnDeath = false; + /// <summary> + /// Флаг, указывающий что свет был выключен из-за смерти (для восстановления при ремонте). + /// </summary> [DataField] public bool LightDisabledByDeath; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/ADT/Silicons/MobIpcComponent.cs` around lines 6 - 13, Добавьте XML-документацию для компонента и его полей: добавьте /// <summary> описывающий назначение класса MobIpcComponent и его роли, затем /// <summary> для поля DisablePointLightOnDeath (объяснить, что делает флаг — отключает ли точечный свет при смерти) и для поля LightDisabledByDeath (объяснить, что хранит состояние — было ли свет отключён при смерти). Убедитесь, что комментарии коротко описывают поведение и возможные значения флагов, используя имена MobIpcComponent, DisablePointLightOnDeath и LightDisabledByDeath для локализации изменений.Content.Shared/ADT/Silicons/MobIpcSystem.cs (1)
6-6: Добавьте/// <summary>для новой системы.Новый публичный
EntitySystemбудет проще сопровождать, если сразу зафиксировать, что он отвечает за отключение фонарика IPC при смерти и его восстановление после ремонта.As per coding guidelines: "предлагай /// summary документацию к C# коду, к важным функциям или классам".✍️ Вариант документации
+/// <summary> +/// Отключает фонарик IPC при смерти и возвращает его состояние после восстановления. +/// </summary> public sealed class MobIpcSystem : EntitySystem🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/ADT/Silicons/MobIpcSystem.cs` at line 6, Добавьте XML-документацию для нового публичного класса MobIpcSystem: вставьте над объявлением класса /// <summary>…</summary> с коротким описанием его ответственности — отключение фонарика IPC при смерти и восстановление после ремонта (укажите, что это EntitySystem, управляющая поведением фонарика при состояниях сущности). Упомяните в тексте класса имя MobIpcSystem и ключевые сценарии (on death, on repair) чтобы следующий разработчик быстро понял назначение.Content.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.cs (3)
1-5: Нарушен алфавитный порядокusing.Согласно гайдлайнам проекта,
usingдолжны быть в алфавитном порядке.Content.Shared.Mobsдолжен быть послеContent.Shared.Humanoid.Markings.♻️ Предлагаемый порядок
using Content.Shared.DoAfter; using Content.Shared.Humanoid.Markings; +using Content.Shared.Mobs; using Robust.Shared.Audio; using Robust.Shared.Prototypes; -using Content.Shared.Mobs;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.cs` around lines 1 - 5, Reorder the using directives in MidroundCustomizationComponent.cs to follow project alphabetical guidelines: place Content.Shared.Mobs after Content.Shared.Humanoid.Markings and ensure all other usings (e.g., Content.Shared.DoAfter, Content.Shared.Humanoid.Markings, Robust.Shared.Audio, Robust.Shared.Prototypes) are sorted alphabetically; update the top-of-file using block so the usings are in strict alphabetical order.
12-29: Рекомендуется добавить XML-документацию для классаChangeSlotOnStateEntry.Класс определяет важную структуру данных для изменения слотов по состоянию моба. Добавление
/// <summary>поможет понять назначение класса и его полей.📝 Предлагаемая документация
[DataDefinition] +/// <summary> +/// Определяет запись для изменения маркинг-слота при определённом состоянии моба. +/// </summary> public sealed partial class ChangeSlotOnStateEntry { + /// <summary> + /// Состояние моба, при котором применяется изменение. + /// </summary> [DataField(required: true)] public MobState State { get; set; } + /// <summary> + /// Категория маркинга для изменения. + /// </summary> [DataField(required: true)] public MarkingCategories Category { get; set; } + /// <summary> + /// Номер слота в категории. + /// </summary> [DataField(required: true)] public int Slot { get; set; } + /// <summary> + /// ID маркинга для установки. Пустая строка означает удаление. + /// </summary> [DataField(required: true)] public string Marking { get; set; } = string.Empty; + /// <summary> + /// Цвета маркинга. + /// </summary> [DataField] public List<Color> Colors { get; set; } = new(); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.cs` around lines 12 - 29, Add XML documentation for the ChangeSlotOnStateEntry data class: add a /// <summary> on the ChangeSlotOnStateEntry type describing its role in changing a marking slot when a mob enters a given MobState, and add brief /// <summary> comments for each public property (State, Category, Slot, Marking, Colors) explaining what they represent (e.g., State = target MobState, Category = marking category, Slot = slot index, Marking = marking id/string, Colors = optional color overrides). Keep descriptions concise and use standard XML doc tags so IDEs and generated docs will surface the intent.
103-112: Рекомендуется добавить XML-документацию для новых полей.Поля
PointLightColor,PointLightColorEnabled,OriginalPointLightColor,RemovedMarkingsBufferиOriginalMarkingsне имеют описания их назначения.📝 Предлагаемая документация
+ /// <summary> + /// Включает возможность изменения цвета точечного освещения. + /// </summary> [DataField] public bool PointLightColor = false; + /// <summary> + /// Включён ли в данный момент цвет точечного освещения от экрана. + /// </summary> [DataField, AutoNetworkedField] public bool PointLightColorEnabled; + /// <summary> + /// Исходный цвет точечного освещения для восстановления. + /// </summary> public Color OriginalPointLightColor = Color.White; + /// <summary> + /// Буфер удалённых маркингов для возможного восстановления. + /// </summary> public Dictionary<MarkingCategories, (string Marking, List<Color> Colors)> RemovedMarkingsBuffer { get; set; } = new(); + + /// <summary> + /// Оригинальные маркинги по категориям и слотам до изменения состояния. + /// </summary> public Dictionary<(MarkingCategories Category, int Slot), (string Marking, List<Color> Colors)> OriginalMarkings = new();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.cs` around lines 103 - 112, Add XML documentation comments for the new fields to explain their purpose and usage: add <summary> (and <remarks> where helpful) for PointLightColor, PointLightColorEnabled, OriginalPointLightColor, RemovedMarkingsBuffer, and OriginalMarkings; describe that PointLightColor toggles using a point light color override, PointLightColorEnabled is the networked toggle, OriginalPointLightColor stores the pre-customization color, RemovedMarkingsBuffer holds markings temporarily removed keyed by MarkingCategories, and OriginalMarkings stores original marking data keyed by (MarkingCategories, slot) so other devs understand intent and serialization/networking behavior.Resources/Prototypes/ADT/Voice/speech_emote_sounds.yml (1)
62-66: Непоследовательный отступ в YAML.Элементы
filesв коллекцияхIPCSpits,IPCMaleCoughs,IPCMaleYawn,IPCFemaleCoughs,IPCFemaleYawnиспользуют 2 пробела вместо 4, что нарушает единообразие форматирования в файле.♻️ Пример исправления для IPCSpits (строки 64-66)
- type: soundCollection id: IPCSpits files: - - /Audio/ADT/Voice/IPC/i_spit_1.ogg - - /Audio/ADT/Voice/IPC/i_spit_2.ogg + - /Audio/ADT/Voice/IPC/i_spit_1.ogg + - /Audio/ADT/Voice/IPC/i_spit_2.ogg🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/ADT/Voice/speech_emote_sounds.yml` around lines 62 - 66, Collections IPCSpits, IPCMaleCoughs, IPCMaleYawn, IPCFemaleCoughs and IPCFemaleYawn contain `files` entries indented with 2 spaces instead of the project standard 4; update each `files` list under those collection keys (e.g., IPCSpits, IPCMaleCoughs, IPCMaleYawn, IPCFemaleCoughs, IPCFemaleYawn) to use 4-space indentation so the `files` items align uniformly with other collections in speech_emote_sounds.yml.Resources/Prototypes/ADT/SoundCollections/emotes.yml (2)
81-90: Непоследовательный отступ в YAML для коллекцийIPCMaleCoughsиIPCMaleYawn.Элементы
filesиспользуют 2 пробела вместо 4, что нарушает единообразие форматирования.♻️ Предлагаемое исправление
- type: soundCollection id: IPCMaleCoughs files: - - /Audio/ADT/Voice/IPC/i_male_cough_1.ogg - - /Audio/ADT/Voice/IPC/i_male_cough_2.ogg + - /Audio/ADT/Voice/IPC/i_male_cough_1.ogg + - /Audio/ADT/Voice/IPC/i_male_cough_2.ogg - type: soundCollection id: IPCMaleYawn files: - - /Audio/ADT/Voice/IPC/i_male_yawn.ogg + - /Audio/ADT/Voice/IPC/i_male_yawn.ogg🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/ADT/SoundCollections/emotes.yml` around lines 81 - 90, Коллекции soundCollection с id IPCMaleCoughs и IPCMaleYawn имеют несоответствующий отступ для ключа и элементов files (используются 2 пробела); откорректируй YAML, выровняв ключ files и все его пунктовые элементы до 4 пробелов (сохрани тире для элементов списка) чтобы форматирование в этих записях стало последовательным и валидным.
121-130: Аналогичная проблема с отступами дляIPCFemaleCoughsиIPCFemaleYawn.♻️ Предлагаемое исправление
- type: soundCollection id: IPCFemaleCoughs files: - - /Audio/ADT/Voice/IPC/i_female_cough_1.ogg - - /Audio/ADT/Voice/IPC/i_female_cough_2.ogg + - /Audio/ADT/Voice/IPC/i_female_cough_1.ogg + - /Audio/ADT/Voice/IPC/i_female_cough_2.ogg - type: soundCollection id: IPCFemaleYawn files: - - /Audio/ADT/Voice/IPC/i_female_yawn.ogg + - /Audio/ADT/Voice/IPC/i_female_yawn.ogg🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/ADT/SoundCollections/emotes.yml` around lines 121 - 130, The YAML entries for the sound collections IPCFemaleCoughs and IPCFemaleYawn have incorrect indentation; update both items so the list item marker and its mapping keys are properly indented (e.g., the '-' for each sound collection and its child keys 'type', 'id', and 'files' align like other soundCollection entries) and ensure the file paths under 'files' are indented one level deeper than 'files'; modify the entries for IPCFemaleCoughs and IPCFemaleYawn to match the correct indentation pattern used by other soundCollection blocks.
🤖 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/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 499-525: The handler OnPointLightColorToggle must validate that
point-light customization is permitted before changing state: add an early
return at the start of OnPointLightColorToggle if the
MidroundCustomizationComponent's PointLightColor flag is false (i.e., if
component.PointLightColor == false) so the method does not flip
PointLightColorEnabled or apply colors for entities that don't support point
light customization; keep the rest of the logic unchanged and only proceed when
component.PointLightColor is true.
In `@Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs`:
- Around line 85-87: The timeout check in CrewMonitoringServerSystem.cs is using
dif.Seconds (which returns only the seconds component) causing incorrect timeout
logic; update the comparison to use the full duration via dif.TotalSeconds
(i.e., compute dif = _gameTiming.CurTime - sensor.Timestamp and compare
dif.TotalSeconds to component.SensorTimeout) so sensors are removed correctly
(affecting the block that currently calls toRemove.Add(address) when the timeout
is exceeded).
In `@Content.Shared/Medical/SuitSensors/SharedSuitSensorSystem.cs`:
- Around line 84-92: The code sets ent.Comp.User and marks Dirty(ent) when
ent.Comp.OnMob is true but skips assigning ent.Comp.StationId via
_stationSystem.GetOwningStation, which can leave StationId null; update the
OnMob branch in SharedSuitSensorSystem (the block that currently does
ent.Comp.User = ent.Owner; Dirty(ent);) to also initialize ent.Comp.StationId
using _stationSystem.GetOwningStation(ent.Owner) if StationId is null, and apply
the same fix to the analogous startup initialization path later (the block
around where RecursiveSensor()/OnPlayerSpawn are mentioned) so OnMob sensors
receive the fallback StationId like non-OnMob sensors.
- Around line 230-237: The added if (!ent.Comp.OnMob) wrapper causes the
owner/interaction check to be skipped for mobile targets, letting bystanders
start do-afters; remove the surrounding OnMob conditional so the existing
protection runs unconditionally: keep the inner condition that checks
ent.Comp.User, compares args.User != ent.Comp.User and calls
_actionBlocker.CanInteract(ent.Comp.User.Value, null), but ensure it is executed
regardless of ent.Comp.OnMob in SharedSuitSensorSystem so only the owner (or
when the owner cannot interact) can be bypassed.
In `@Resources/Audio/ADT/Voice/IPC/attributions.yml`:
- Around line 62-79: The YAML has malformed file entries like
[i_male_cry_1.ogg"] causing schema validation errors; fix each files: section so
the values are a proper YAML sequence of strings (e.g. files: followed by -
"i_male_cry_1.ogg" or - i_male_cry_1.ogg) ensuring quotes are balanced and
square brackets are removed from entries referencing i_male_cry_1.ogg,
i_male_cry_2.ogg, i_male_cry_3.ogg and i_male_cry_4.ogg so each filename is a
plain or quoted string in the list.
In `@Resources/Locale/ru-RU/ADT/traits/neutral.ftl`:
- Around line 41-42: В тексте ресурса для ключа trait-disproportionate-desc
исправьте орфографические ошибки: заменить "непропорциоально" на
"непропорционально" и "а так же" на "а также" (сделать слитно), оставив
остальную формулировку без изменений; проверьте также ключ
trait-disproportionate-name на соответствие термину "Непропорциональный".
In `@Resources/Prototypes/ADT/Traits/quirks.yml`:
- Around line 190-244: Квирки ADTFemaleIPC и ADTMaleIPC заменяют компонент Tag
(rewriteComponents: true) но в их components -> Tag списках отсутствует тег
SiliconEmotes, из‑за чего блокировки эмотов для силиконов ломаются; откройте
определения trait с id ADTFemaleIPC и ADTMaleIPC и добавьте "SiliconEmotes" в
массив tags внутри компонента Tag рядом с ADTSiliconEmotes для обоих квирков.
---
Outside diff comments:
In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 190-206: Remove/add slot handlers (e.g., OnRemoveSlotDoAfter and
the corresponding AddSlot handler in MidroundCustomizationSystem) update
markings but do not recalc the facial point light, leaving inherited point light
color stale; after calling _humanoid.RemoveMarking/_humanoid.AddMarking and
UpdateInterface(uid, component) call UpdatePointLightColorIfEnabled(uid,
component) (or the existing point-light update helper) to recompute the point
light color when FacialHair/markings change so the light stays in sync; apply
the same fix to the other similar handlers mentioned (lines around 227-264 and
528-540).
---
Nitpick comments:
In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.cs`:
- Around line 1-5: Reorder the using directives in
MidroundCustomizationComponent.cs to follow project alphabetical guidelines:
place Content.Shared.Mobs after Content.Shared.Humanoid.Markings and ensure all
other usings (e.g., Content.Shared.DoAfter, Content.Shared.Humanoid.Markings,
Robust.Shared.Audio, Robust.Shared.Prototypes) are sorted alphabetically; update
the top-of-file using block so the usings are in strict alphabetical order.
- Around line 12-29: Add XML documentation for the ChangeSlotOnStateEntry data
class: add a /// <summary> on the ChangeSlotOnStateEntry type describing its
role in changing a marking slot when a mob enters a given MobState, and add
brief /// <summary> comments for each public property (State, Category, Slot,
Marking, Colors) explaining what they represent (e.g., State = target MobState,
Category = marking category, Slot = slot index, Marking = marking id/string,
Colors = optional color overrides). Keep descriptions concise and use standard
XML doc tags so IDEs and generated docs will surface the intent.
- Around line 103-112: Add XML documentation comments for the new fields to
explain their purpose and usage: add <summary> (and <remarks> where helpful) for
PointLightColor, PointLightColorEnabled, OriginalPointLightColor,
RemovedMarkingsBuffer, and OriginalMarkings; describe that PointLightColor
toggles using a point light color override, PointLightColorEnabled is the
networked toggle, OriginalPointLightColor stores the pre-customization color,
RemovedMarkingsBuffer holds markings temporarily removed keyed by
MarkingCategories, and OriginalMarkings stores original marking data keyed by
(MarkingCategories, slot) so other devs understand intent and
serialization/networking behavior.
In `@Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs`:
- Line 81: Replace the subjective Russian inline comment in
CrewMonitoringServerSystem (the comment currently containing “Надеюсь…”) with a
neutral, technical one: succinctly state why the change is needed (e.g., that
without this change a remnant entity with OnMob: true remains in the monitor)
and remove any speculative or personal wording; locate the comment near the
CrewMonitoringServerSystem class/method and update it to a single clear sentence
describing the behavior being fixed.
In `@Content.Shared/ADT/Silicons/MobIpcComponent.cs`:
- Around line 6-13: Добавьте XML-документацию для компонента и его полей:
добавьте /// <summary> описывающий назначение класса MobIpcComponent и его роли,
затем /// <summary> для поля DisablePointLightOnDeath (объяснить, что делает
флаг — отключает ли точечный свет при смерти) и для поля LightDisabledByDeath
(объяснить, что хранит состояние — было ли свет отключён при смерти). Убедитесь,
что комментарии коротко описывают поведение и возможные значения флагов,
используя имена MobIpcComponent, DisablePointLightOnDeath и LightDisabledByDeath
для локализации изменений.
In `@Content.Shared/ADT/Silicons/MobIpcSystem.cs`:
- Line 6: Добавьте XML-документацию для нового публичного класса MobIpcSystem:
вставьте над объявлением класса /// <summary>…</summary> с коротким описанием
его ответственности — отключение фонарика IPC при смерти и восстановление после
ремонта (укажите, что это EntitySystem, управляющая поведением фонарика при
состояниях сущности). Упомяните в тексте класса имя MobIpcSystem и ключевые
сценарии (on death, on repair) чтобы следующий разработчик быстро понял
назначение.
In `@Content.Shared/Medical/SuitSensors/SuitSensorComponent.cs`:
- Around line 99-100: Add an XML summary comment for the OnMob field explaining
its purpose: above the [DataField, AutoNetworkedField] public bool OnMob =
false; declaration add a /// <summary> that states this boolean toggles the
sensor's new operating mode (i.e., when true the component uses the
alternate/“OnMob” behavior implemented in SharedSuitSensorSystem), and note
default value/behavior if helpful; ensure the comment is concise and placed
immediately above the field declaration.
In `@Resources/Prototypes/ADT/SoundCollections/emotes.yml`:
- Around line 81-90: Коллекции soundCollection с id IPCMaleCoughs и IPCMaleYawn
имеют несоответствующий отступ для ключа и элементов files (используются 2
пробела); откорректируй YAML, выровняв ключ files и все его пунктовые элементы
до 4 пробелов (сохрани тире для элементов списка) чтобы форматирование в этих
записях стало последовательным и валидным.
- Around line 121-130: The YAML entries for the sound collections
IPCFemaleCoughs and IPCFemaleYawn have incorrect indentation; update both items
so the list item marker and its mapping keys are properly indented (e.g., the
'-' for each sound collection and its child keys 'type', 'id', and 'files' align
like other soundCollection entries) and ensure the file paths under 'files' are
indented one level deeper than 'files'; modify the entries for IPCFemaleCoughs
and IPCFemaleYawn to match the correct indentation pattern used by other
soundCollection blocks.
In `@Resources/Prototypes/ADT/Voice/speech_emote_sounds.yml`:
- Around line 62-66: Collections IPCSpits, IPCMaleCoughs, IPCMaleYawn,
IPCFemaleCoughs and IPCFemaleYawn contain `files` entries indented with 2 spaces
instead of the project standard 4; update each `files` list under those
collection keys (e.g., IPCSpits, IPCMaleCoughs, IPCMaleYawn, IPCFemaleCoughs,
IPCFemaleYawn) to use 4-space indentation so the `files` items align uniformly
with other collections in speech_emote_sounds.yml.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e8a13f08-a00b-49b6-a8c7-fe2c8801afa4
⛔ Files ignored due to path filters (38)
Resources/Audio/ADT/Voice/IPC/i_female_cough_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cough_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_3.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_4.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_giggle_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_giggle_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_laugh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_laugh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sigh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sigh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sneeze_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sneeze_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_yawn.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cough_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cough_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_3.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_4.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_laugh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_laugh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sigh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sigh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sneeze_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sneeze_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_yawn.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_neutral_sneeze.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_spit_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_spit_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_3.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_4.oggis excluded by!**/*.ogg,!**/*.oggResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/ipc_screen_broken.pngis excluded by!**/*.png,!**/*.pngResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/ipc_screen_redtext.pngis excluded by!**/*.png,!**/*.pngResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/ipc_screen_text.pngis excluded by!**/*.png,!**/*.png
📒 Files selected for processing (30)
Content.Client/ADT/Lobby/UI/QuirksWindow.xaml.csContent.Client/ADT/MidroundCustomization/MidroundCustomizationBoundUserInterface.csContent.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xamlContent.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xaml.csContent.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.csContent.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.csContent.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.csContent.Server/Mobs/DeathgaspComponent.csContent.Server/Mobs/DeathgaspSystem.csContent.Server/Traits/TraitSystem.csContent.Shared/ADT/MidroundCustomization/BUI.csContent.Shared/ADT/Silicons/MobIpcComponent.csContent.Shared/ADT/Silicons/MobIpcSystem.csContent.Shared/Medical/SuitSensors/SharedSuitSensorSystem.csContent.Shared/Medical/SuitSensors/SuitSensorComponent.csContent.Shared/Traits/TraitPrototype.csResources/Audio/ADT/Voice/IPC/attributions.ymlResources/Locale/ru-RU/ADT/Chat/emotes.ftlResources/Locale/ru-RU/ADT/prototypes/Entities/Mobs/Customization/Markings/ipc.ftlResources/Locale/ru-RU/ADT/traits/neutral.ftlResources/Prototypes/ADT/Entities/Mobs/Customization/Markings/ipc_screens.ymlResources/Prototypes/ADT/Entities/Mobs/Species/ipc.ymlResources/Prototypes/ADT/InventoryTemplates/ipc_inventory_template.ymlResources/Prototypes/ADT/SoundCollections/emotes.ymlResources/Prototypes/ADT/Traits/quirks.ymlResources/Prototypes/ADT/Voice/speech_emote_sounds.ymlResources/Prototypes/ADT/Voice/speech_emotes.ymlResources/Prototypes/Voice/disease_emotes.ymlResources/Prototypes/Voice/speech_emotes.ymlResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/meta.json
Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs
Outdated
Show resolved
Hide resolved
|
@coderabbitai проверь код на вайбкодинг |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainСейчас проверю код на признаки вайбкодинга. 🏁 Script executed: Length of output: 32356
🔴 1. Несоответствие названий (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs (1)
16-19: Отсортируйтеusingпо алфавиту в общем блоке.Новые импорты здесь выбились из порядка для
/ADT/-файлов:Content.Shared.Mobs*сейчас стоит послеSystem.Linq, аRobust.Shared.GameObjects— послеRobust.Shared.Prototypes.♻️ Минимальная правка
using Content.Shared.Humanoid.Markings; using Content.Shared.Interaction; +using Content.Shared.Mobs; +using Content.Shared.Mobs.Components; using Content.Shared.Preferences; using Content.Shared.UserInterface; using Robust.Server.GameObjects; using Robust.Shared.Audio.Systems; +using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; using System.Linq; -using Content.Shared.Mobs; -using Content.Shared.Mobs.Components; -using Robust.Shared.GameObjects;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/MidroundCustomization/MidroundCustomizationSystem.cs` around lines 16 - 19, Сортировка using в файле нарушена: в MidroundCustomizationSystem.cs переместите все директивы using в общий блок и отсортируйте их по алфавиту; конкретно упорядочите записи включая System.Linq, Content.Shared.Mobs, Content.Shared.Mobs.Components, Robust.Shared.GameObjects (и Robust.Shared.Prototypes, если присутствует) так, чтобы они шли в лексикографическом порядке внутри одного блока using.
🤖 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/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 195-205: Validate args.Slot is within bounds (>= 0 and <
markings.Count) before any indexing or passing it to RemoveMarking: when
TryComp<HumanoidAppearanceComponent> and humanoid.MarkingSet.TryGetCategory(...)
succeed, check args.Slot >= 0 && args.Slot < markings.Count before reading
markings[args.Slot] and writing component.RemovedMarkingsBuffer[args.Category];
if the slot is invalid skip the buffer save and do not call
_humanoid.RemoveMarking(uid, args.Category, args.Slot). Keep the existing
UpdatePointLightColorIfEnabled(uid, component) call only after a successful
removal.
- Around line 588-610: Apply bounds checking for entries in ChangeSlotOnState
inside ApplyStateChanges: before calling _humanoid.SetMarkingId or
_humanoid.SetMarkingColor, ensure the entry.Slot is >= 0 and that
humanoid.MarkingSet.TryGetCategory(entry.Category, out var list) returns true
and entry.Slot < list.Count; if the checks fail, skip that entry. Mirror the
same validation logic used in RecordOriginals to avoid negative or out-of-range
slot indices causing exceptions when using SetMarkingId/SetMarkingColor.
- Around line 560-576: The transition logic for ChangeSlotOnState fails to clear
previous overrides when switching between two managed states; update the handler
so that when both oldManaged and newManaged are true (i.e., args.OldMobState and
args.NewMobState are both in component.ChangeSlotOnState) you first reset the
managed slots by calling RevertToOriginals(uid, component, humanoid) (to clear
OriginalMarkings), then call ApplyStateChanges(uid, component, args.NewMobState,
humanoid) to apply the new state's overrides; keep existing paths for
only-entering (RecordOriginals) and only-leaving behavior unchanged.
---
Nitpick comments:
In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 16-19: Сортировка using в файле нарушена: в
MidroundCustomizationSystem.cs переместите все директивы using в общий блок и
отсортируйте их по алфавиту; конкретно упорядочите записи включая System.Linq,
Content.Shared.Mobs, Content.Shared.Mobs.Components, Robust.Shared.GameObjects
(и Robust.Shared.Prototypes, если присутствует) так, чтобы они шли в
лексикографическом порядке внутри одного блока using.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 88d0e01b-c97a-46bf-b790-416d8c6f0c16
📒 Files selected for processing (7)
Content.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xamlContent.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.csContent.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.csContent.Shared/Medical/SuitSensors/SharedSuitSensorSystem.csResources/Audio/ADT/Voice/IPC/attributions.ymlResources/Locale/ru-RU/ADT/actions/ipsscreen.ftlResources/Locale/ru-RU/ADT/traits/neutral.ftl
✅ Files skipped from review due to trivial changes (3)
- Resources/Audio/ADT/Voice/IPC/attributions.yml
- Resources/Locale/ru-RU/ADT/traits/neutral.ftl
- Resources/Locale/ru-RU/ADT/actions/ipsscreen.ftl
🚧 Files skipped from review as they are similar to previous changes (3)
- Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs
- Content.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xaml
- Content.Shared/Medical/SuitSensors/SharedSuitSensorSystem.cs
Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs
Outdated
Show resolved
Hide resolved
|
@coderabbitai проверь PR пж |
|
PR description images описание:
🧠 Learnings used✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 2
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/MidroundCustomization/MidroundCustomizationSystem.cs (1)
155-163:⚠️ Potential issue | 🟠 MajorПровалидируйте
args.SlotдоSetMarkingColor().Отрицательный или выходящий за границы
slotиз BUI здесь всё ещё проходит на сервер без проверки и сразу уходит в_humanoid.SetMarkingColor(). Это оставляет незащищённую ветку для невалидного клиентского ввода.💡 Минимальная правка
private void OnChangeColorDoAfter(EntityUid uid, MidroundCustomizationComponent component, SlimeHairChangeColorDoAfterEvent args) { if (args.Handled || args.Target == null || args.Cancelled) return; + + if (!TryComp<HumanoidAppearanceComponent>(uid, out var humanoid) || + !humanoid.MarkingSet.TryGetCategory(args.Category, out var markings) || + args.Slot < 0 || + args.Slot >= markings.Count) + return; _humanoid.SetMarkingColor(uid, args.Category, args.Slot, args.Colors, force: false);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs` around lines 155 - 163, In OnChangeColorDoAfter, validate args.Slot before calling _humanoid.SetMarkingColor: check that args.Slot is >= 0 and within the allowed slot range for the relevant category (e.g. compare against a slot count/array on MidroundCustomizationComponent or a known max slots for the category); if the slot is out of range, bail out (return) or mark the event handled instead of calling _humanoid.SetMarkingColor; keep the existing UpdatePointLightColorIfEnabled call only for valid slots.
♻️ Duplicate comments (1)
Resources/Locale/ru-RU/ADT/traits/neutral.ftl (1)
41-42:⚠️ Potential issue | 🟡 MinorПунктуационная ошибка.
В строке 42 пропущена запятая перед "а также": "карманы а также датчики" → "карманы, а также датчики".
✏️ Исправление
trait-disproportionate-name = Непропорциональный -trait-disproportionate-desc = Ваше тело непропорционально, не позволяя носить комбинезоны. Взамен вы снабжены встроенными разъёмами под КПК, карманы а также датчики. +trait-disproportionate-desc = Ваше тело непропорционально, не позволяя носить комбинезоны. Взамен вы снабжены встроенными разъёмами под КПК, карманы, а также датчики.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Locale/ru-RU/ADT/traits/neutral.ftl` around lines 41 - 42, В описании trait-disproportionate-desc исправьте пунктуацию: вставьте запятую перед "а также" — изменить фразу "карманы а также датчики" на "карманы, а также датчики" в строке значения trait-disproportionate-desc.
🧹 Nitpick comments (6)
Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs (1)
80-81: Сделайте комментарий здесь техническим, а не разговорным.Фраза
Надеюсь это ничего не сломаетне объясняет, какой инвариант защищает этот блок. Лучше явно зафиксировать причину второго прохода удаления и, если это важно, отдельно упомянуть кейс встроенных датчиковOnMob: true.💬 Вариант правки
- // Без этих изменений, в мониторинге остаётся ремнант сущности с OnMob: true. Надеюсь это ничего не сломает. + // Собираем истёкшие записи отдельно и удаляем их после обхода, + // чтобы не модифицировать SensorStatus во время foreach. + // Это также очищает устаревшие записи встроенных датчиков (`OnMob: true`).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs` around lines 80 - 81, Replace the conversational Russian comment around the "ADT-Tweak-Start" block in CrewMonitoringServerSystem (the comment above the second removal pass) with a concise technical explanation that documents the invariant being protected and why a second removal pass is necessary: state that the extra pass ensures entities flagged OnMob (embedded sensors) do not remain as remnants after the first cleanup, describe the specific invariant (no monitoring entities should persist with OnMob == true after cleanup), and mention any edge-case behavior for embedded sensors so future maintainers understand why the deletion is repeated.Content.Shared/ADT/Silicons/MobIpcComponent.cs (1)
6-14: Рекомендуется добавить XML-документацию к компоненту.Компонент
MobIpcComponentи его поля не имеют/// <summary>документации. Для лучшей читаемости и поддержки кода рекомендуется добавить описание назначения компонента.Также
LightDisabledByDeathявляется runtime-флагом состояния. Если это поле не предназначено для сериализации из YAML-прототипов, атрибут[DataField]можно убрать.📝 Предложение по документации
namespace Content.Shared.ADT.Silicon; +/// <summary> +/// Компонент для КПБ (IPC), управляющий поведением point-light при смерти моба. +/// </summary> [RegisterComponent] public sealed partial class MobIpcComponent : Component { + /// <summary> + /// Если true, point-light будет отключаться при смерти моба. + /// </summary> [DataField] public bool DisablePointLightOnDeath = false; + /// <summary> + /// Runtime-флаг: true, если свет был отключён системой при смерти. + /// </summary> - [DataField] public bool LightDisabledByDeath; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/ADT/Silicons/MobIpcComponent.cs` around lines 6 - 14, Добавьте XML-документацию для компонента MobIpcComponent и его публичных полей: поместите /// <summary>...</summary> над объявлением класса MobIpcComponent и над полями DisablePointLightOnDeath и LightDisabledByDeath, кратко описав назначение компонента и каждого поля; если LightDisabledByDeath используется только как runtime-флаг и не должен сериализоваться из прототипов, удалите атрибут [DataField] с поля LightDisabledByDeath, оставив его как обычное публичное поле.Content.Shared/Medical/SuitSensors/SuitSensorComponent.cs (1)
97-101: Рекомендуется добавить XML-документацию для поляOnMob.Поле
OnMobне имеет/// <summary>документации, в отличие от остальных полей компонента.📝 Предложение по документации
//ADT-Tweak-Start + /// <summary> + /// Если true, датчик встроен в моба (КПБ/IPC) и не требует ношения одежды для активации. + /// </summary> [DataField, AutoNetworkedField] public bool OnMob = false; //ADT-Tweak-End🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/Medical/SuitSensors/SuitSensorComponent.cs` around lines 97 - 101, Add an XML summary for the public bool field OnMob in SuitSensorComponent to match the style of the other documented fields; update the declaration marked with [DataField, AutoNetworkedField] and the symbol name OnMob by inserting a /// <summary> that briefly explains what OnMob controls (e.g., whether sensors detect mobs/creatures or operate on mobile entities) and any important behavior or default meaning so the field is documented consistently with the rest of the component.Content.Shared/ADT/Silicons/MobIpcSystem.cs (1)
6-39: Рекомендуется добавить XML-документацию к системе.Система
MobIpcSystemне имеет документации. Рекомендуется добавить/// <summary>для класса и методаOnMobStateChanged.📝 Предложение по документации
namespace Content.Shared.ADT.Silicon; +/// <summary> +/// Система управления поведением КПБ (IPC) при изменении состояния моба. +/// Отключает point-light при смерти и восстанавливает при оживлении. +/// </summary> public sealed class MobIpcSystem : EntitySystem { [Dependency] private readonly SharedPointLightSystem _pointLight = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent<MobIpcComponent, MobStateChangedEvent>(OnMobStateChanged); } + /// <summary> + /// Обрабатывает изменение состояния моба: отключает свет при смерти, включает при оживлении. + /// </summary> private void OnMobStateChanged(Entity<MobIpcComponent> ent, ref MobStateChangedEvent args)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/ADT/Silicons/MobIpcSystem.cs` around lines 6 - 39, Add XML documentation comments for the MobIpcSystem class and its OnMobStateChanged method: add a /// <summary> for MobIpcSystem describing that it subscribes to mob state changes and manages point light behavior on death/resurrection, and add /// <summary> on OnMobStateChanged explaining it handles MobStateChangedEvent, disables the point light when NewMobState==MobState.Dead (respecting DisablePointLightOnDeath), marks LightDisabledByDeath and calls Dirty, and restores the light when transitioning from Dead if LightDisabledByDeath was set; also add <param> tags for the ent and args parameters to describe their roles and mention any side effects (calls to SharedPointLightSystem methods and Dirty).Content.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xaml.cs (1)
1-21: Рекомендуется упорядочить using-директивы.В соответствии с coding guidelines, using-директивы в файлах
/ADT/должны быть в алфавитном порядке. СейчасSystem.LinqиSystem.Numericsрасположены в конце (строки 20-21), хотя должны быть в начале или среди других namespace'ов по алфавиту.♻️ Предлагаемое исправление
-using Content.Client.ADT.Bark; +using System.Linq; +using System.Numerics; +using Content.Client.ADT.Bark; using Content.Client.ADT.SpeechBarks; ... using Robust.Shared.Prototypes; -using System.Linq; -using System.Numerics;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.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xaml.cs` around lines 1 - 21, The using directives at the top of MidroundCustomizationWindow.xaml.cs are not alphabetized; reorder all using statements in that file (the ones above the class MidroundCustomizationWindow) into strict alphabetical order (by namespace string) so System.* (System.Linq, System.Numerics) appear in the correct position among the others, preserving any blank lines grouping (e.g., framework vs project usings) if present and ensuring no duplicates are introduced.Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs (1)
504-530: Упростите предопределённые ветки вOnPointLightColorToggle().После раннего выхода по текущему состоянию обе внутренние проверки уже известны заранее: в ветке
args.Enabledфлаг ещё выключен, а вelse— ещё включён. Сейчас это просто лишний шум в обработчике.♻️ Упрощение без изменения поведения
if (args.Enabled) { - // сохраняем оригинальный цвет при первом включении - if (!component.PointLightColorEnabled) - { - if (_pointLight.TryGetLight(uid, out var light)) - component.OriginalPointLightColor = light.Color; - } + if (_pointLight.TryGetLight(uid, out var light)) + component.OriginalPointLightColor = light.Color; component.PointLightColorEnabled = true; UpdatePointLightColorIfEnabled(uid, component); } else { - if (component.PointLightColorEnabled) - { - _pointLight.SetColor(uid, component.OriginalPointLightColor); - } + _pointLight.SetColor(uid, component.OriginalPointLightColor); component.PointLightColorEnabled = false; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs` around lines 504 - 530, The handler OnPointLightColorToggle contains redundant inner checks for PointLightColorEnabled after already returning when component.PointLightColorEnabled == args.Enabled; remove those unnecessary conditionals: in the args.Enabled branch assume the flag was previously false—capture OriginalPointLightColor via _pointLight.TryGetLight once, set component.PointLightColorEnabled = true and call UpdatePointLightColorIfEnabled(uid, component); in the else branch assume the flag was previously true—call _pointLight.SetColor(uid, component.OriginalPointLightColor) and then set component.PointLightColorEnabled = false; keep all referenced symbols (MidroundCustomizationComponent.PointLightColorEnabled, OriginalPointLightColor, _pointLight.TryGetLight, _pointLight.SetColor, UpdatePointLightColorIfEnabled, args.Enabled) unchanged.
🤖 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/Customization/Markings/ipc_screens.yml`:
- Around line 735-742: The ADTIPCScreenBroken marking entry is missing the
shader setting so it won't glow like the other IPC screen markings; update the
marking block with id ADTIPCScreenBroken (bodyPart: FacialHair, markingCategory:
FacialHair, sprites state ipc_screen_broken) to include "shader: unshaded"
alongside the existing sprite entry so it matches the other IPC screen markings
and restores the glow effect.
In `@Resources/Prototypes/ADT/Traits/quirks.yml`:
- Around line 190-244: Make ADTFemaleIPC and ADTMaleIPC mutually exclusive by
adding a mutual exclusion key to each trait so they cannot both be applied;
specifically, add a field like mutuallyExclusiveWith: [ADTMaleIPC] to the
ADTFemaleIPC trait and mutuallyExclusiveWith: [ADTFemaleIPC] to the ADTMaleIPC
trait (use the project's existing exclusion/key name if different but reference
the trait IDs ADTFemaleIPC and ADTMaleIPC so the engine prevents both quirks
from being selected together).
---
Outside diff comments:
In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 155-163: In OnChangeColorDoAfter, validate args.Slot before
calling _humanoid.SetMarkingColor: check that args.Slot is >= 0 and within the
allowed slot range for the relevant category (e.g. compare against a slot
count/array on MidroundCustomizationComponent or a known max slots for the
category); if the slot is out of range, bail out (return) or mark the event
handled instead of calling _humanoid.SetMarkingColor; keep the existing
UpdatePointLightColorIfEnabled call only for valid slots.
---
Duplicate comments:
In `@Resources/Locale/ru-RU/ADT/traits/neutral.ftl`:
- Around line 41-42: В описании trait-disproportionate-desc исправьте
пунктуацию: вставьте запятую перед "а также" — изменить фразу "карманы а также
датчики" на "карманы, а также датчики" в строке значения
trait-disproportionate-desc.
---
Nitpick comments:
In
`@Content.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xaml.cs`:
- Around line 1-21: The using directives at the top of
MidroundCustomizationWindow.xaml.cs are not alphabetized; reorder all using
statements in that file (the ones above the class MidroundCustomizationWindow)
into strict alphabetical order (by namespace string) so System.* (System.Linq,
System.Numerics) appear in the correct position among the others, preserving any
blank lines grouping (e.g., framework vs project usings) if present and ensuring
no duplicates are introduced.
In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 504-530: The handler OnPointLightColorToggle contains redundant
inner checks for PointLightColorEnabled after already returning when
component.PointLightColorEnabled == args.Enabled; remove those unnecessary
conditionals: in the args.Enabled branch assume the flag was previously
false—capture OriginalPointLightColor via _pointLight.TryGetLight once, set
component.PointLightColorEnabled = true and call
UpdatePointLightColorIfEnabled(uid, component); in the else branch assume the
flag was previously true—call _pointLight.SetColor(uid,
component.OriginalPointLightColor) and then set component.PointLightColorEnabled
= false; keep all referenced symbols
(MidroundCustomizationComponent.PointLightColorEnabled, OriginalPointLightColor,
_pointLight.TryGetLight, _pointLight.SetColor, UpdatePointLightColorIfEnabled,
args.Enabled) unchanged.
In `@Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs`:
- Around line 80-81: Replace the conversational Russian comment around the
"ADT-Tweak-Start" block in CrewMonitoringServerSystem (the comment above the
second removal pass) with a concise technical explanation that documents the
invariant being protected and why a second removal pass is necessary: state that
the extra pass ensures entities flagged OnMob (embedded sensors) do not remain
as remnants after the first cleanup, describe the specific invariant (no
monitoring entities should persist with OnMob == true after cleanup), and
mention any edge-case behavior for embedded sensors so future maintainers
understand why the deletion is repeated.
In `@Content.Shared/ADT/Silicons/MobIpcComponent.cs`:
- Around line 6-14: Добавьте XML-документацию для компонента MobIpcComponent и
его публичных полей: поместите /// <summary>...</summary> над объявлением класса
MobIpcComponent и над полями DisablePointLightOnDeath и LightDisabledByDeath,
кратко описав назначение компонента и каждого поля; если LightDisabledByDeath
используется только как runtime-флаг и не должен сериализоваться из прототипов,
удалите атрибут [DataField] с поля LightDisabledByDeath, оставив его как обычное
публичное поле.
In `@Content.Shared/ADT/Silicons/MobIpcSystem.cs`:
- Around line 6-39: Add XML documentation comments for the MobIpcSystem class
and its OnMobStateChanged method: add a /// <summary> for MobIpcSystem
describing that it subscribes to mob state changes and manages point light
behavior on death/resurrection, and add /// <summary> on OnMobStateChanged
explaining it handles MobStateChangedEvent, disables the point light when
NewMobState==MobState.Dead (respecting DisablePointLightOnDeath), marks
LightDisabledByDeath and calls Dirty, and restores the light when transitioning
from Dead if LightDisabledByDeath was set; also add <param> tags for the ent and
args parameters to describe their roles and mention any side effects (calls to
SharedPointLightSystem methods and Dirty).
In `@Content.Shared/Medical/SuitSensors/SuitSensorComponent.cs`:
- Around line 97-101: Add an XML summary for the public bool field OnMob in
SuitSensorComponent to match the style of the other documented fields; update
the declaration marked with [DataField, AutoNetworkedField] and the symbol name
OnMob by inserting a /// <summary> that briefly explains what OnMob controls
(e.g., whether sensors detect mobs/creatures or operate on mobile entities) and
any important behavior or default meaning so the field is documented
consistently with the rest of the component.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2ed136f3-83b6-46fc-b128-69f874e7ad48
⛔ Files ignored due to path filters (38)
Resources/Audio/ADT/Voice/IPC/i_female_cough_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cough_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_3.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_cry_4.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_giggle_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_giggle_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_laugh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_laugh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sigh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sigh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sneeze_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_sneeze_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_female_yawn.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cough_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cough_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_3.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_cry_4.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_laugh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_laugh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sigh_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sigh_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sneeze_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_sneeze_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_male_yawn.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_neutral_sneeze.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_spit_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_spit_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_1.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_2.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_3.oggis excluded by!**/*.ogg,!**/*.oggResources/Audio/ADT/Voice/IPC/i_whistle_4.oggis excluded by!**/*.ogg,!**/*.oggResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/ipc_screen_broken.pngis excluded by!**/*.png,!**/*.pngResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/ipc_screen_redtext.pngis excluded by!**/*.png,!**/*.pngResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/ipc_screen_text.pngis excluded by!**/*.png,!**/*.png
📒 Files selected for processing (31)
Content.Client/ADT/Lobby/UI/QuirksWindow.xaml.csContent.Client/ADT/MidroundCustomization/MidroundCustomizationBoundUserInterface.csContent.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xamlContent.Client/ADT/MidroundCustomization/MidroundCustomizationWindow.xaml.csContent.Server/ADT/MidroundCustomization/MidroundCustomizationComponent.csContent.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.csContent.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.csContent.Server/Mobs/DeathgaspComponent.csContent.Server/Mobs/DeathgaspSystem.csContent.Server/Traits/TraitSystem.csContent.Shared/ADT/MidroundCustomization/BUI.csContent.Shared/ADT/Silicons/MobIpcComponent.csContent.Shared/ADT/Silicons/MobIpcSystem.csContent.Shared/Medical/SuitSensors/SharedSuitSensorSystem.csContent.Shared/Medical/SuitSensors/SuitSensorComponent.csContent.Shared/Traits/TraitPrototype.csResources/Audio/ADT/Voice/IPC/attributions.ymlResources/Locale/ru-RU/ADT/Chat/emotes.ftlResources/Locale/ru-RU/ADT/actions/ipsscreen.ftlResources/Locale/ru-RU/ADT/prototypes/Entities/Mobs/Customization/Markings/ipc.ftlResources/Locale/ru-RU/ADT/traits/neutral.ftlResources/Prototypes/ADT/Entities/Mobs/Customization/Markings/ipc_screens.ymlResources/Prototypes/ADT/Entities/Mobs/Species/ipc.ymlResources/Prototypes/ADT/InventoryTemplates/ipc_inventory_template.ymlResources/Prototypes/ADT/SoundCollections/emotes.ymlResources/Prototypes/ADT/Traits/quirks.ymlResources/Prototypes/ADT/Voice/speech_emote_sounds.ymlResources/Prototypes/ADT/Voice/speech_emotes.ymlResources/Prototypes/Voice/disease_emotes.ymlResources/Prototypes/Voice/speech_emotes.ymlResources/Textures/ADT/Mobs/Customization/Ipc/ipc_screens.rsi/meta.json
Resources/Prototypes/ADT/Entities/Mobs/Customization/Markings/ipc_screens.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs (1)
16-19: Нарушен алфавитный порядокusing.Новые импорты размещены в конце файла, но должны быть интегрированы в алфавитном порядке согласно правилам проекта для
/ADT/систем.♻️ Исправление порядка
using Content.Shared.Interaction; +using Content.Shared.Mobs; +using Content.Shared.Mobs.Components; using Content.Shared.Preferences; using Content.Shared.UserInterface; using Robust.Server.GameObjects; using Robust.Shared.Audio.Systems; +using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; using System.Linq; -using Content.Shared.Mobs; -using Content.Shared.Mobs.Components; -using Robust.Shared.GameObjects;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/MidroundCustomization/MidroundCustomizationSystem.cs` around lines 16 - 19, The using directives for MidroundCustomizationSystem are not alphabetized; reorder the existing usings (System.Linq, Content.Shared.Mobs, Content.Shared.Mobs.Components, Robust.Shared.GameObjects) into proper alphabetical order and integrate any new imports accordingly so the top-of-file usings for the MidroundCustomizationSystem follow the project's /ADT/ alphabetical convention.
🤖 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/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 625-638: RevertToOriginals currently iterates
component.OriginalMarkings and calls _humanoid.SetMarkingId/SetMarkingColor
without validating that the (cat, slot) still exists; replicate the slot-bounds
check used in ApplyStateChanges: for each (cat, slot) fetch the current
MarkingSet for that category (via the humanoid/marking API used elsewhere),
ensure slot is within the set's valid range (slot >= 0 && slot <
markingSet.Slots/Count), and only then call _humanoid.SetMarkingId and
_humanoid.SetMarkingColor; if the marking set or slot is missing, skip that
entry to avoid out-of-range errors.
---
Nitpick comments:
In `@Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.cs`:
- Around line 16-19: The using directives for MidroundCustomizationSystem are
not alphabetized; reorder the existing usings (System.Linq, Content.Shared.Mobs,
Content.Shared.Mobs.Components, Robust.Shared.GameObjects) into proper
alphabetical order and integrate any new imports accordingly so the top-of-file
usings for the MidroundCustomizationSystem follow the project's /ADT/
alphabetical convention.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9a77c1e0-9490-4997-8405-ed2c2d21f847
📒 Files selected for processing (3)
Content.Server/ADT/MidroundCustomization/MidroundCustomizationSystem.csContent.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.csResources/Locale/ru-RU/ADT/traits/neutral.ftl
🚧 Files skipped from review as they are similar to previous changes (2)
- Resources/Locale/ru-RU/ADT/traits/neutral.ftl
- Content.Server/Medical/CrewMonitoring/CrewMonitoringServerSystem.cs



Описание PR
Вроде бы ничего не забыл...
Почему / Баланс
Медиа
Галочка для наследования цвета с экрана у фонаря:






Фонарь наследует цвет экрана:
Черта непропорциональный (нет слота под комбинезон, встроенные датчики и ячейки под КПК с карманами):
Колесо эмоций с одной из особенностей на голосовой модуль (эксклюзивные звуки имеются):
Умерший КПБ с сломанным монитором и новым предсмертным хрипом:
Новый "красный" текст:
Чейнджлог
🆑 Kerfus