Skip to content

add: Переносной бумбокс с батарейкой, карго и лодаут для музыкантов - #420

Open
ultradyper wants to merge 3 commits into
ss14-ganimed:masterfrom
ultradyper:add/boombox
Open

add: Переносной бумбокс с батарейкой, карго и лодаут для музыкантов#420
ultradyper wants to merge 3 commits into
ss14-ganimed:masterfrom
ultradyper:add/boombox

Conversation

@ultradyper

Copy link
Copy Markdown
Contributor

Описание PR

Добавлен переносной бумбокс на базе системы музыкального автомата: тот же список треков и окно управления (play/pause/stop, громкость, повтор), но предмет можно носить в руках, ставить на пол и убирать в рюкзак.

Работает от батарейки: заряд тратится только пока играет музыка, при пустой или вынутой батарейке воспроизведение останавливается, без заряда окно не открывается. Дальность звука и каталог треков те же, что у музыкального автомата.

Бумбокс доступен в карго (категория Fun) и в лодауте музыкантов с 100+ часами игры за профессию.

Технические детали

  • Прототип Boombox (BaseItem): Jukebox + PowerCellSlot (стартовая PowerCellMedium) + PowerCellDraw (drawRate 1, useRate 5) + ActivatableUI + ActivatableUIRequiresPowerCell.
  • Новые BoomboxComponent (маркер) и BoomboxSystem в Content.*/_Ganimed/Boombox/: включают расход батарейки при play, выключают при pause/stop, останавливают музыку при опустошении или извлечении ячейки.
  • Клиентская правка ванили с маркером Ganimed-Edit: у бумбокса свой заголовок окна (boombox-menu-title), стационарный автомат не затронут.
  • Спрайт: Textures/_Ganimed/Objects/Devices/boombox.rsi (CC0-1.0, автор Boomer), состояния icon/on/off/inhand.
  • Лодаут BoomboxLoadout добавлен в группу Instruments (требование: 100 часов за музыканта).
  • Проверки: DebugOpt 0 ошибок, YAML Linter чистый, validate_rsis.py чистый, ftl check без новых ошибок.

Медиа

Скриншоты добавлю отдельным комментом.

Чек-лист

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

Список изменений

🆑

  • add: Добавлен переносной бумбокс, работает от батарейки
  • add: Бумбокс доступен в карго и музыкантам с 100+ часами игры за профессию

@github-actions github-actions Bot added S: Needs Review Status: Требуется рассмотрение Changes: Sprites Changes: Localization Изменения затрагивают локализацию. size/M labels Aug 7, 2026
@ultradyper

Copy link
Copy Markdown
Contributor Author
изображение изображение

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi

State Old New Status
icon Added
inhand-left Added
inhand-right Added
off Added
on Added

Edit: diff updated after 0abaef2

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ultradyper, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 47116984-17d6-45d2-80ad-19d37ec953d9

📥 Commits

Reviewing files that changed from the base of the PR and between 79e8246 and 0abaef2.

📒 Files selected for processing (2)
  • Content.Server/_Ganimed/Boombox/BoomboxSystem.cs
  • Resources/Prototypes/_Ganimed/Loadouts/Jobs/Civilian/musician.yml
📝 Walkthrough

Summary by CodeRabbit

  • Новые возможности
    • Добавлен переносной бумбокс с музыкальным проигрывателем и батарейным питанием.
    • Заряд автоматически расходуется во время воспроизведения и сохраняется при остановке или паузе.
    • Бумбокс доступен через грузовой заказ и специальный ящик.
    • Музыканты с достаточным опытом могут получить бумбокс в стартовом снаряжении.
    • Добавлен отдельный заголовок интерфейса и локализация на русском и английском языках.

Walkthrough

Добавлен переносной бумбокс с отдельным компонентом, батарейным питанием и локализованным интерфейсом. Созданы прототипы предмета и ящика, cargo-продукт, loadout музыканта и ресурсы спрайтов.

Changes

Функциональность бумбокса

Layer / File(s) Summary
Контракт и прототип бумбокса
Content.Shared/_Ganimed/Boombox/BoomboxComponent.cs, Resources/Prototypes/_Ganimed/Entities/Objects/Devices/boombox.yml
Добавлен сетевой компонент BoomboxComponent. Прототип бумбокса содержит проигрыватель, батарейный отсек, расход энергии и интерфейс Jukebox.
Жизненный цикл питания
Content.Server/_Ganimed/Boombox/BoomboxSystem.cs
BoomboxSystem управляет расходом батареи при воспроизведении, паузе, остановке, извлечении батареи и завершении компонента. При разрядке система отправляет JukeboxStopMessage.
Идентификация интерфейса
Content.Client/Audio/Jukebox/JukeboxBoundUserInterface.cs, Resources/Locale/en-US/_Ganimed/boombox.ftl, Resources/Locale/ru-RU/_Ganimed/boombox.ftl
Для бумбокса используется локализованный заголовок boombox-menu-title. Заголовок обычного музыкального автомата не изменяется.
Снабжение и получение
Resources/Prototypes/_Ganimed/Entities/Structures/Storage/Crates/boombox.yml, Resources/Prototypes/_Ganimed/Catalog/Cargo/boombox.yml, Resources/Prototypes/_Ganimed/Loadouts/Jobs/Civilian/musician.yml, Resources/Prototypes/Loadouts/loadout_groups.yml, Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/meta.json
Добавлены ящик и cargo-продукт бумбокса. Музыканты с 100 часами игрового времени получают доступ к loadout. Добавлены метаданные RSI-ресурса.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant JukeboxSystem
  participant BoomboxSystem
  participant SharedPowerCellSystem
  participant Battery
  JukeboxSystem->>BoomboxSystem: начинает воспроизведение
  BoomboxSystem->>SharedPowerCellSystem: включает расход батареи
  Battery-->>BoomboxSystem: сообщает о разрядке
  BoomboxSystem->>SharedPowerCellSystem: отключает расход батареи
  BoomboxSystem->>JukeboxSystem: отправляет JukeboxStopMessage
Loading

Possibly related PRs

  • ss14-ganimed/Ganimed14#391: изменяет обработку воспроизведения и жизненного цикла треков в JukeboxSystem.

Suggested labels: T: Enhancement, Changes: UI

Suggested reviewers: crimemoot, hyperb1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Заголовок точно описывает основной набор изменений: переносной бумбокс, батарейное питание, карго и лодаут музыканта.
Description check ✅ Passed Описание напрямую соответствует изменениям и содержит сведения о функциональности, доступности и технической реализации бумбокса.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 529cf5e5-02a0-423d-8cc1-6c59719dd92c

📥 Commits

Reviewing files that changed from the base of the PR and between 1f46142 and 79e8246.

⛔ Files ignored due to path filters (5)
  • Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/icon.png is excluded by !**/*.png
  • Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/inhand-left.png is excluded by !**/*.png
  • Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/inhand-right.png is excluded by !**/*.png
  • Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/off.png is excluded by !**/*.png
  • Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/on.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • Content.Client/Audio/Jukebox/JukeboxBoundUserInterface.cs
  • Content.Server/_Ganimed/Boombox/BoomboxSystem.cs
  • Content.Shared/_Ganimed/Boombox/BoomboxComponent.cs
  • Resources/Locale/en-US/_Ganimed/boombox.ftl
  • Resources/Locale/ru-RU/_Ganimed/boombox.ftl
  • Resources/Prototypes/Loadouts/loadout_groups.yml
  • Resources/Prototypes/_Ganimed/Catalog/Cargo/boombox.yml
  • Resources/Prototypes/_Ganimed/Entities/Objects/Devices/boombox.yml
  • Resources/Prototypes/_Ganimed/Entities/Structures/Storage/Crates/boombox.yml
  • Resources/Prototypes/_Ganimed/Loadouts/Jobs/Civilian/musician.yml
  • Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/meta.json
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: check-maps
  • GitHub Check: Test Packaging
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: YAML Linter
  • GitHub Check: YAML map schema validator
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-01-28T21:02:49.548Z
Learnt from: HyperB1
Repo: ss14-ganimed/Ganimed14 PR: 350
File: Resources/Locale/en-US/_Harmony/game-ticking/game-presets/preset-conspirator.ftl:14-14
Timestamp: 2026-01-28T21:02:49.548Z
Learning: Verify that locale FTl files under Resources/Locale maintain consistency with control keycodes. If a fork modifies a keycode (e.g., 'o' → 'г' in radio_channels.yml for a specific channel), the English (en-US) locale should be updated to reflect the intended behavior or explicitly document the exception. Ensure the English instruction uses the same keycode as the default/original behavior unless the fork’s logic requires a deliberate change, to avoid localization discrepancies.

Applied to files:

  • Resources/Locale/ru-RU/_Ganimed/boombox.ftl
  • Resources/Locale/en-US/_Ganimed/boombox.ftl
📚 Learning: 2026-04-24T02:25:23.374Z
Learnt from: HyperB1
Repo: ss14-ganimed/Ganimed14 PR: 287
File: Resources/Prototypes/Roles/Jobs/Wildcards/psychologist.yml:0-0
Timestamp: 2026-04-24T02:25:23.374Z
Learning: In the SS14 (Ganimed14) loadout config YAML files, `loadoutGroup.minLimit` defaults to `1` when not explicitly set. During code review, treat loadout groups as mandatory-by-default: if a `startingGear` item is replaced with a corresponding `loadoutGroup` entry and that group does not set `minLimit` explicitly, it will still require at least one item to be spawned (so players should not spawn without the required gear item). Only flag spawn/starting-gear removal risks if the target `loadoutGroup` sets `minLimit` to `0` (or otherwise permits empty selection) or the mapping to the loadout group is incorrect.

Applied to files:

  • Resources/Prototypes/Loadouts/loadout_groups.yml
🔇 Additional comments (12)
Content.Client/Audio/Jukebox/JukeboxBoundUserInterface.cs (2)

1-6: LGTM!


29-33: LGTM!

Resources/Locale/en-US/_Ganimed/boombox.ftl (1)

1-1: LGTM!

Resources/Locale/ru-RU/_Ganimed/boombox.ftl (1)

1-1: LGTM!

Resources/Prototypes/_Ganimed/Entities/Structures/Storage/Crates/boombox.yml (1)

1-9: LGTM!

Resources/Prototypes/_Ganimed/Catalog/Cargo/boombox.yml (1)

1-9: LGTM!

Resources/Prototypes/_Ganimed/Loadouts/Jobs/Civilian/musician.yml (1)

20-32: LGTM!

Resources/Prototypes/Loadouts/loadout_groups.yml (1)

953-953: LGTM!

Resources/Textures/_Ganimed/Objects/Devices/boombox.rsi/meta.json (1)

1-28: LGTM!

Content.Shared/_Ganimed/Boombox/BoomboxComponent.cs (1)

5-14: LGTM!

Content.Server/_Ganimed/Boombox/BoomboxSystem.cs (1)

18-18: 🎯 Functional Correctness

API для PowerCell корректен.

Content.Shared/PowerCell/SharedPowerCellSystem.cs определяет SharedPowerCellSystem и метод SetDrawEnabled; изменения не нужны.

			> Likely an incorrect or invalid review comment.
Resources/Prototypes/_Ganimed/Entities/Objects/Devices/boombox.yml (1)

31-33: 🎯 Functional Correctness

Налог изменений не нужен.

Прототип PowerCellDraw использует drawRate, а системный код применяет SetDrawEnabled, что соответствует текущему API PowerCell.

			> Likely an incorrect or invalid review comment.

Comment thread Content.Server/_Ganimed/Boombox/BoomboxSystem.cs
@CrimeMoot

Copy link
Copy Markdown
Member

До апстрима не принимать.

@CrimeMoot CrimeMoot added the S: Requires another PR merged Status: Требуется, чтобы другой PR был принят до этого. label Aug 7, 2026
@ultradyper

Copy link
Copy Markdown
Contributor Author

Замечание CodeRabbit исправлено: расход батареи включается только если выбрана песня (JukeboxComponent.SelectedSongId), иначе трек не запустится, а батарея не тратится.

@HyperB1

HyperB1 commented Aug 8, 2026

Copy link
Copy Markdown
Member

Ни у кого нет 100 часов на музыканте, лучше подобрать более вменяемое число.

@ThundraBoomerov ThundraBoomerov added S: Conceptual Approval Статус: Концепция PR'а одобрена S: Awaiting Changes Status: В ожидании запрошенных изменений P2: Raised Повышенный приоритет. Нуждается в дополнительном внимании и приоритетном рассмотрении labels Aug 8, 2026
@ThundraBoomerov

Copy link
Copy Markdown
Contributor

Предлагаю поставить время столько же, сколько на суперсинтезатор.

@ThundraBoomerov

Copy link
Copy Markdown
Contributor

Спасибо!
ЗАМОРОЗКА ДО АПСТРИМА
ЗАМОРОЗКА ДО АПСТРИМА
ЗАМОРОЗКА ДО АПСТРИМА

@ThundraBoomerov ThundraBoomerov removed S: Awaiting Changes Status: В ожидании запрошенных изменений S: Needs Review Status: Требуется рассмотрение labels Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes: Localization Изменения затрагивают локализацию. Changes: Sprites P2: Raised Повышенный приоритет. Нуждается в дополнительном внимании и приоритетном рассмотрении S: Conceptual Approval Статус: Концепция PR'а одобрена S: Requires another PR merged Status: Требуется, чтобы другой PR был принят до этого. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants