Новая раса - ксеноморфы - #35
Conversation
|
RSI Diff Bot; head commit d4f2632 merging into f9ce7ca Resources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/head.rsi
Resources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/tails.rsi
Resources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/tracheas.rsi
Resources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/displacement.rsi
Resources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi
|
|
В changelog добавить |
|
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:
Анализ Pull RequestWalkthroughВ этом PR добавляется система колективного разума для чата (в основном закомментирована), клиентская система ночного видения с наложением шейдеров, новый вид персонажей HumanoidXeno с полным набором органов и частей тела, звуковые коллекции, локализация и прототипы сущностей. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested labels
Suggested reviewers
Poem
🚥 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)
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: 17
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Content.Shared/Chat/ChatChannel.cs (1)
86-91:⚠️ Potential issue | 🔴 CriticalКонфликт битовых флагов:
CollectiveMindиUnspecifiedиспользуют один и тот же бит.На Line 86 и Line 91 оба значения равны
1 << 14. Это приводит к некорректной фильтрации/маршрутизации сообщений между каналами.🐛 Исправление конфликта флагов
CollectiveMind = 1 << 14, @@ - Unspecified = 1 << 14, + Unspecified = 1 << 15,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/Chat/ChatChannel.cs` around lines 86 - 91, The enum has a bit-flag collision: both CollectiveMind and Unspecified are defined as 1 << 14; change Unspecified to a non-overlapping value (recommended: set Unspecified = 0 for a default/none value) so it no longer shares the same bit as CollectiveMind; update the definitions for Unspecified and verify usage in ChatChannel enum consumers to ensure no logic expects the old duplicated bit.
🟡 Minor comments (9)
Resources/Locale/en-US/_Starlight/collective-mind.ftl-8-8 (1)
8-8:⚠️ Potential issue | 🟡 MinorИсправьте опечатку в названии канала Cluwne.
В текущем виде значение отображается как
Cluwn, что выглядит как пропущенная буква и попадает в пользовательский интерфейс.✏️ Предлагаемая правка
-collective-mind-cluwne = Cluwn +collective-mind-cluwne = Cluwne🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Locale/en-US/_Starlight/collective-mind.ftl` at line 8, Значение локали для ключа collective-mind-cluwne содержит опечатку ("Cluwn"); откройте запись с идентификатором collective-mind-cluwne и исправьте правую часть значения на корректное имя "Cluwne" (заменить "Cluwn" → "Cluwne") чтобы отображение в UI было правильным.Content.Shared/CollectiveMind/CollectiveMindComponent.cs-36-37 (1)
36-37:⚠️ Potential issue | 🟡 MinorНеинициализированное non-nullable поле
PrototypeId.Поле
PrototypeIdобъявлено какstring(non-nullable), но не имеет значения по умолчанию. Это вызовет предупреждение компилятора CS8618 и может привести к NullReferenceException.🐛 Предлагаемое исправление
[DataField] -public string PrototypeId; +public string PrototypeId = string.Empty;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/CollectiveMind/CollectiveMindComponent.cs` around lines 36 - 37, Поле PrototypeId в классе CollectiveMindComponent объявлено как non-nullable string, но не инициализировано; присвойте ему безопасное значение по умолчанию (например = string.Empty) или сделайте тип nullable (string?) в зависимости от семантики. Найдите объявление public string PrototypeId в CollectiveMindComponent и либо изменить на public string PrototypeId = string.Empty;, либо на public string? PrototypeId; чтобы устранить предупреждение CS8618 и избежать возможного NullReferenceException.Content.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.cs-64-78 (1)
64-78:⚠️ Potential issue | 🟡 MinorКомментарии с процентами не соответствуют фактической логике.
Указанные в комментариях проценты не совпадают с диапазонами:
< 0.1= 10%, комментарий говорит 15%< 0.25= 15% (0.25-0.1), комментарий говорит 10%- И так далее...
Также строка 69 (
< 0.0) — мёртвый код, так какNextDouble()возвращает значения в диапазоне[0.0, 1.0).📝 Исправление комментариев для соответствия логике
private string CorruptLetter(char letter) { var res = _random.NextDouble(); return res switch { - < 0.0 => letter.ToString(), // shouldn't be less than 0! - < 0.1 => CorruptRandom(), // 15% chance to replace with one random character - < 0.25 => CorruptRandomMultiple(_random.Next(2, 5)), // 10% chance for between 2 and 5 random characters - < 0.5 => "", // 25% chance to remove character - < 0.75 => CorruptRepeat(letter), // 25% to repeat the character - < 0.9 => CorruptRepeat(CorruptRandom()[0]), // 15% to repeat a corrupted character - < 1.0 => CorruptRepeat(CorruptRandomMultiple(_random.Next(2, 5))[0]), // 10% chance for between 2 and 5 random corrupted characters - _ => letter.ToString(), // shouldn't be greater than 1! + < 0.1 => CorruptRandom(), // 10% chance to replace with one random character + < 0.25 => CorruptRandomMultiple(_random.Next(2, 5)), // 15% chance for 2-5 random characters + < 0.5 => "", // 25% chance to remove character + < 0.75 => CorruptRepeat(letter), // 25% chance to repeat the character + < 0.9 => CorruptRepeat(CorruptRandom()[0]), // 15% chance to repeat a corrupted character + _ => CorruptRepeat(CorruptRandomMultiple(_random.Next(2, 5))[0]), // 10% chance for repeated random characters }; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.cs` around lines 64 - 78, Summary: The inline percentage comments in CorruptLetter do not match the actual probabilities from _random.NextDouble() and the "< 0.0" branch is dead code. Fix: in CollectiveMind.CorruptLetter update or remove the dead "< 0.0" branch, and correct the inline comments for each switch arm in CorruptLetter to reflect the real probabilities produced by _random.NextDouble() ( <0.1 == 10%, <0.25 == 15%, <0.5 == 25%, <0.75 == 25%, <0.9 == 15%, <1.0 == 10% ), ensuring comments reference the corresponding behavior (CorruptRandom, CorruptRandomMultiple, empty string, CorruptRepeat, etc.) so the comments match the actual thresholds.Content.Shared/Chat/SharedChatSystem.cs-218-253 (1)
218-253:⚠️ Potential issue | 🟡 MinorОпечатка в названии метода и некорректная логика возврата.
Метод называется
TryProccessCollectiveMindMessage— должно бытьTryProcessCollectiveMindMessage(двойная 'c' вместо одной 's').Логика на строках 246-252 отличается от аналогичной логики в
TryProcessRadioMessage: возвращаетtrueеслиchannel == null && quiet, ноfalseеслиchannel == null && !quiet. Это противоречит контракту: вTryProcessRadioMessageметод всегда возвращаетtrueпри обнаружении префикса, независимо от успешности поиска канала.♻️ Предлагаемое исправление для консистентности с TryProcessRadioMessage
-public bool TryProccessCollectiveMindMessage( +public bool TryProcessCollectiveMindMessage( EntityUid source, string input, out string output, out CollectiveMindPrototype? channel, bool quiet = false) { // ... existing code ... - if (_mindKeyCodes.TryGetValue(channelKey, out channel) || quiet) - return true; - - var msg = Loc.GetString("chat-manager-no-such-channel", ("key", channelKey)); - _popup.PopupEntity(msg, source, source); - - return false; + if (!_mindKeyCodes.TryGetValue(channelKey, out channel) && !quiet) + { + var msg = Loc.GetString("chat-manager-no-such-channel", ("key", channelKey)); + _popup.PopupEntity(msg, source, source); + } + + return true; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/Chat/SharedChatSystem.cs` around lines 218 - 253, Rename the method TryProccessCollectiveMindMessage to TryProcessCollectiveMindMessage (fix the double 'c') and adjust return logic to match TryProcessRadioMessage: when the input has the CollectiveMindPrefix the method should return true after handling the prefix regardless of whether a channel was found; specifically, after computing channelKey, output, and attempting _mindKeyCodes.TryGetValue(channelKey, out channel), do not return false when channel is null and quiet is false — instead ensure the method returns true after showing the no-such-channel popup (still set channel = null and popup the message when not quiet) so prefix-detection always yields true.Resources/Prototypes/_OpenSpace/InventoryTemplates/humanoid_xeno.yml-126-128 (1)
126-128:⚠️ Potential issue | 🟡 MinorДобавьте определение тега
NoXenoвtags.yml.Тег
NoXenoиспользуется в чёрном списке для слота обуви вhumanoid_xeno.yml(строка 128), но его определение отсутствует вResources/Prototypes/tags.yml. Добавьте определение тега в файлtags.ymlв алфавитном порядке, следуя существующему формату, с указанием назначения тега.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/_OpenSpace/InventoryTemplates/humanoid_xeno.yml` around lines 126 - 128, Добавьте определение тега NoXeno в Resources/Prototypes/tags.yml (вставьте запись в алфавитном порядке по ключу), используя тот же формат, что и другие теги: ключ "NoXeno" с кратким описанием назначения тега (например: "Запрещает использование ксеноморфных предметов/обуви в соответствующих слотах"). Это устранит отсутствие определения, на которое ссылается blacklist в humanoid_xeno.yml (тег NoXeno).Content.Server/_OpenSpace/NightVision/ToggleableNightVisionSystem.cs-48-53 (1)
48-53:⚠️ Potential issue | 🟡 MinorПропущен вызов
Dirty()после модификации компонента.После изменения
vision.Effectна строке 52 следует вызватьDirty(uid, vision), чтобы изменения были синхронизированы с клиентом.Предлагаемое исправление
private void ToggleOn(EntityUid uid, ToggleableNightVisionComponent comp) { EnsureComp<NightVisionComponent>(uid, out var vision); vision.Effect = comp.Effect; + Dirty(uid, vision); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/_OpenSpace/NightVision/ToggleableNightVisionSystem.cs` around lines 48 - 53, The ToggleOn method modifies NightVisionComponent.Effect but doesn't mark the component dirty; after setting vision.Effect in ToggleOn(EntityUid uid, ToggleableNightVisionComponent comp) call Dirty(uid, vision) so the change is network-synchronized to clients; locate ToggleOn and NightVisionComponent to add the Dirty(uid, vision) call immediately after assigning vision.Effect.Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml-82-85 (1)
82-85:⚠️ Potential issue | 🟡 MinorНеполное определение поля
stateв слое спрайта.На строке 84 слой спрайта с
shader: StencilClearимеет пустое полеstate:. Это невалидное определение — все остальные слои спрайтов в файле имеют значение состояния. Либо укажите значение состояния, либо удалите пустую строкуstate:.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml` around lines 82 - 85, В блоке спрайта с "shader: StencilClear" и "sprite: _Sunrise/Mobs/Species/HumanoidXeno/parts.rsi" поле "state:" оставлено пустым — либо задайте корректное значение состояния в том же формате, что у других спрайтов в этом файле (например существующее имя состояния/ключ), либо полностью удалите строку "state:" чтобы не оставлять пустого/невалидного поля; поправьте это в определении слоя, содержащем "map: [\"enum.HumanoidVisualLayers.LFoot\"]".Content.Shared/CollectiveMind/SharedCollectiveMindSystem.cs-62-82 (1)
62-82:⚠️ Potential issue | 🟡 MinorЛогика требований действительно использует OR, а не AND.
Текущее поведение: сущность считается подходящей, если у неё есть ЛЮБОЙ из требуемых компонентов ИЛИ ЛЮБОЙ из требуемых тегов. Например, прототип
Carpтребует либо компонентDragon, либо тегCarp— первого совпадения достаточно.Это нетипичное поведение для систем требований. Обычно ожидается AND-логика, где должны быть выполнены все требования. Убедитесь, что текущее OR-поведение — это намеренный дизайн.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/CollectiveMind/SharedCollectiveMindSystem.cs` around lines 62 - 82, Логика проверки требований сейчас делает OR; поменяй на AND: требование должно выполняться только если у сущности есть ВСЕ компонентов и ВСЕ тегов. Вместо текущего флага meetsRequirements = false/включения при любом совпадении, либо инициализируй meetsRequirements = true и при проверке EntityManager.HasComponent(uid, component) и _tag.HasTag(uid, tag) устанавливай в false и прерывай цикл при первом несовпадении, либо используй методы All() над collections (components.All(c => EntityManager.HasComponent(uid,c)) && prototype.RequiredTags.All(t => _tag.HasTag(uid,t))). Обнови проверки в методе, где используются переменные components, prototype.RequiredTags, EntityManager.HasComponent and _tag.HasTag и удаляй раннее OR-поведение.Resources/Prototypes/_OpenSpace/Body/Organs/humanoid_xeno.yml-199-203 (1)
199-203:⚠️ Potential issue | 🟡 MinorОтсутствует точка в конце описания.
Описание
"Eyes. They see"не заканчивается точкой, в отличие от других описаний органов.📝 Предлагаемое исправление
- description: Eyes. They see + description: Eyes. They see.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/_OpenSpace/Body/Organs/humanoid_xeno.yml` around lines 199 - 203, Описание поля description для записи с name: eyes заканчивается без точки ("Eyes. They see"); исправьте строку description в записи с name "eyes" на завершающуюся точку (например "Eyes. They see.") чтобы соответствовать стилю остальных описаний.
🧹 Nitpick comments (17)
Resources/Prototypes/Actions/types.yml (1)
470-470: Дублирующеесяdescriptionлучше убрать и оставить только отличия от родителя.На Line 470 текст совпадает с родительским прототипом. Это лишняя точка рассинхронизации при правках.
♻️ Небольшой рефактор
- type: entity parent: ActionVulpkaninGravityJump id: ActionXenomorphGravityJump - description: Use your agile legs to leap a short distance. Be careful not to bump into anything! components: - type: Action useDelay: 8🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/Actions/types.yml` at line 470, The 'description' field containing "Use your agile legs to leap a short distance. Be careful not to bump into anything!" is identical to the parent prototype and should be removed to avoid duplication; locate the prototype entry in types.yml with the 'description' key matching that exact string and delete the 'description' line so the child inherits the parent's description (leave only fields that differ from the parent).Resources/Prototypes/tags.yml (1)
1587-1590: ПеренеситеHumanoidXenoв алфавитную секцию поH.Сейчас тег добавлен в блок
X, хотя по текущему соглашению файла его место вH, это ухудшает навигацию и поддержку.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/tags.yml` around lines 1587 - 1590, Move the Tag block with id "HumanoidXeno" from the current X section into the alphabetical H section: locate the Tag entry "type: Tag" / "id: HumanoidXeno" and cut that entire YAML node, then paste it under the existing H header/section so entries remain alphabetically ordered; preserve the node's comments and indentation/formatting so YAML stays valid and update surrounding separators if necessary.Content.Client/_OpenSpace/Overlays/Systems/NightVisionSystem.cs (2)
54-67: Потенциальная утечка ресурсов: эффект может не удаляться при ошибке.Если
SpawnAttachedToвыбросит исключение послеAddOverlay, оверлей останется активным, но_effectбудетnull. Также стоит проверить порядок операций — эффект создаётся, но еслиSetParentне удастся, состояние будет несогласованным.♻️ Более безопасный порядок операций
private void AttemptAddVision(EntityUid uid, NightVisionComponent comp) { if (_player.LocalSession?.AttachedEntity != uid) return; //only add if effect isnt already used if (_effect != null) return; - _overlayMan.AddOverlay(_overlay); - _effect = SpawnAttachedTo(comp.Effect, Transform(uid).Coordinates); _xformSys.SetParent(_effect.Value, uid); + + _overlayMan.AddOverlay(_overlay); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Client/_OpenSpace/Overlays/Systems/NightVisionSystem.cs` around lines 54 - 67, In AttemptAddVision ensure we don't leave the overlay active on exception: perform SpawnAttachedTo and _xformSys.SetParent before calling _overlayMan.AddOverlay, or wrap the spawn/SetParent sequence in a try/catch that on failure removes the overlay and despawns any partially created entity and leaves _effect null; specifically update the logic around _overlayMan.AddOverlay, SpawnAttachedTo, _xformSys.SetParent and the _effect assignment so that the overlay is only added after a successful spawn+parent, and any exception cleans up the overlay and spawned effect consistently.
23-32: Отсутствует очистка ресурсов при Shutdown системы.Если система будет отключена (например, при отключении клиента) пока активен эффект ночного зрения, оверлей и сущность эффекта могут остаться. Рекомендуется добавить очистку в
Shutdown().♻️ Добавление Shutdown
public override void Initialize() { base.Initialize(); SubscribeLocalEvent<NightVisionComponent, ComponentShutdown>(OnVisionShutdown); SubscribeLocalEvent<NightVisionComponent, LocalPlayerAttachedEvent>(OnPlayerAttached); SubscribeLocalEvent<NightVisionComponent, LocalPlayerDetachedEvent>(OnPlayerDetached); SubscribeLocalEvent<NightVisionComponent, AfterAutoHandleStateEvent>(OnHandleVisionState); _overlay = new(_prototypeManager.Index<ShaderPrototype>(NightVisionShaderPrototype)); } +public override void Shutdown() +{ + base.Shutdown(); + _overlayMan.RemoveOverlay(_overlay); + Del(_effect); + _effect = null; +}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Client/_OpenSpace/Overlays/Systems/NightVisionSystem.cs` around lines 23 - 32, Добавьте override Shutdown() в класс NightVisionSystem и в нём выполните очистку: вызовите base.Shutdown(), удалите/освободите _overlay (если не null) и обнулите поле, а также пройдитесь по всем сущностям с NightVisionComponent и снимите с них эффект/удалите связанный эффектный Entity (или удалите компонент) чтобы не оставлять висящие оверлеи/сущности; используйте существующие идентификаторы типа NightVisionComponent и методы, которые очищают состояние (те же шаги, что выполняет OnPlayerDetached/OnVisionShutdown), чтобы гарантировать корректную очистку при отключении системы.Content.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.cs (1)
87-96: Неэффективная конкатенация строк в цикле.Использование
+=для строк в цикле создаёт множество промежуточных объектов. Рекомендуется использоватьStringBuilder, как это уже сделано в методеCorrupt.♻️ Предлагаемый рефакторинг
private string CorruptRandomMultiple(int repeats) { - string corrupted = ""; - for (int repeat = 0; repeat < repeats; repeat++) - { - const string ran = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - corrupted += ran[_random.NextByte((byte)ran.Length)].ToString(); - } - return corrupted; + const string ran = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + var sb = new StringBuilder(repeats); + for (int i = 0; i < repeats; i++) + { + sb.Append(ran[_random.NextByte((byte)ran.Length)]); + } + return sb.ToString(); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.cs` around lines 87 - 96, В методе CorruptRandomMultiple используется конкатенация строк через += в цикле, что создаёт много промежуточных объектов; замените накопление строки на StringBuilder (как в методе Corrupt): создайте new StringBuilder(), в цикле добавляйте символы из const string ran выбирая с помощью _random.NextByte((byte)ran.Length), затем верните builder.ToString(); сохраните сигнатуру CorruptRandomMultiple(int repeats) и использование _random и ran.Content.Client/_OpenSpace/Overlays/BaseVisionOverlay.cs (1)
29-43: Избыточные проверки вBeforeDraw.Проверка
playerEntity == nullна строках 37-40 избыточна — еслиTryGetComponentна строке 31 успешен сLocalSession?.AttachedEntity, тоAttachedEntityуже не null.♻️ Упрощение проверок
protected override bool BeforeDraw(in OverlayDrawArgs args) { - if (!_entityManager.TryGetComponent(_playerManager.LocalSession?.AttachedEntity, out EyeComponent? eyeComp)) + var playerEntity = _playerManager.LocalSession?.AttachedEntity; + + if (playerEntity == null) + return false; + + if (!_entityManager.TryGetComponent(playerEntity, out EyeComponent? eyeComp)) return false; if (args.Viewport.Eye != eyeComp.Eye) return false; - var playerEntity = _playerManager.LocalSession?.AttachedEntity; - - if (playerEntity == null) - return false; - return true; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Client/_OpenSpace/Overlays/BaseVisionOverlay.cs` around lines 29 - 43, The BeforeDraw method performs a redundant null check: if _entityManager.TryGetComponent succeeds when called with _playerManager.LocalSession?.AttachedEntity then AttachedEntity is non-null, so the subsequent playerEntity == null check and the local playerEntity variable are unnecessary; simplify by removing the playerEntity local and the final null check, rely on the TryGetComponent result and the args.Viewport.Eye comparison in BeforeDraw to decide the return value.Content.Server/Chat/Commands/CollectiveMindCommand.cs (2)
34-35: Отсутствует сообщение об ошибке при пустых аргументах.При отсутствии аргументов команда молча возвращается без уведомления пользователя. Для улучшения UX стоит показать сообщение об использовании.
♻️ Добавление сообщения об ошибке
if (args.Length < 1) +{ + shell.WriteError(Help); return; +}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Chat/Commands/CollectiveMindCommand.cs` around lines 34 - 35, In CollectiveMindCommand, the args length check currently returns silently; update the handler (the method that receives args, e.g., Execute(IConsoleShell shell, string[] args)) so that when args.Length < 1 it sends a clear usage/error message back to the caller instead of returning quietly—use the command context/console/session reply method available in this class (e.g., shell.WriteLine, shell.SendText, or the existing reply helper) to display how to use the command and required arguments.
41-41: Использование устаревшего паттернаEntitySystem.Get<T>().
EntitySystem.Get<T>()— устаревший способ получения систем. Все остальные команды в этом каталоге используют dependency injection через атрибут[Dependency]. Рекомендуется добавить[Dependency] private readonly IEntityManager _entityManager = default!;и использовать_entityManager.System<ChatSystem>()или внедритьChatSystemнепосредственно (как вMeCommand.cs), что повысит тестируемость и согласованность с современными паттернами проекта.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Chat/Commands/CollectiveMindCommand.cs` at line 41, The call using the obsolete EntitySystem.Get<ChatSystem>() in CollectiveMindCommand.cs should be replaced with dependency-injected access; add a field like [Dependency] private readonly IEntityManager _entityManager = default! and replace EntitySystem.Get<ChatSystem>() with _entityManager.System<ChatSystem>(), or alternatively inject ChatSystem directly (as done in MeCommand.cs) by adding [Dependency] private readonly ChatSystem _chatSystem = default! and call _chatSystem.TrySendInGameICMessage(...); update the method to use the chosen injected symbol ( _entityManager or _chatSystem ) instead of EntitySystem.Get<T>().Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml (1)
217-219: Закомментированный компонент CollectiveMind.Компонент
CollectiveMindзакомментирован. Если это намеренно (WIP), рекомендуется добавить TODO-комментарий. Если это должно работать, раскомментируйте и убедитесь, что тег соответствует определению вcollective_mind.yml.Хотите, чтобы я помог исправить конфигурацию коллективного разума для ксеноморфов?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml` around lines 217 - 219, The CollectiveMind component block is commented out; either add a TODO note explaining it's intentionally disabled or restore it by uncommenting the lines for the CollectiveMind component (the "CollectiveMind" key and its "minds" entry with "Xeno") and ensure YAML indentation and syntax are correct; when re-enabling, verify the mind tag exactly matches the definition in collective_mind.yml (check case/spelling of "Xeno" vs the canonical name) and that the species entry uses the same component name ("CollectiveMind") expected by the collective_mind.yml definition.Content.Server/Chat/Systems/ChatSystem.cs (2)
420-425: Неиспользуемая переменнаяghostCompв цикле.Переменная
ghostCompобъявлена вEntityQueryEnumerator, но не используется в теле цикла.Предлагаемое исправление
-var ghostQuery = EntityQueryEnumerator<GhostHearingComponent, ActorComponent>(); -while (ghostQuery.MoveNext(out var uid, out var ghostComp, out var actorComp)) +var ghostQuery = EntityQueryEnumerator<GhostHearingComponent, ActorComponent>(); +while (ghostQuery.MoveNext(out var uid, out _, out var actorComp)) { clients.AddPlayer(actorComp.PlayerSession); receivers.Add(uid); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Chat/Systems/ChatSystem.cs` around lines 420 - 425, В цикле, использующем EntityQueryEnumerator<GhostHearingComponent, ActorComponent> и метод ghostQuery.MoveNext(out var uid, out var ghostComp, out var actorComp), переменная ghostComp не используется — замените её на дискард (out _) или переупорядочите/измените типы перечисления так, чтобы не вводить ненужный компонент; конкретно в ChatSystem.cs обновите вызов ghostQuery.MoveNext чтобы использовать out _ вместо out var ghostComp (или изменить сигнатуру EntityQueryEnumerator, если логика требует другого порядка компонентов).
164-166: Потенциальная проблема производительности:UpdateCollectiveMindвызывается при каждом сообщении.
UpdateCollectiveMindвызывается при каждом IC-сообщении, что может быть избыточно. Комментарий указывает на отсутствие лучшего способа, но рассмотрите возможность кэширования или событийного подхода.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Chat/Systems/ChatSystem.cs` around lines 164 - 166, The call to _collectiveMind.UpdateCollectiveMind inside the per-message path (guarded by TryComp<CollectiveMindComponent>(source, out var collective)) causes UpdateCollectiveMind to run on every IC message; instead either (a) switch to an event-driven model by moving the update logic into component lifecycle handlers (subscribe to CollectiveMindComponent add/remove/change events and call _collectiveMind.UpdateCollectiveMind there) or (b) add a cheap cache/check so the message path only calls _collectiveMind.UpdateCollectiveMind when the component’s relevant state changed (track last known state/timestamp per source entity and compare before calling). Locate references to TryComp<CollectiveMindComponent>, _collectiveMind.UpdateCollectiveMind, source and collective to implement the change.Content.Shared/CollectiveMind/CollectiveMindPrototype.cs (1)
26-30: Рассмотрите использование IReadOnlyList для коллекций в прототипе.Изменяемые коллекции
List<T>в прототипах могут привести к проблемам, если они будут случайно модифицированы во время выполнения. Рекомендуется использоватьIReadOnlyList<T>для геттера.Предлагаемый рефакторинг
[DataField("requiredComponents")] -public List<string> RequiredComponents { get; set; } = new(); +public IReadOnlyList<string> RequiredComponents { get; private set; } = Array.Empty<string>(); [DataField("requiredTags")] -public List<ProtoId<TagPrototype>> RequiredTags { get; set; } = new(); +public IReadOnlyList<ProtoId<TagPrototype>> RequiredTags { get; private set; } = Array.Empty<ProtoId<TagPrototype>>();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/CollectiveMind/CollectiveMindPrototype.cs` around lines 26 - 30, В прототипе CollectiveMindPrototype свойства RequiredComponents и RequiredTags не должны экспонировать изменяемые List<T>; замените их типы на IReadOnlyList<string> и IReadOnlyList<ProtoId<TagPrototype>> соответственно (оставив инициализацию через new List<T>() или Array.Empty<T>() в конструкторе/поле), уберите публичный set или сделайте set приватным/init-only, чтобы коллекции были только для чтения извне и по-прототипно безопасны; откорректируйте места, где код модифицирует эти коллекции, чтобы работать с новым API (копирование в временный List при необходимости).Content.Shared/CollectiveMind/SharedCollectiveMindSystem.cs (1)
140-156: Неоптимальное создание объекта для получения значения по умолчанию.На строке 145 создаётся новый объект
CollectiveMindMemberDataтолько для получения значенияMindIdпо умолчанию. Лучше использовать константу.Предлагаемый рефакторинг
+private const int DefaultStartingMindId = 1; + private CollectiveMindMemberData CreateNewCollectiveMindMemberData(CollectiveMindPrototype prototype) { //check if one exists if (!_globalMindIDTracker.ContainsKey(prototype)) { - _globalMindIDTracker[prototype] = new CollectiveMindMemberData().MindId; + _globalMindIDTracker[prototype] = DefaultStartingMindId; } var data = new CollectiveMindMemberData { MindId = _globalMindIDTracker[prototype] }; _globalMindIDTracker[prototype]++; return data; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/CollectiveMind/SharedCollectiveMindSystem.cs` around lines 140 - 156, CreateNewCollectiveMindMemberData is instantiating a new CollectiveMindMemberData solely to read its default MindId; replace that allocation with a constant default value (e.g. DEFAULT_MINd_ID or 0) and use that when initializing _globalMindIDTracker for a prototype. Update references in the method (CreateNewCollectiveMindMemberData, _globalMindIDTracker and CollectiveMindMemberData.MindId) so the tracker is seeded with the constant and the method then constructs the returned CollectiveMindMemberData using the tracker value, incrementing it afterwards.Content.Client/UserInterface/Systems/Chat/ChatUIController.cs (1)
573-581: Дублирование добавленияChatChannel.CollectiveMindвFilterableChannels.
FilterableChannels |= ChatChannel.CollectiveMindдобавляется дважды: один раз для админов (строка 573) и один раз для участников коллективного разума (строка 579). Это не ошибка, но может быть упрощено.Предлагаемый рефакторинг
// only admins can see / filter asay if (_admin.HasFlag(AdminFlags.Adminchat)) { FilterableChannels |= ChatChannel.Admin; FilterableChannels |= ChatChannel.AdminAlert; FilterableChannels |= ChatChannel.AdminChat; CanSendChannels |= ChatSelectChannel.Admin; - FilterableChannels |= ChatChannel.CollectiveMind; } // collective mind if (_collectiveMind != null && _collectiveMind.IsCollectiveMind) { FilterableChannels |= ChatChannel.CollectiveMind; CanSendChannels |= ChatSelectChannel.CollectiveMind; } + +// Admins can always see collective mind chat +if (_admin.HasFlag(AdminFlags.Adminchat)) +{ + FilterableChannels |= ChatChannel.CollectiveMind; +}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Client/UserInterface/Systems/Chat/ChatUIController.cs` around lines 573 - 581, The code sets FilterableChannels |= ChatChannel.CollectiveMind in two places (once in the admin branch and again inside the _collectiveMind.IsCollectiveMind branch); remove the duplicate by keeping the flag set in a single logical place — either the admin branch or the collective-mind branch — and ensure CanSendChannels |= ChatSelectChannel.CollectiveMind still occurs only when _collectiveMind != null && _collectiveMind.IsCollectiveMind; update the block(s) around FilterableChannels, ChatChannel.CollectiveMind and the _collectiveMind.IsCollectiveMind check so the channel is added exactly once while preserving the send-permission assignment.Content.Shared/Body/Systems/SharedBodySystem.Organs.cs (1)
125-125: Неиспользуемый параметрorgan.Параметр
OrganComponent? organобъявлен, но нигде не используется в теле метода. Рекомендуется либо удалить его, либо добавить проверку черезResolveдля консистентности с другими методами.♻️ Вариант исправления
-public bool RemoveOrgan(EntityUid organId, OrganComponent? organ = null) +public bool RemoveOrgan(EntityUid organId)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/Body/Systems/SharedBodySystem.Organs.cs` at line 125, Параметр OrganComponent? organ в методе RemoveOrgan не используется — либо удалите этот параметр из сигнатуры, либо заполните его через Resolve внутри RemoveOrgan (например вызвать Resolve(organId, ref organ, false)) и использовать получённый компонент при логике удаления для соответствия стилю других методов; обновите сигнатуру и тело метода соответственно (функция: RemoveOrgan, тип: OrganComponent).Content.Shared/Body/Systems/SharedBodySystem.Parts.cs (2)
700-704: Параметрыparentиchildне имеют значений по умолчанию.В сигнатуре метода
PartHasChildпараметрыBodyPartComponent? parentиBodyPartComponent? childне имеют значений по умолчанию (= null), хотя используются сResolve. Это отличается от паттерна, используемого в других методах этого файла, и затрудняет вызов метода без явной передачи компонентов.♻️ Предлагаемое исправление
public bool PartHasChild( EntityUid parentId, EntityUid childId, - BodyPartComponent? parent, - BodyPartComponent? child) + BodyPartComponent? parent = null, + BodyPartComponent? child = null)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/Body/Systems/SharedBodySystem.Parts.cs` around lines 700 - 704, The method PartHasChild has nullable BodyPartComponent? parameters parent and child but they lack default values; change the signature of PartHasChild (the method taking EntityUid parentId, EntityUid childId, BodyPartComponent? parent, BodyPartComponent? child) to give both parent and child default values of null so callers can omit them and the method can Resolve the components internally (keep using Resolve as before); update any internal calls if necessary to rely on Resolve returning the components when parameters are not supplied.
658-685: Отсутствует XML-документация для методаGetAllBodyPart.Метод не имеет XML-документации (
<summary>), в отличие от других публичных методов в этом файле. Добавьте описание для единообразия.📝 Предлагаемое исправление
- // 🌟Starlight🌟 + /// <summary> + /// Returns all body part entities for the specified part and its children. + /// </summary> public IEnumerable<Entity<BodyPartComponent>> GetAllBodyPart(🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Shared/Body/Systems/SharedBodySystem.Parts.cs` around lines 658 - 685, Add XML documentation for the public method GetAllBodyPart(EntityUid partId, BodyPartComponent? part = null): include a <summary> that explains it returns all child BodyPartComponent entities (recursively) for the given partId, a <param name="partId"> describing the root part entity id, a <param name="part"> noting the optional resolved component to avoid extra lookup, and a <returns> describing the IEnumerable<Entity<BodyPartComponent>> of found parts; place the XML comments immediately above the GetAllBodyPart declaration to match the file's documentation style.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6e1da554-d8b0-4cbd-b2e6-42184638d7d0
⛔ Files ignored due to path filters (15)
Resources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/head.rsi/head_drone.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/head.rsi/shine_drone.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/head.rsi/teeth_drone.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/tails.rsi/tail_drone.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/tracheas.rsi/tubes_drone.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/body.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/full.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/l_arm.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/l_foot.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/l_hand.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/l_leg.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/r_arm.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/r_foot.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/r_hand.pngis excluded by!**/*.pngResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/r_leg.pngis excluded by!**/*.png
📒 Files selected for processing (61)
Content.Client/Chat/Managers/ChatManager.csContent.Client/UserInterface/Systems/Chat/ChatUIController.csContent.Client/UserInterface/Systems/Chat/Controls/ChannelSelectorButton.csContent.Client/_OpenSpace/Overlays/BaseVisionOverlay.csContent.Client/_OpenSpace/Overlays/NightVisionOverlay.csContent.Client/_OpenSpace/Overlays/OverlayZIndexes.csContent.Client/_OpenSpace/Overlays/Systems/NightVisionSystem.csContent.Client/_Starlight/CollectiveMind/CollectiveMindSystem.csContent.Server/Chat/Commands/CollectiveMindCommand.csContent.Server/Chat/Systems/ChatSystem.csContent.Server/_OpenSpace/EntitySystems/GrowlAccentSystem.csContent.Server/_OpenSpace/NightVision/ToggleableNightVisionSystem.csContent.Server/_OpenSpace/Speech/Components/GrowlAccentComponent.csContent.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.csContent.Server/_StarLight/EdgeConnection/TextToSpeech/CollectiveMindSpokeEvent.csContent.Shared/Body/Systems/SharedBodySystem.Body.csContent.Shared/Body/Systems/SharedBodySystem.Organs.csContent.Shared/Body/Systems/SharedBodySystem.Parts.csContent.Shared/Body/Systems/SharedBodySystem.csContent.Shared/Chat/ChatChannel.csContent.Shared/Chat/ChatSelectChannel.csContent.Shared/Chat/SharedChatSystem.csContent.Shared/CollectiveMind/CollectiveMindComponent.csContent.Shared/CollectiveMind/CollectiveMindMessageAttemptEvent.csContent.Shared/CollectiveMind/CollectiveMindPrototype.csContent.Shared/CollectiveMind/SharedCollectiveMindSystem.csContent.Shared/Humanoid/HumanoidVisualLayers.csContent.Shared/Humanoid/HumanoidVisualLayersExtension.csContent.Shared/Input/ContentKeyFunctions.csContent.Shared/_OpenSpace/NightVision/Components/NightVisionComponent.csContent.Shared/_OpenSpace/NightVision/Components/ToggleableNightVisionComponent.csContent.Shared/_OpenSpace/NightVision/Events/ToggleNightVisionEvent.csResources/Locale/en-US/_Starlight/collective-mind.ftlResources/Locale/en-US/species/species.ftlResources/Locale/ru-RU/_OpenSpace/prototypes/actions/types.ftlResources/Locale/ru-RU/_OpenSpace/prototypes/entities/mobs/species/humanoid_xeno.ftlResources/Locale/ru-RU/_Starlight/collective-mind.ftlResources/Locale/ru-RU/species/species.ftlResources/Prototypes/Actions/types.ymlResources/Prototypes/_OpenSpace/Body/Organs/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Body/Parts/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Body/Prototypes/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Entities/Effects/overlays.ymlResources/Prototypes/_OpenSpace/Entities/Mobs/Customization/Markings/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Entities/Mobs/Player/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/InventoryTemplates/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Reagents/toxins.ymlResources/Prototypes/_OpenSpace/SoundCollections/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Species/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Voice/speech_emote_sounds.ymlResources/Prototypes/_OpenSpace/Voice/speech_emotes.ymlResources/Prototypes/_Starlight/CollectiveMinds/collective_mind.ymlResources/Prototypes/tags.ymlResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/arms.rsi/meta.jsonResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/body.rsi/meta.jsonResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/head.rsi/meta.jsonResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/legs.rsi/meta.jsonResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/tails.rsi/meta.jsonResources/Textures/_OpenSpace/Mobs/Customization/HumanoidXeno/tracheas.rsi/meta.jsonResources/Textures/_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi/meta.json
ReWAFFlution
left a comment
There was a problem hiding this comment.
Материал из EULA/CLA нельзя использовать без письменного соглашения.
Прототипы переписать, и прикрепить соглашение автора спрайтов.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
Resources/Prototypes/tags.yml (1)
1588-1595: Переместите теги в алфавитные секции (HиN).Сейчас
HumanoidXenoиNoXenoдобавлены в блок## X ##, хотя в этом файле явно требуется алфавитный порядок. Это повышает шум в будущих диффах и вероятность конфликтов при мерджах.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/tags.yml` around lines 1588 - 1595, Переместите объявления тегов так, чтобы они находились в соответствующих алфавитных секциях: перенесите Tag с id HumanoidXeno и Tag с id Helmet в секцию H, а Tag с id NoXeno — в секцию N; убедитесь, что эти id (HumanoidXeno, Helmet, NoXeno) удалены из текущего блока X и добавлены в правильные места в файле, сохранив существующие комментарии и форматирование.Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml (1)
50-50: Уберите закомментированные механики из прод-конфига.Закомментированные блоки (
GrowlAccent,ToggleableNightVision,CollectiveMind) лучше удалить и держать в отдельном issue/дизайн-доке, чтобы не копить устаревающий конфиг.Also applies to: 64-65, 217-219
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml` at line 50, Remove the commented-out mechanic blocks GrowlAccent, ToggleableNightVision, and CollectiveMind from the production YAML (they are currently commented in this config and also appear elsewhere); delete those commented lines entirely and instead create a separate issue or design doc capturing the exact commented snippets so they are preserved outside of prod config for future reference.
🤖 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/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml`:
- Line 83: В файле species YAML неверный путь в поле sprite — на текущей строке
где указано sprite: _Sunrise/Mobs/Species/HumanoidXeno/parts.rsi нужно заменить
этот путь на корректный _OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi чтобы он
совпадал с другим в том же файле; найдите ключ sprite (тот, что содержит
parts.rsi) и унифицируйте значение на
_OpenSpace/Mobs/Species/HumanoidXeno/parts.rsi.
- Around line 153-183: В разделе displacements сущности BaseMobHumanoidXeno
ключи не совпадают с используемыми в maleDisplacements и AppearanceHumanoidXeno
(BaseMobHumanoidXeno использует socks-body-curved-small-muzzle и hardsuit, тогда
как остальные используют socks и hardsuit-body-normal); приведите ключи в
соответствие — либо переименуйте socks-body-curved-small-muzzle → socks и
hardsuit → hardsuit-body-normal в BaseMobHumanoidXeno, либо скорректируйте
maleDisplacements/AppearanceHumanoidXeno чтобы они использовали
socks-body-curved-small-muzzle и hardsuit, ensuring the displacements map keys
(displacements, maleDisplacements in BaseMobHumanoidXeno and
AppearanceHumanoidXeno) are identical so clothing displacement sprites/states
resolve correctly.
---
Nitpick comments:
In `@Resources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.yml`:
- Line 50: Remove the commented-out mechanic blocks GrowlAccent,
ToggleableNightVision, and CollectiveMind from the production YAML (they are
currently commented in this config and also appear elsewhere); delete those
commented lines entirely and instead create a separate issue or design doc
capturing the exact commented snippets so they are preserved outside of prod
config for future reference.
In `@Resources/Prototypes/tags.yml`:
- Around line 1588-1595: Переместите объявления тегов так, чтобы они находились
в соответствующих алфавитных секциях: перенесите Tag с id HumanoidXeno и Tag с
id Helmet в секцию H, а Tag с id NoXeno — в секцию N; убедитесь, что эти id
(HumanoidXeno, Helmet, NoXeno) удалены из текущего блока X и добавлены в
правильные места в файле, сохранив существующие комментарии и форматирование.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d93ea9e4-2945-44a0-8a88-1982fdf9fb59
📒 Files selected for processing (4)
Resources/Prototypes/_OpenSpace/Entities/Mobs/Customization/Markings/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Entities/Mobs/Species/humanoid_xeno.ymlResources/Prototypes/_OpenSpace/Species/humanoid_xeno.ymlResources/Prototypes/tags.yml
🚧 Files skipped from review as they are similar to previous changes (2)
- Resources/Prototypes/_OpenSpace/Entities/Mobs/Customization/Markings/humanoid_xeno.yml
- Resources/Prototypes/_OpenSpace/Species/humanoid_xeno.yml
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
Content.Client/UserInterface/Systems/Chat/ChatUIController.cs (1)
722-737:⚠️ Potential issue | 🟠 MajorВерните обновление кнопки выбора канала.
UpdateSelectedChannel()здесь стал пустым по сути, хотяContent.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs:75-90,:180-200иContent.Client/UserInterface/Systems/Chat/ChatWindow.xaml.cs:15-30всё ещё вызывают его для синхронизации кнопки с префиксом и ручным выбором. В результате селектор обычных каналов остаётся в устаревшем состоянии после ввода префикса, смены канала или открытия окна чата.🛠️ Предлагаемая правка
public void UpdateSelectedChannel(ChatBox box) { - var (prefixChannel, _, radioChannel) = SplitInputContents(box.ChatInput.Input.Text.ToLower()); // Starlight edit - /* - switch (prefixChannel) - { - case ChatSelectChannel.None: - box.ChatInput.ChannelSelector.UpdateChannelSelectButton(box.SelectedChannel, null); // Starlight edit - break; - case ChatSelectChannel.CollectiveMind: - box.ChatInput.ChannelSelector.UpdateChannelSelectButton(prefixChannel, null, collectiveMind); // Starlight edit - break; - - default: - box.ChatInput.ChannelSelector.UpdateChannelSelectButton(prefixChannel, radioChannel); - break; - } - */ + var (prefixChannel, _, radioChannel) = SplitInputContents(box.ChatInput.Input.Text.ToLower()); + var displayChannel = prefixChannel == ChatSelectChannel.None + ? box.SelectedChannel + : prefixChannel; + + box.ChatInput.ChannelSelector.UpdateChannelSelectButton(displayChannel, radioChannel); }Отключать здесь стоит только ветку
CollectiveMind; обычныйUpdateChannelSelectButton(ChatSelectChannel, RadioChannelPrototype?)вContent.Client/UserInterface/Systems/Chat/Controls/ChannelSelectorButton.csлучше оставить рабочим.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Client/UserInterface/Systems/Chat/ChatUIController.cs` around lines 722 - 737, Восстановите логику обновления кнопки селектора каналов в UpdateSelectedChannel(): используйте результат SplitInputContents(...) (prefixChannel, radioChannel) и вернуть ветвление по ChatSelectChannel так, чтобы для ChatSelectChannel.None вызывать box.ChatInput.ChannelSelector.UpdateChannelSelectButton(box.SelectedChannel, null), для ChatSelectChannel.CollectiveMind — единственную особую обработку с UpdateChannelSelectButton(prefixChannel, null, collectiveMind), а для остальных — обычный вызов box.ChatInput.ChannelSelector.UpdateChannelSelectButton(prefixChannel, radioChannel); это обеспечит синхронизацию селектора (ChannelSelectorButton) при вводе префикса и ручной смене канала.
🤖 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.Client/_OpenSpace/Overlays/Systems/NightVisionSystem.cs`:
- Around line 1-86: The NightVisionSystem class is entirely commented out, so
Initialize(), the NightVisionOverlay creation (NightVisionOverlay), and methods
like AttemptAddVision/AttemptRemoveVision never run; either fully uncomment the
file so the NightVisionSystem, its Initialize() subscriptions
(SubscribeLocalEvent...), and overlay spawning (new NightVisionOverlay(...),
_overlayMan.AddOverlay, SpawnAttachedTo, etc.) are compiled and active, or
remove this file from the PR until you intend the system to be enabled; ensure
NightVisionComponent-related event handlers (OnPlayerAttached, OnPlayerDetached,
OnHandleVisionState, OnVisionShutdown) remain present and wired when you
uncomment.
In `@Content.Server/Chat/Commands/CollectiveMindCommand.cs`:
- Around line 1-46: The file is fully commented out so the CollectiveMindCommand
class (including Command "cmsay" and Execute method) is not compiled; fix by
either removing the surrounding block comment markers (uncomment the whole
implementation and ensure required usings/namespace are intact so
CollectiveMindCommand and its Execute method compile) or delete the file if the
command should be removed until implemented, making sure there are no leftover
comment delimiters that leave the code dead.
- Line 42: The call to EntitySystem.Get<ChatSystem>().TrySendInGameICMessage
uses the commented-out enum value InGameICChatType.CollectiveMind and is missing
the trailing parameters required by the API; update the call to match the
signature used in SayCommand (include the additional arguments false, shell,
player in the TrySendInGameICMessage invocation) and ensure the InGameICChatType
enum has CollectiveMind uncommented in SharedChatSystem so the value compiles
and the message is sent with the correct flags and context.
---
Duplicate comments:
In `@Content.Client/UserInterface/Systems/Chat/ChatUIController.cs`:
- Around line 722-737: Восстановите логику обновления кнопки селектора каналов в
UpdateSelectedChannel(): используйте результат SplitInputContents(...)
(prefixChannel, radioChannel) и вернуть ветвление по ChatSelectChannel так,
чтобы для ChatSelectChannel.None вызывать
box.ChatInput.ChannelSelector.UpdateChannelSelectButton(box.SelectedChannel,
null), для ChatSelectChannel.CollectiveMind — единственную особую обработку с
UpdateChannelSelectButton(prefixChannel, null, collectiveMind), а для остальных
— обычный вызов
box.ChatInput.ChannelSelector.UpdateChannelSelectButton(prefixChannel,
radioChannel); это обеспечит синхронизацию селектора (ChannelSelectorButton) при
вводе префикса и ручной смене канала.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7f6a3819-16d1-4534-ba49-f57bb06453cd
📒 Files selected for processing (19)
Content.Client/Chat/Managers/ChatManager.csContent.Client/UserInterface/Systems/Chat/ChatUIController.csContent.Client/UserInterface/Systems/Chat/Controls/ChannelSelectorButton.csContent.Client/_OpenSpace/Overlays/NightVisionOverlay.csContent.Client/_OpenSpace/Overlays/Systems/NightVisionSystem.csContent.Client/_Starlight/CollectiveMind/CollectiveMindSystem.csContent.Server/Chat/Commands/CollectiveMindCommand.csContent.Server/Chat/Systems/ChatSystem.csContent.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.csContent.Server/_StarLight/EdgeConnection/TextToSpeech/CollectiveMindSpokeEvent.csContent.Shared/Chat/ChatChannel.csContent.Shared/Chat/ChatSelectChannel.csContent.Shared/Chat/SharedChatSystem.csContent.Shared/CollectiveMind/CollectiveMindComponent.csContent.Shared/CollectiveMind/CollectiveMindMessageAttemptEvent.csContent.Shared/CollectiveMind/CollectiveMindPrototype.csContent.Shared/CollectiveMind/SharedCollectiveMindSystem.csContent.Shared/Input/ContentKeyFunctions.csContent.Shared/_OpenSpace/NightVision/Components/NightVisionComponent.cs
✅ Files skipped from review due to trivial changes (12)
- Content.Shared/Chat/ChatSelectChannel.cs
- Content.Shared/Input/ContentKeyFunctions.cs
- Content.Server/_StarLight/EdgeConnection/TextToSpeech/CollectiveMindSpokeEvent.cs
- Content.Shared/_OpenSpace/NightVision/Components/NightVisionComponent.cs
- Content.Client/_OpenSpace/Overlays/NightVisionOverlay.cs
- Content.Shared/CollectiveMind/CollectiveMindMessageAttemptEvent.cs
- Content.Shared/CollectiveMind/CollectiveMindPrototype.cs
- Content.Server/Chat/Systems/ChatSystem.cs
- Content.Shared/Chat/SharedChatSystem.cs
- Content.Shared/CollectiveMind/CollectiveMindComponent.cs
- Content.Server/_StarLight/EdgeConnection/CollectiveMind/CollectiveMind.cs
- Content.Shared/CollectiveMind/SharedCollectiveMindSystem.cs
🚧 Files skipped from review as they are similar to previous changes (3)
- Content.Client/Chat/Managers/ChatManager.cs
- Content.Client/_Starlight/CollectiveMind/CollectiveMindSystem.cs
- Content.Shared/Chat/ChatChannel.cs
А соглашение прикрепить только в пр же нужно, да? |
|
Поменяй "license": "CLA" на "license": "LicenseRef-Proprietary" чтобы не ругался валидатор. |
Оке |
|
Этот Pull Request содержит конфликты. Почините их, прежде чем мы начнем проверять его. |



















Краткое описание
Добавил новую расу - гуманоидные ксеноморфы. Осталось только доделать локализацию, дисплейсменты и допилить кастомку (в процессе).
Почему мы должны добавить это?
В принципе они имеют место быть, потому что а) когнизин делает вещи, б) их и искусственно же выводят. Если космический монстр не агрессивен к людям по тем или иным причинам, то почему бы ему и не работать на них? Имеет смысл будто бы.
Медиа (Видео/Скриншоты)
Проверочный пункт
Changelog
🆑 seemah
Summary by CodeRabbit
Релизные заметки
New Features
Content