-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix loadout #1002
fix loadout #1002
Conversation
WalkthroughИзменения затрагивают систему загрузки профилей и настройки ролевых нагрузок в игре. В контроллере лобби была обновлена логика фильтрации выбранных нагрузок, а в файлах прототипов произведены модификации групп для различных профессиональных ролей. Изменения коснулись добавления новых групп "Werx", "Niz" и "Socks" для некоторых ролей и удаления определенных инвентарных записей. Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🔇 Additional comments (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Content.Client/Lobby/LobbyUIController.cs (1)
495-509
: Логика обработки групп одежды улучшена!Изменения корректно решают проблему с загрузкой нижней одежды. Хорошее решение использовать константный список для групп.
Предложение по улучшению: Рассмотрите возможность вынести список
groupsToShow
в отдельную константу на уровне класса, так как эти группы могут использоваться в других методах.+ private static readonly IReadOnlyList<string> ClothingGroups = ["Werx", "Niz", "Socks"];
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
Content.Client/Lobby/LobbyUIController.cs
(1 hunks)Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml
(2 hunks)Resources/Prototypes/Loadouts/role_loadouts.yml
(0 hunks)Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml
(2 hunks)
💤 Files with no reviewable changes (1)
- Resources/Prototypes/Loadouts/role_loadouts.yml
⏰ Context from checks skipped due to timeout of 300000ms (1)
- GitHub Check: build (ubuntu-latest)
🔇 Additional comments (3)
Content.Client/Lobby/LobbyUIController.cs (1)
511-511
: Корректное применение загрузки экипировкиВызов
GiveDummyLoadout
правильно использует отфильтрованный набор экипировки.Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml (1)
4-6
: Группы одежды добавлены корректноДобавление групп
Werx
,Niz
иSocks
для ролей IAA и Pilot соответствует изменениям в контроллере лобби. Группы правильно помечены как#backmen
.Also applies to: 19-21
Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml (1)
4-6
: Унифицированы группы одежды для всех ролейДобавление групп
Werx
,Niz
иSocks
для ролей BKCCCargo и BlueShield обеспечивает единообразие в конфигурации одежды. Изменения согласуются с существующей конфигурацией Brigmedic.Also applies to: 34-36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Content.Client/Lobby/LobbyUIController.cs (1)
497-498
: Вынести группы в константыЖёстко закодированные строки лучше вынести в константы уровня класса для улучшения поддерживаемости кода.
+ private static readonly IReadOnlyList<string> ClothingGroupsToFilter = new[] { "Werx", "Niz", "Socks" };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
Content.Client/Lobby/LobbyUIController.cs
(1 hunks)Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml
(2 hunks)Resources/Prototypes/Loadouts/role_loadouts.yml
(0 hunks)Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml
(2 hunks)
💤 Files with no reviewable changes (1)
- Resources/Prototypes/Loadouts/role_loadouts.yml
🔇 Additional comments (3)
Content.Client/Lobby/LobbyUIController.cs (1)
498-505
: Проверить корректность инвертированной логики фильтрацииИзменение логики фильтрации групп одежды может повлиять на другие части системы. Убедитесь, что:
- Инвертированная логика работает корректно для всех сценариев
- Удаление групп не вызывает побочных эффектов
✅ Verification successful
Логика фильтрации подтверждена как корректная
Инвертированная логика фильтрации работает правильно:
- Когда jobClothes = false, код удаляет группы из groupsToShow
- Это соответствует ожидаемому поведению, где отключение рабочей одежды должно убрать специфичные для профессии предметы
- Базовая одежда (Werx, Niz, Socks) остается нетронутой, так как управляется отдельно
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Поиск других мест использования этих групп rg -l "Werx|Niz|Socks" --type yamlLength of output: 2310
Script:
#!/bin/bash # Search for loadout group definitions and usage ast-grep --pattern 'LoadoutGroup' # Search for files containing loadout-related code rg -l "SelectedLoadouts|LoadoutGroup" --type cs # Check role loadout definitions cat Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml cat Resources/Prototypes/Loadouts/role_loadouts.ymlLength of output: 18561
Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml (1)
4-6
: Проверить необходимость добавления группГруппы одежды добавлены к ролям JobIAA и JobPilot. Убедитесь, что:
- Эти роли действительно должны иметь доступ к данным группам одежды
- Добавление групп соответствует игровому балансу
Also applies to: 19-21
Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml (1)
4-6
: Подтвердить согласованность измененийГруппы одежды последовательно добавлены к ролям JobBKCCCargo и JobBlueShield. Убедитесь, что:
- Все необходимые роли получили обновленные группы
- Нет пропущенных ролей, которым также нужны эти группы
Also applies to: 34-36
✅ Verification successful
Изменения согласованы во всех файлах
Проверка показала, что все роли, связанные с охраной и грузовым отделом (JobBKCCCargo, JobBlueShield, JobCargoTechnician, JobSecurityOfficer, JobSecurityCadet), имеют одинаковый набор групп одежды с тегом #backmen. Дополнительных ролей, требующих обновления, не обнаружено.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Поиск других ролей, которые могут требовать обновления rg "type: roleLoadout" --type yamlLength of output: 3678
Script:
#!/bin/bash # Поиск ролей, связанных с охраной и грузчиками rg "id: Job(BKCC|Blue|Security|Cargo|Guard)" --type yaml -A 5Length of output: 3494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Content.Client/Lobby/LobbyUIController.cs (1)
495-509
: Предложение по улучшению логики фильтрации экипировкиТекущая реализация имеет несколько потенциальных проблем:
- Жестко закодированные группы усложняют поддержку кода
- Инвертированная логика может быть неочевидной для других разработчиков
Предлагаю следующие улучшения:
- IReadOnlyList<string> groupsToShow = ["Werx", "Niz", "Socks"]; //consts + private static readonly IReadOnlyList<string> ClothingGroups = ["Werx", "Niz", "Socks"]; - if (!jobClothes) - { - foreach (var loadoutsKey in loadout.SelectedLoadouts.Keys) - { - if (groupsToShow.Contains(loadoutsKey.Id)) - { - loadout.SelectedLoadouts.Remove(loadoutsKey); - } - } - } + // Фильтруем группы одежды если не требуется рабочая форма + if (!jobClothes) + { + loadout.SelectedLoadouts = loadout.SelectedLoadouts + .Where(kvp => !ClothingGroups.Contains(kvp.Key.Id)) + .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
Content.Client/Lobby/LobbyUIController.cs
(1 hunks)Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml
(2 hunks)Resources/Prototypes/Loadouts/role_loadouts.yml
(0 hunks)Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml
(2 hunks)
💤 Files with no reviewable changes (1)
- Resources/Prototypes/Loadouts/role_loadouts.yml
🔇 Additional comments (2)
Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml (1)
4-6
: Корректное добавление базовых групп одеждыДобавление групп Werx, Niz и Socks для ролей IAA и Pilot выглядит правильным, так как это базовая одежда, необходимая для всех персонажей.
Also applies to: 19-21
Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml (1)
4-6
: Согласованное обновление групп одеждыДобавление базовых групп одежды для ролей BKCCCargo и BlueShield соответствует общей структуре изменений и обеспечивает единообразие в системе экипировки.
Also applies to: 34-36
Описание PR
Починен лодаут нижнего белья.
Тип PR
Изменения
🆑
Summary by CodeRabbit
Новые функции
Исправления
Изменения в конфигурации
Эти изменения направлены на оптимизацию системы снаряжения и улучшение пользовательского опыта.