-
Notifications
You must be signed in to change notification settings - Fork 12
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
add body camera #711
add body camera #711
Conversation
ОбзорWalkthroughЭто обновление добавляет новые функции, связанные с беспроводными камерами наблюдения. В игру введены два новых типа камер: Changes
Sequence DiagramsequenceDiagram
participant Detective
participant Camera
participant Router
Detective->>Camera: Надевает камеру
Camera->>Router: Подключается к сети
Router-->>Camera: Настраивает частоту
Camera->>Detective: Передает видео
Possibly related PRs
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 532a52e merging into 298b7a9 Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.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 (5)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml (1)
4-4
: Добавьте пустую строку в конец файлаСледуя стандартам YAML, добавьте символ новой строки в конец файла.
frequency: 1940 +
🧰 Tools
🪛 yamllint (1.35.1)
[error] 4-4: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml (1)
9-9
: Добавьте пустую строку в конец файлаСледуя стандартам YAML, добавьте символ новой строки в конец файла.
subnetColor: "#DE20AA" +
🧰 Tools
🪛 yamllint (1.35.1)
[error] 9-9: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/Catalog/VendingMachines/Inventories/secdrobe.yml (1)
13-13
: Рекомендуется перегруппировать элементы инвентаря!Предлагается переместить камеры в более логичную группу предметов. Сейчас элемент
SurveillanceWirelessCameraBodySecurity
находится между головными уборами и масками, что нарушает логическую структуру инвентаря.Рекомендуемое изменение:
- SurveillanceWirelessCameraBodySecurity: 5 # Cats ClothingMaskNeckGaiterRed: 3 ClothingHandsGlovesColorBlack: 3
Переместить в группу после
ClothingHeadsetSecurity
:ClothingHeadsetSecurity: 3 + SurveillanceWirelessCameraBodySecurity: 5 # Cats ClothingOuterWinterSec: 2
Resources/Prototypes/_SpaceCats/Entities/Clothing/Neck/specific.yml (2)
4-5
: Требуется улучшить описание предметаТекущее описание "Camera" недостаточно информативно. Необходимо добавить подробное описание функциональности и назначения устройства.
Предлагаемые изменения:
name: боди-камера безопасности - description: Camera + description: Носимая камера службы безопасности для записи происшествий. Передает изображение в сеть наблюдения станции.
42-51
: Исправить форматирование YAMLНеобходимо исправить следующие проблемы форматирования:
- Добавить пустую строку в конце файла
- Исправить отступы в конфигурации
Предлагаемые изменения:
- type: DeviceNetwork deviceNetId: Wired receiveFrequencyId: SurveillanceCameraService - transmitFrequencyId: SurveillanceCamera + transmitFrequencyId: SurveillanceCamera +🧰 Tools
🪛 yamllint (1.35.1)
[error] 51-51: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/equipped-NECK-vox.png
is excluded by!**/*.png
Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/equipped-NECK.png
is excluded by!**/*.png
Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/icon.png
is excluded by!**/*.png
Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/inhand-left.png
is excluded by!**/*.png
Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/inhand-right.png
is excluded by!**/*.png
📒 Files selected for processing (8)
Resources/Locale/ru-RU/_Cats/devices/device-frequency.ftl
(1 hunks)Resources/Prototypes/Catalog/VendingMachines/Inventories/secdrobe.yml
(1 hunks)Resources/Prototypes/Roles/Jobs/Security/detective.yml
(1 hunks)Resources/Prototypes/Roles/Jobs/Wildcards/reporter.yml
(1 hunks)Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml
(1 hunks)Resources/Prototypes/_SpaceCats/Entities/Clothing/Neck/specific.yml
(1 hunks)Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml
(1 hunks)Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/meta.json
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- Resources/Textures/_SpaceCats/Clothing/Neck/Misc/nopro.rsi/meta.json
🧰 Additional context used
🪛 yamllint (1.35.1)
Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml
[error] 9-9: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml
[error] 4-4: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_SpaceCats/Entities/Clothing/Neck/specific.yml
[warning] 30-30: wrong indentation: expected 4 but found 6
(indentation)
[error] 51-51: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (6)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml (1)
1-4
: Проверьте значение частоты на конфликты
Убедитесь, что частота 1940 не конфликтует с другими устройствами в системе.
✅ Verification successful
Частота 1940 безопасна для использования
Анализ показал, что выбранная частота 1940 для камеры наблюдения не конфликтует с другими устройствами в системе. Ближайшие используемые частоты - 1939 и 1984, что обеспечивает достаточный разрыв для предотвращения помех.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for frequency conflicts
rg "frequency: 1940" --type yaml
Length of output: 117
Script:
#!/bin/bash
# Search for all frequency values in yaml files to check for conflicts
rg "frequency: \d+" --type yaml
Length of output: 12395
🧰 Tools
🪛 yamllint (1.35.1)
[error] 4-4: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Locale/ru-RU/_Cats/devices/device-frequency.ftl (1)
1-5
: Локализация выполнена корректно
Переводы логичны и последовательны. Хорошее решение использовать наследование от базового роутера для поддержания единообразия описаний.
Resources/Prototypes/Roles/Jobs/Wildcards/reporter.yml (1)
25-25
: Корректное добавление нательной камеры!
Размещение камеры в слоте шеи логично для данного типа устройства и соответствует роли репортера.
Resources/Prototypes/Roles/Jobs/Security/detective.yml (1)
39-39
: Логичное добавление защищённой версии камеры!
Использование специальной версии камеры для службы безопасности является обоснованным решением. Размещение в слоте шеи соответствует общей механике нательных камер.
Resources/Prototypes/_SpaceCats/Entities/Clothing/Neck/specific.yml (2)
48-51
: Проверить разрешения частот устройства
Необходимо убедиться, что использование SurveillanceCameraService
вместо SurveillanceCameraSecurity
соответствует требованиям безопасности для обычной боди-камеры.
Давайте проверим конфигурацию частот:
✅ Verification successful
Let me analyze the search results to verify the frequency permissions. I can see that both SurveillanceCameraSecurity
and SurveillanceCameraService
frequencies are widely used across the codebase, particularly in map configurations. Let me check the device network configuration to understand if there are any specific security restrictions.
Использование частоты SurveillanceCameraService допустимо
Анализ конфигурации показывает, что частота SurveillanceCameraService
(1936) является стандартной частотой для камер наблюдения в служебных зонах, наравне с другими специализированными частотами для разных отделов (безопасность - 1932, медицина - 1937, инженерный - 1931 и т.д.). Использование служебной частоты для боди-камеры соответствует её назначению.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Поиск конфигурации частот устройств наблюдения
rg "SurveillanceCamera(Security|Service)" --type yaml
Length of output: 66310
Script:
#!/bin/bash
# Check device network frequency definitions and permissions
cat Resources/Prototypes/Device/devicenet_frequencies.yml
Length of output: 3378
🧰 Tools
🪛 yamllint (1.35.1)
[error] 51-51: no new line character at the end of file
(new-line-at-end-of-file)
1-51
: Проверить механизмы контроля доступа
Реализация боди-камер требует тщательной проверки механизмов контроля доступа:
- Кто может просматривать записи?
- Как защищена передача данных?
- Есть ли журналирование доступа?
Давайте проверим связанные системы безопасности:
🧰 Tools
🪛 yamllint (1.35.1)
[warning] 30-30: wrong indentation: expected 4 but found 6
(indentation)
[error] 51-51: no new line character at the end of file
(new-line-at-end-of-file)
- type: entity | ||
parent: SurveillanceCameraRouterBase | ||
id: SurveillanceCameraRouterHandheld | ||
name: Camerahelds | ||
description: | ||
components: | ||
- type: SurveillanceCameraRouter | ||
subnetFrequency: SurveillanceCameraHandheld | ||
subnetColor: "#DE20AA" |
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.
Исправьте опечатку в имени файла
Файл находится в директории с опечаткой: survelliance
вместо правильного surveillance
.
Необходимо переименовать файл:
- Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml
+ Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/surveillance_camera_routers.yml
🧰 Tools
🪛 yamllint (1.35.1)
[error] 9-9: no new line character at the end of file
(new-line-at-end-of-file)
parent: SurveillanceCameraRouterBase | ||
id: SurveillanceCameraRouterHandheld | ||
name: Camerahelds | ||
description: |
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.
Добавьте описание для сущности
Поле описания не должно быть пустым. Добавьте соответствующее описание для камеры.
name: Camerahelds
- description:
+ description: Портативный роутер для управления нательными камерами наблюдения.
📝 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.
description: | |
description: Портативный роутер для управления нательными камерами наблюдения. |
- type: SpamEmitSound | ||
minInterval: 90 | ||
maxInterval: 300 | ||
sound: | ||
path: /Audio/Machines/timer.ogg | ||
params: | ||
volume: -8 | ||
maxDistance: 10 | ||
variation: 0.05 |
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.
💡 Codebase verification
Настройки звука таймера требуют корректировки
Текущие настройки звука действительно могут быть навязчивыми:
- Интервал 90-300 секунд слишком частый для таймера, учитывая что это постоянный звук
- Громкость -8 и дистанция 10 единиц являются стандартными параметрами, но в сочетании с частым интервалом могут раздражать
- В других найденных конфигурациях SpamEmitSound используются более специфичные звуки (например, CluwneHorn, BikeHorn) с меньшей частотой воспроизведения
Рекомендации:
- Увеличить минимальный интервал до 180-240 секунд
- Уменьшить громкость до -10 или -12
- Уменьшить maxDistance до 8 единиц
🔗 Analysis chain
Проверить настройки звука таймера
Текущие настройки звука могут быть слишком навязчивыми:
- Интервал 90-300 секунд может быть слишком частым
- Громкость -8 и дистанция 10 требуют проверки в игре
Предлагаю проверить наличие похожих настроек в других устройствах:
Let me search for other timer sound configurations to compare with.
Let me search for other SpamEmitSound configurations with sound parameters to compare.
Let me fix the search pattern.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Поиск других конфигураций SpamEmitSound для сравнения
rg -A 10 "type: SpamEmitSound" --type yaml
Length of output: 68590
Script:
#!/bin/bash
# Search for timer sound configurations
rg -A 10 "path: .*timer\.ogg" --type yaml
Length of output: 1051
Script:
#!/bin/bash
# Search for SpamEmitSound configurations with sound parameters
rg -A 15 "type: SpamEmitSound\n.*sound:" --type yaml
Length of output: 246
Script:
#!/bin/bash
# Search for SpamEmitSound configurations with sound parameters using multiline mode
rg -U -A 15 'type: SpamEmitSound.*\n.*sound:' --type yaml
Length of output: 2695
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 (3)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml (1)
4-4
: Добавьте пустую строку в конец файлаСогласно стандартам YAML, файл должен заканчиваться пустой строкой.
frequency: 1940 +
🧰 Tools
🪛 yamllint (1.35.1)
[error] 4-4: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml (2)
1-8
: Рассмотрите добавление дополнительных свойствДля улучшения функциональности и удобства использования, рекомендуется добавить следующие свойства:
- Вес устройства
- Размер в инвентаре
- Спрайты для разных состояний
components: - type: SurveillanceCameraRouter subnetFrequency: SurveillanceCameraHandheld + - type: Item + size: 5 + weight: 2 + - type: Sprite + sprite: Objects/Devices/camera_router.rsi + layers: + - state: router + - state: router_on + shader: unshaded + visible: false +🧰 Tools
🪛 yamllint (1.35.1)
[error] 8-8: no new line character at the end of file
(new-line-at-end-of-file)
8-8
: Добавьте пустую строку в конец файлаСогласно стандартам YAML, файл должен заканчиваться пустой строкой.
subnetFrequency: SurveillanceCameraHandheld +
🧰 Tools
🪛 yamllint (1.35.1)
[error] 8-8: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml
(1 hunks)Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml
(1 hunks)
🧰 Additional context used
🪛 yamllint (1.35.1)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml
[error] 4-4: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml
[error] 8-8: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (3)
Resources/Prototypes/_SpaceCats/Device/devicenet_frequencies.yml (1)
1-4
: Проверьте значение частоты на конфликты
Убедитесь, что частота 1940 не конфликтует с другими устройствами в системе.
✅ Verification successful
Частота 1940 безопасна для использования
Анализ показал, что частота 1940 для боди-камеры не конфликтует с другими устройствами в системе:
- Ближайшие частоты устройств: 1939 и 1984
- Нет точных совпадений частоты 1940 с другими устройствами
- Значение находится в допустимом диапазоне частот, используемом в системе
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential frequency conflicts
rg "frequency: 1940" --type yaml
Length of output: 117
Script:
#!/bin/bash
# Get all frequency values from yaml files to check for conflicts
rg "frequency: \d+" --type yaml
Length of output: 12395
🧰 Tools
🪛 yamllint (1.35.1)
[error] 4-4: no new line character at the end of file
(new-line-at-end-of-file)
Resources/Prototypes/_SpaceCats/Entities/Structures/Machines/survelliance_camera_routers.yml (2)
1-8
: Исправьте опечатку в имени файла
Файл находится в директории с опечаткой: survelliance
вместо правильного surveillance
.
🧰 Tools
🪛 yamllint (1.35.1)
[error] 8-8: no new line character at the end of file
(new-line-at-end-of-file)
5-5
: Добавьте описание для сущности
Поле описания не должно быть пустым. Добавьте соответствующее описание для камеры.
Не. Имба. |
Порт боди-камеры с GoobStation
Summary by CodeRabbit