-
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
[PORT] настольные компьютеры залетают в игру! #1046
Conversation
WalkthroughВ этом изменении реализована поддержка настольных компьютеров. Добавлен новый компонент Changes
Sequence Diagram(s)sequenceDiagram
participant Строитель
participant Constr as ConstructionComputerTabletop
participant Graph as GraphComputerTabletop
participant Frame as ComputerTabletopFrame
participant Board as ComputerTabletopBoardComponent
Строитель->>Constr: Инициализация строительства
Constr->>Graph: Запуск графа "GraphComputerTabletop"
Graph->>Frame: Построить каркас (frameUnsecured)
Frame-->>Graph: Каркас установлен
Graph->>Board: Установить плату (boardUnsecured)
Board-->>Graph: Плата установлена с prototype
Graph->>Строитель: Завершение строительства (tabletop computer)
Poem
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 (
|
RSI Diff Bot; head commit 2e95854 merging into 0286a1e Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi
|
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: 3
🧹 Nitpick comments (6)
Content.Server/Construction/NodeEntities/BoardNodeEntity.cs (1)
32-39
: Улучшить комментарий для большей информативностиТекущий комментарий "Frontier - adds tabletop variants" недостаточно информативен. Рекомендуется добавить более подробное описание логики.
Предлагаемое улучшение:
- // Frontier - adds tabletop variants + // Обработка настольных компьютеров - проверяет наличие компонента ComputerTabletopBoardComponent + // и соответствующего графа конструкцииResources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/frame_tabletop.yml (1)
29-36
: Рассмотреть использование общих значений для физических параметровФизические параметры (bounds, density, mask) дублируются между сущностями ComputerTabletopFrame и ComputerTabletopBroken. Рекомендуется вынести эти значения в общий прототип для улучшения поддерживаемости.
Also applies to: 48-56
Resources/Prototypes/_Backmen/Recipes/Construction/machines.yml (1)
98-98
: Добавить новую строку в конец файлаВ соответствии с рекомендациями YAML, файл должен заканчиваться пустой строкой.
sprite: _NF/Structures/Machines/computer_tabletop.rsi state: computer_tabletop_frame +
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 98-98: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_Backmen/Recipes/Construction/Graphs/structures/computer_tabletop.yml (2)
1-15
: Рекомендуется добавить дополнительную валидацию материаловТекущая реализация корректна, но можно улучшить безопасность, добавив проверки качества материалов перед использованием.
steps: - material: Steel amount: 5 doAfter: 2.5 + conditions: + - !type:MaterialValidation + minimumPurity: 0.8
121-143
: Реализация корректна, рекомендуется добавить документациюЛогика работы с разбитым состоянием реализована правильно. Рекомендуется добавить комментарии, описывающие условия перехода в это состояние.
Resources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/computers_tabletop.yml (1)
37-572
: Рекомендуется добавить документацию для сущностейСтруктура сущностей реализована корректно, но рекомендуется добавить:
- Описание назначения каждого типа компьютера
- Пояснения к параметру noSpawn
- Документацию по взаимодействию с другими системами
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (7)
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/broken_tabletop.png
is excluded by!**/*.png
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/computer_board_exposed.png
is excluded by!**/*.png
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/computer_monitor_unscrewed.png
is excluded by!**/*.png
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/computer_no_monitor.png
is excluded by!**/*.png
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/computer_tabletop.png
is excluded by!**/*.png
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/computer_tabletop_frame.png
is excluded by!**/*.png
Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/generic_keyboard_tabletop.png
is excluded by!**/*.png
📒 Files selected for processing (8)
Content.Server/Backmen/Construction/ComputerTabletopBoardComponent.cs
(1 hunks)Content.Server/Construction/NodeEntities/BoardNodeEntity.cs
(1 hunks)Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml
(34 hunks)Resources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/computers_tabletop.yml
(1 hunks)Resources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/frame_tabletop.yml
(1 hunks)Resources/Prototypes/_Backmen/Recipes/Construction/Graphs/structures/computer_tabletop.yml
(1 hunks)Resources/Prototypes/_Backmen/Recipes/Construction/machines.yml
(1 hunks)Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/meta.json
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- Resources/Textures/_NF/Structures/Machines/computer_tabletop.rsi/meta.json
🧰 Additional context used
🪛 YAMLlint (1.35.1)
Resources/Prototypes/_Backmen/Recipes/Construction/machines.yml
[error] 98-98: no new line character at the end of file
(new-line-at-end-of-file)
🪛 GitHub Actions: YAML Linter
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml
[error] 482-482: PrototypeID ComputerTabletopSensorMonitoring for type Robust.Shared.Prototypes.EntityPrototype not found.
⏰ Context from checks skipped due to timeout of 300000ms (3)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: Test Packaging
- GitHub Check: build (ubuntu-latest)
🔇 Additional comments (3)
Content.Server/Backmen/Construction/ComputerTabletopBoardComponent.cs (1)
1-15
: Отличная реализация компонента!Компонент хорошо структурирован, использует правильные атрибуты и имеет четкую документацию.
Resources/Prototypes/_Backmen/Recipes/Construction/machines.yml (1)
86-98
: Конфигурация рецепта корректна!Рецепт конструкции настольного компьютера хорошо структурирован и следует общему паттерну других машин.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 98-98: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/computers_tabletop.yml (1)
33-35
: Необходимо принять решение по закомментированной конфигурацииЗакомментированные настройки TabletopMachineMask и TabletopMachineLayer требуют решения - либо удалить, либо реализовать.
Пожалуйста, уточните статус этих настроек:
- Планируется ли их реализация?
- Если нет, следует удалить закомментированный код
- node: missingWires | ||
actions: | ||
- !type:AppearanceChange | ||
edges: | ||
- to: monitorMissing | ||
conditions: | ||
- !type:EntityAnchored {} | ||
steps: | ||
- material: Cable | ||
amount: 5 | ||
|
||
- to: boardUnsecured | ||
conditions: | ||
- !type:EntityAnchored { } | ||
steps: | ||
- tool: Screwing | ||
|
||
- node: monitorMissing | ||
entity: ComputerTabletopFrame | ||
actions: | ||
- !type:SetAnchor { } | ||
- !type:AppearanceChange | ||
edges: | ||
- to: monitorUnsecured | ||
conditions: | ||
- !type:EntityAnchored {} | ||
steps: | ||
- material: Glass | ||
amount: 2 | ||
|
||
- to: missingWires | ||
conditions: | ||
- !type:EntityAnchored { } | ||
completed: | ||
- !type:SpawnPrototype | ||
prototype: CableApcStack1 | ||
amount: 5 | ||
steps: | ||
- tool: Cutting | ||
|
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.
🛠️ Refactor suggestion
Необходимо добавить проверки безопасности при работе с проводкой
При работе с электрическими компонентами следует добавить проверки на наличие защитных перчаток и инструментов.
steps:
- material: Cable
amount: 5
+ conditions:
+ - !type:WearingGloves
+ type: Insulated
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- node: missingWires | |
actions: | |
- !type:AppearanceChange | |
edges: | |
- to: monitorMissing | |
conditions: | |
- !type:EntityAnchored {} | |
steps: | |
- material: Cable | |
amount: 5 | |
- to: boardUnsecured | |
conditions: | |
- !type:EntityAnchored { } | |
steps: | |
- tool: Screwing | |
- node: monitorMissing | |
entity: ComputerTabletopFrame | |
actions: | |
- !type:SetAnchor { } | |
- !type:AppearanceChange | |
edges: | |
- to: monitorUnsecured | |
conditions: | |
- !type:EntityAnchored {} | |
steps: | |
- material: Glass | |
amount: 2 | |
- to: missingWires | |
conditions: | |
- !type:EntityAnchored { } | |
completed: | |
- !type:SpawnPrototype | |
prototype: CableApcStack1 | |
amount: 5 | |
steps: | |
- tool: Cutting | |
- node: missingWires | |
actions: | |
- !type:AppearanceChange | |
edges: | |
- to: monitorMissing | |
conditions: | |
- !type:EntityAnchored {} | |
steps: | |
- material: Cable | |
amount: 5 | |
conditions: | |
- !type:WearingGloves | |
type: Insulated | |
- to: boardUnsecured | |
conditions: | |
- !type:EntityAnchored { } | |
steps: | |
- tool: Screwing | |
- node: monitorMissing | |
entity: ComputerTabletopFrame | |
actions: | |
- !type:SetAnchor { } | |
- !type:AppearanceChange | |
edges: | |
- to: monitorUnsecured | |
conditions: | |
- !type:EntityAnchored {} | |
steps: | |
- material: Glass | |
amount: 2 | |
- to: missingWires | |
conditions: | |
- !type:EntityAnchored { } | |
completed: | |
- !type:SpawnPrototype | |
prototype: CableApcStack1 | |
amount: 5 | |
steps: | |
- tool: Cutting |
- type: ComputerTabletopBoard # Frontier | ||
prototype: ComputerTabletopSensorMonitoring # Frontier |
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.
Исправьте отсутствующий прототип ComputerTabletopSensorMonitoring
Сборка не проходит из-за отсутствующего прототипа. Необходимо определить прототип или удалить ссылку на него.
🧰 Tools
🪛 GitHub Actions: YAML Linter
[error] 482-482: PrototypeID ComputerTabletopSensorMonitoring for type Robust.Shared.Prototypes.EntityPrototype not found.
- type: ComputerTabletopBoard # Frontier | ||
prototype: ComputerTabletopCargoBounty # Frontier |
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.
💡 Verification agent
🧩 Analysis chain
Проверьте консистентность прототипов ComputerTabletopBoard
Некоторые компьютеры используют неправильные прототипы (например, ComputerTabletopCargoBounty используется для разных типов компьютеров).
Also applies to: 178-179, 208-209
🏁 Script executed:
#!/bin/bash
# Проверка уникальности прототипов
rg "prototype: ComputerTabletopCargoBounty" -A 2 -B 2
Length of output: 6141
Проверка консистентности прототипов ComputerTabletopBoard
Из результатов поиска видно, что во всех упомянутых блоках файла
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml
устройство с типом ComputerTabletopBoard всегда получает прототип ComputerTabletopCargoBounty. При этом наблюдаются блоки, где для разных типов компьютеров использованы иные прототипы (например, ComputerCargoShuttle, ComputerCrewMonitoring, SyndicateComputerComms и т.д.), что свидетельствует о том, что прототип ComputerTabletopCargoBounty используется повторно и, вероятно, применён некорректно для компьютеров типа ComputerTabletopBoard.
- Все вхождения с типом ComputerTabletopBoard ассоциированы с прототипом ComputerTabletopCargoBounty (строки 148-149, 178-179, 208-209 и т.д.).
- Прототип ComputerTabletopCargoBounty также применён в других контекстах, что указывает на неоднозначность его использования.
Рекомендуется проверить, соответствует ли использование данного прототипа задумке для устройств типа ComputerTabletopBoard, и, при необходимости, внести изменения для обеспечения согласованности.
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: 1
♻️ Duplicate comments (1)
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml (1)
148-149
:⚠️ Potential issueИсправьте повторное использование прототипа ComputerTabletopCargoBounty
Прототип
ComputerTabletopCargoBounty
используется для разных типов компьютеров, что может привести к некорректному поведению. Каждый тип компьютера должен иметь свой уникальный прототип.Затронутые компьютеры:
- CargoShuttleComputer
- CargoShuttleConsole
- SurveillanceCameraMonitor
- SurveillanceWirelessCameraMonitor
- CrewMonitoring
- ComputerIFF
- ComputerIFFSyndicate
- RoboticsConsole
- StationAiUpload
Also applies to: 178-179, 194-195, 207-208, 273-274, 330-331, 403-404, 453-454, 505-506
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml
(33 hunks)Resources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/computers_tabletop.yml
(1 hunks)
🔇 Additional comments (3)
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml (2)
221-222
: Уточните статус закомментированных компонентовВ файле есть несколько закомментированных компонентов
ComputerTabletopBoard
. Необходимо уточнить:
- Планируется ли их реализация в будущем?
- Являются ли они намеренно отключенными?
Затронутые сущности:
- ComputerTelevision
- TechDisk
- SpaceVillainArcade
- BlockGameArcade
- ParticleAccelerator
Also applies to: 260-261, 367-368, 377-378, 390-391
471-481
:⚠️ Potential issueДобавьте отсутствующий ComputerTabletopBoard компонент
Сущность
SensorConsoleCircuitboard
не имеет компонентаComputerTabletopBoard
, что нарушает консистентность с другими компьютерами и может вызывать ошибки сборки.Добавьте следующий компонент:
- type: ComputerBoard prototype: ComputerSensorMonitoring + - type: ComputerTabletopBoard + prototype: ComputerTabletopSensorMonitoringResources/Prototypes/_Backmen/Entities/Structures/Machines/Computers/computers_tabletop.yml (1)
33-35
: Уточните статус закомментированных масок коллизииВ базовой сущности
BaseStructureComputerTabletop
закомментированы маски коллизииTabletopMachineMask
иTabletopMachineLayer
. Необходимо:
- Уточнить, планируется ли их использование
- Если да - реализовать
- Если нет - удалить закомментированный код
sprite: Structures/Machines/computers.rsi | ||
state: solar_screen |
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.
🛠️ Refactor suggestion
Проверьте корректность состояния спрайта для радара
Компьютер радара (ComputerTabletopRadar
) использует состояние спрайта solar_screen
, которое, вероятно, предназначено для солнечных панелей. Необходимо использовать более подходящее состояние спрайта для экрана радара.
- map: ["computerLayerScreen"]
sprite: Structures/Machines/computers.rsi
- state: solar_screen
+ state: radar_screen
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
sprite: Structures/Machines/computers.rsi | |
state: solar_screen | |
sprite: Structures/Machines/computers.rsi | |
state: radar_screen |
@trest100 а куда ты дел тесты? |
Блять, гитхаб нахуй удивляет |
Описание PR
Для мапперов добавлены настольные компьютеры.
порт с Corvax-Frontier
Медиа
Тип PR
Изменения
Summary by CodeRabbit
Новые функции
ComputerTabletopBoard
, улучшая систему настольных компьютеров.Новая графика
Это обновление значительно расширяет функциональность и визуальное представление настольных компьютеров, улучшая взаимодействие игроков с игровым миром.