Skip to content
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

Sanek31 portable camera monitor #820

Merged
merged 12 commits into from
Dec 13, 2024
Merged

Conversation

sanek31
Copy link
Contributor

@sanek31 sanek31 commented Oct 5, 2024

Портативный монитор камер для вардена

Summary by CodeRabbit

Примечания к выпуску

  • Новые функции

    • Добавлена поддержка русской локализации для портативных камер, улучшая пользовательский опыт с соответствующими описаниями.
    • Введены новые стартовые предметы для работы Ученого, включая HandHeldCameras, что улучшает доступные варианты оборудования.
    • Установлены новые устройства мониторинга с ручными камерами с подробными конфигурациями для повышения функциональности.
  • Документация

    • Добавлены метаданные для нового монитора ручной камеры, включая рабочие состояния и лицензионную информацию.

@sanek31 sanek31 requested a review from Rxup as a code owner October 5, 2024 18:53
@github-actions github-actions bot added Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. No C# Нету кода. labels Oct 5, 2024
Copy link
Contributor

github-actions bot commented Oct 5, 2024

RSI Diff Bot; head commit 0a5345e merging into 927bb82
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi

State Old New Status
off Added
on Added

Edit: diff updated after 0a5345e

Rxup
Rxup previously requested changes Oct 5, 2024
Copy link
Owner

@Rxup Rxup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unhandled exception. System.AggregateException: One or more errors occurred. (One or more errors occurred. (CLIENT: 12,773s [ERRO] proto: Reading Robust.Shared.Prototypes.EntityPrototype(HandHeldCameras) threw the following exception: System.ArgumentException: No mapping or value node provided for type System.Collections.Generic.Dictionary`2[System.Enum,Robust.Shared.GameObjects.InterfaceData].

@CrimeMoot
Copy link
Contributor

У санька получиться.

@github-actions github-actions bot added the Changes: Localization Can be reviewed or fixed by people who are knowledgeable with translation label Oct 19, 2024
@Kirillcas
Copy link
Collaborator

есть что по изменению спрайта?
текущий не годен по норме

@Rxup Rxup requested a review from Kirillcas October 20, 2024 21:21
@sanek31
Copy link
Contributor Author

sanek31 commented Oct 23, 2024

есть что по изменению спрайта? текущий не годен по норме

camera_bug

такой сойдет? За основу взял синдикатовскую.

@sanek31
Copy link
Contributor Author

sanek31 commented Oct 23, 2024

test

@CrimeMoot
Copy link
Contributor

У него получиться.

@CrimeMoot
Copy link
Contributor

Целый месяц - трудяга.

@Kirillcas
Copy link
Collaborator

Kirillcas commented Nov 7, 2024

КХМ... "пиво" в сторонку! так...

такой сойдет? За основу взял синдикатовскую.

синдикатовский слишком мал, ведь он чёрт возьми шпионский, тут же не должно быть такого параметра, если уж... мне тут один спрайтер в окно стучится с просьбами, поэтому скорее всего его попрошу
мои извинения за столь долгое "не отвечание", старею)

@Kirillcas
Copy link
Collaborator

Целый месяц - трудяга.

WIP moment
изображение

@CatBackGround
Copy link
Contributor

Предлагаю взять вариант с SR.

@CatBackGround
Copy link
Contributor

Но перерисовать.

Copy link
Contributor

coderabbitai bot commented Nov 22, 2024

Walkthrough

Этот запрос на изменение вносит несколько изменений в различные файлы для улучшения локализации и функциональности портативных камер в системе. В файл локализации на русском языке добавлены новые записи, включая описания для портативных камер. Конфигурация работы надзирателя обновлена, чтобы включить портативные камеры в его стартовое снаряжение. Кроме того, в YAML-конфигурации для портативных компьютеров определены новые сущности, связанные с портативными камерами, и создан файл метаданных JSON для монитора портативной камеры, описывающий его рабочие состояния и информацию о лицензировании.

Changes

File Path Change Summary
Resources/Locale/ru-RU/backmen/prototypes/Objects/devices/portable_computers.ftl Добавлены сущности ent-HandHeldCameras и ent-HandHeldCamerasEmpty для русской локализации.
Resources/Prototypes/Roles/Jobs/Security/warden.yml Обновлено startingGear, чтобы включить HandHeldCameras для работы надзирателя.
Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml Добавлены сущности handheld cameras monitor и HandHeldCamerasEmpty с соответствующими компонентами.
Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi/meta.json Создан новый файл JSON для определения метаданных для монитора портативной камеры, включая состояния.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Warden
    participant HandHeldCameras
    participant Localization

    User->>Warden: Начать работу
    Warden->>HandHeldCameras: Оснастить HandHeldCameras
    HandHeldCameras-->>Warden: Обеспечить возможности мониторинга
    Warden->>Localization: Получить русские описания
    Localization-->>Warden: Вернуть локализованные термины
Loading

🐇 "В мире технологий, ярком и большом,
Новые камеры с нами, как мы и мечтали.
Снаряжение надзирателя теперь включает шпион,
С шепотом секретов, о боже, о боже!
На русском мы говорим о нашем новом друге,
Прыжок для наших инструментов, на это мы полагаемся!" 🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9a54893 and 158d28c.

📒 Files selected for processing (1)
  • Resources/Locale/ru-RU/backmen/prototypes/Objects/devices/portable_computers.ftl (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Resources/Locale/ru-RU/backmen/prototypes/Objects/devices/portable_computers.ftl

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Repository owner deleted a comment from coderabbitai bot Nov 22, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (3)
Resources/Prototypes/Roles/Jobs/Security/warden.yml (1)

43-43: LGTM! Consider documenting the gameplay impact.

The addition of HandHeldCameras to the warden's starting gear is properly formatted and aligns with the PR's objective. This change gives wardens surveillance capabilities from the start, which seems appropriate for their security role.

Consider documenting this gameplay change in the appropriate design/balance documentation to help maintain game balance history.

Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml (2)

1-5: Fix grammatical errors in the description

The description contains grammatical errors. Consider revising it for better clarity.

- description: The ability to monitoring discreetly anywhere and anytime, just in your pocket.
+ description: The ability to monitor discreetly anywhere and anytime, right from your pocket.

46-63: Fix YAML formatting issues

There are several formatting inconsistencies in the file:

  • Incorrect indentation levels
  • Trailing spaces
  • Missing newline at end of file

Apply these formatting fixes:

  - type: Sprite
    sprite: Backmen/Objects/Tools/handheld_camera_monitor.rsi
    state: icon
    layers:
-      - state: off
-      - state: on
+    - state: off
+    - state: on
         shader: unshaded
         visible: false
-        map: [ "enum.PowerDeviceVisualLayers.Powered" ]
+        map: [ "enum.PowerDeviceVisualLayers.Powered" ]
+
🧰 Tools
🪛 yamllint (1.29.0-1)

[warning] 59-59: wrong indentation: expected 4 but found 6

(indentation)


[error] 63-63: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f0330e5 and 9a54893.

⛔ Files ignored due to path filters (2)
  • Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi/off.png is excluded by !**/*.png
  • Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi/on.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • Resources/Locale/ru-RU/backmen/prototypes/Objects/devices/portable_computers.ftl (1 hunks)
  • Resources/Prototypes/Roles/Jobs/Security/warden.yml (1 hunks)
  • Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml (1 hunks)
  • Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi/meta.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi/meta.json
🧰 Additional context used
🪛 yamllint (1.29.0-1)
Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml

[warning] 14-14: wrong indentation: expected 4 but found 6

(indentation)


[warning] 35-35: wrong indentation: expected 6 but found 8

(indentation)


[error] 45-45: trailing spaces

(trailing-spaces)


[warning] 59-59: wrong indentation: expected 4 but found 6

(indentation)


[error] 63-63: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (5)
Resources/Locale/ru-RU/backmen/prototypes/Objects/devices/portable_computers.ftl (2)

3-5: LGTM! Correct reference implementation and proper grammar

The empty state entity correctly references the main entity's properties and uses proper Russian grammar for the suffix.


1-5: Verify integration with related configuration files

Let's ensure these localization entries properly match the entity IDs defined in the configuration files.

✅ Verification successful

Entity IDs and integrations are properly configured

The verification shows that:

  • Entity IDs HandHeldCameras and HandHeldCamerasEmpty are correctly defined in Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml
  • The warden's starting gear includes HandHeldCameras in Resources/Prototypes/Roles/Jobs/Security/warden.yml
  • The localization entries match the entity IDs and follow the proper inheritance pattern
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify entity IDs match across configuration files

# Check for entity definitions in YAML files
echo "Checking entity definitions in YAML files..."
rg -A 5 "HandHeldCameras" "Resources/Prototypes"

# Check for other references to these entities
echo "Checking for other references to these entities..."
rg -A 5 "ent-HandHeldCameras" "Resources"

Length of output: 2222

Resources/Prototypes/Roles/Jobs/Security/warden.yml (1)

43-43: Verify the HandHeldCameras entity exists

The addition looks syntactically correct, but let's verify that the HandHeldCameras entity is properly defined.

✅ Verification successful

HandHeldCameras entity is properly defined

The entity exists and is properly defined in Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml with all necessary components including power management, UI interfaces, and network connectivity for surveillance functionality.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for HandHeldCameras entity definition
rg -l "HandHeldCameras" --type yaml

Length of output: 155


Script:

#!/bin/bash
# Check the content of the file defining HandHeldCameras
cat Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml

Length of output: 1825

Resources/Prototypes/_Backmen/Entities/Tools/portable_computers.yml (2)

11-17: Verify sprite asset availability

Ensure that the referenced sprite file exists with all required states.

✅ Verification successful

Sprite assets verified and available

The sprite file handheld_camera_monitor.rsi exists at the correct location and contains both required states "on" and "off" that are referenced in the YAML configuration.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the sprite file exists and contains required states
fd "handheld_camera_monitor.rsi" Resources/Textures/Backmen/Objects/Tools/

# If found, check for required states in meta.json
if [ $? -eq 0 ]; then
  cat Resources/Textures/Backmen/Objects/Tools/handheld_camera_monitor.rsi/meta.json | jq '.states[] | .name'
fi

Length of output: 283

🧰 Tools
🪛 yamllint (1.29.0-1)

[warning] 14-14: wrong indentation: expected 4 but found 6

(indentation)


25-28: Review power consumption settings

The current power consumption rate (100) seems quite high and might drain power cells too quickly. Consider adjusting these values based on intended usage duration.

✅ Verification successful

Power consumption settings are within normal range

The power consumption settings (drawRate: 3, useRate: 100) are consistent with similar devices in the codebase:

  • Base handheld devices use useRate: 20
  • Medical defibrillator uses useRate: 100
  • Other handheld tools like scanners have drawRates between 1-3

The current configuration aligns with established patterns for powered equipment, particularly for devices requiring active power usage.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar devices' power consumption for comparison
rg "drawRate|useRate" --type yaml

Length of output: 2478

Comment on lines +39 to +44
- type: SurveillanceCameraMonitor
- type: DeviceNetwork
deviceNetId: Wired
receiveFrequencyId: SurveillanceCamera
transmitFrequencyId: SurveillanceCamera
- type: WiredNetworkConnection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Consider adding access restrictions for surveillance data

As this is intended for warden use, consider implementing access restrictions to prevent unauthorized users from accessing surveillance data through the device network.

Consider adding:

  1. Access level checks in the SurveillanceCameraMonitor component
  2. Encryption for network transmission
  3. Authentication requirements for device network access

…able_computers.ftl

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@KayzelW KayzelW added size/L and removed size/M labels Dec 13, 2024
@KayzelW KayzelW merged commit cdbe0e5 into Rxup:master Dec 13, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Localization Can be reviewed or fixed by people who are knowledgeable with translation Changes: No C# Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. No C# Нету кода. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants