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

[TM] Communication Update #1765

Merged

Conversation

m-dzianishchyts
Copy link
Collaborator

@m-dzianishchyts m-dzianishchyts commented Jan 24, 2025

Что этот PR делает

Убирает возможность говорить в общий у большинства гарнитур и раций.
Возможность говорить в общий остается у гарнитур и раций:

  • глав;
  • цк.

Возможность слышать общий канал остается везде, где была.

Добавляет тревожную кнопку в ПДА.

Почему это хорошо для игры

Благодаря этому в рации предположительно может сократиться количество брейнрот шума.
Тем, у кого на гарнитуре общий канал недоступен, теперь нужно будет использовать интеркомы - это должно усилить атмосферу.

Изображения изменений

Spoiler

image

image

image

image

Тестирование

Проверил несколько раций и гарнитур из разных групп, интеркомы - наблюдается ожидаемое поведение.
Тревожная кнопка работает.

Changelog

🆑 Maxiemar
add: Говорить в общем канале теперь могут только главы и представители ЦК. Остальным рекомендуется использовать каналы отделов и интеркомы. Ограничение снимается при уровне кода >=Гамма или лоупопе.
add: Средства связи могут взломаны с помощью емага, что обеспечит полный доступ в общий канал.
add: В ПДА добавлена тревожная кнопка. Ее использование отправляет сообщение в канал СБ.
add: ИИ и борги могут пользоваться тревожной кнопкой через стат панель.
add: Использование тревожной кнопки отправляет гостам уведомления аналогично разным ивентам.
/:cl:

Summary by Sourcery

Tests:

  • Tested several radios and intercoms from different groups to verify the expected behavior.

Summary by Sourcery

Restrict common channel access to heads and centcom representatives. Add an alarm button to the PDA.

New Features:

  • Added an alarm button to the PDA, allowing crew members to quickly call security.

Tests:

  • Tested radio and intercom functionality across different user groups.

Краткое описание от Sourcery

Этот pull request добавляет тревожную кнопку в КПК для экстренных вызовов в службу безопасности и ограничивает общий радиоканал для определенных ролей. Он также позволяет обходить ограничения общего канала с помощью эмаг-радиостанций.

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

  • Добавляет тревожную кнопку в КПК, которая отправляет сообщение в службу безопасности, позволяя членам экипажа быстро вызвать помощь.

Улучшения:

  • Ограничивает использование общего радиоканала главами отделов и представителями CentCom, поощряя использование каналов отделов и интеркомов для других сотрудников.
  • Позволяет эмаг-радиостанциям обходить ограничения общего канала.
  • Призраки теперь получают уведомления при использовании тревожной кнопки, аналогично другим событиям, со ссылкой для отслеживания звонящего.

Сборка:

  • Добавляет новые файлы, связанные с функциональностью тревожной кнопки КПК и ограничениями общего канала радиосвязи.
Original summary in English

Summary by Sourcery

This pull request introduces an alarm button to the PDA for emergency calls to security and restricts the common radio channel to specific roles. It also allows bypassing the common channel restrictions by emagging radios.

New Features:

  • Adds an alarm button to the PDA that sends a message to security, allowing crew members to quickly call for help.

Enhancements:

  • Restricts the use of the common radio channel to heads of staff and CentCom representatives, encouraging the use of department channels and intercoms for other personnel.
  • Allows emagging radios to bypass common channel restrictions.
  • Ghosts are now notified when the alarm button is used, similar to other events, with a link to follow the caller.

Build:

  • Adds new files related to PDA alarm button functionality and radio common channel restrictions.

Copy link

sourcery-ai bot commented Jan 24, 2025

Reviewer's Guide by Sourcery

This pull request introduces changes to the communication system, limiting the ability to speak on the common channel to specific roles, adding an alarm button to the PDA, and making other related changes.

Sequence diagram for PDA alarm button usage

sequenceDiagram
    actor User
    participant PDA
    participant Radio
    participant Security

    User->>PDA: Press alarm button
    PDA->>Radio: autosay(message)
    Radio->>Security: Broadcast alert message
    Note over Security: Plays alert sound
    Note over Security: Shows location
    Note right of Radio: Alert includes:
    Note right of Radio: - User name & rank
    Note right of Radio: - Location
    Note right of Radio: - Priority level
Loading

Class diagram for updated radio system

classDiagram
    class Radio {
        +bool respects_common_channel_limitations
        +bool has_fixed_hear_range
        +int max_hear_range
        +ToggleBroadcast()
        +ToggleReception()
        +has_limited_common_channel_access()
    }

    class EncryptionKey {
        +bool grants_common_channel_access
    }

    class Headset {
        +EncryptionKey keyslot1
        +EncryptionKey keyslot2
        +has_limited_common_channel_access()
    }

    Radio <|-- Headset
    Headset o-- EncryptionKey
Loading

File-Level Changes

Change Details Files
Restricted common channel access to command staff and Central Command.
  • Modified radio code to check for common channel access.
  • Added a security level check to determine if common channel access is granted.
  • Added a config option to control the player threshold for enabling advanced communication.
  • Added a new security level that grants common channel access.
code/game/objects/items/devices/radio/radio_objects.dm
modular_ss220/balance/code/items/radio.dm
modular_ss220/balance/code/events/security_level.dm
modular_ss220/balance/code/config/config.dm
Added an alarm button to the PDA.
  • Added a new app to the PDA for the alarm button.
  • Added a new UI for the alarm button.
  • Added a new cartridge type for the alarm button.
code/modules/pda/pda_tgui.dm
modular_ss220/balance/code/items/pda.dm
tgui/packages/tgui/interfaces/pda/pda_alarm_button.js
Added the ability to EMAG radios to remove common channel restrictions.
  • Added a new emag action to radios that removes common channel restrictions.
modular_ss220/balance/code/items/radio.dm
Modified intercoms to have a limited range and not respect common channel limitations.
  • Modified intercoms to have a limited range.
  • Modified intercoms to not respect common channel limitations.
modular_ss220/objects/code/intercom.dm
modular_ss220/balance/code/items/radio.dm
Added sound effects to radio messages.
  • Added a new sound effect to radio messages.
  • Modified the radio code to play the sound effect.
code/game/machinery/tcomms/tcomms_base.dm
code/game/objects/items/devices/radio/radio_objects.dm
modular_ss220/aesthetics/tcomms/code/message.dm
Refactored radio code for better reception and broadcast toggling.
  • Refactored radio code for better reception toggling.
  • Refactored radio code for better broadcast toggling.
code/game/objects/items/devices/radio/radio_objects.dm
Added overlays to radios to indicate when they are transmitting or receiving.
  • Added overlays to radios to indicate when they are transmitting or receiving.
  • Added overlays to intercoms to indicate when they are transmitting or receiving.
modular_ss220/objects/code/radio.dm
modular_ss220/objects/code/intercom.dm
Updated the radio UI.
  • Updated the radio UI to include a range slider.
  • Updated the radio UI to include a channel selection.
tgui/packages/tgui/interfaces/Radio220.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the :trollface: Фича Новая функция, фишка или механика. Абсолютно точно новые баги. label Jan 24, 2025
@ss220app ss220app bot added the 📜 CL валиден Этот чейнджлог будет успешно опубликован label Jan 24, 2025
@m-dzianishchyts m-dzianishchyts changed the title Disable broadcasting common freq for most radios [TM] Disable broadcasting common freq for most radios Jan 24, 2025
Copy link

@Drsmail Drsmail left a comment

Choose a reason for hiding this comment

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

Прикольно будет посмотреть, что получится в рануде.

@kyunkyunkyun
Copy link

нужно добавить канал ассистентам, с доступом для них, ГП и капитана. Ну и НТРа, наверное. Ассистентам будет тяжко в условных технических туннелях при встрече с ксеноморфом и всё в таком духе.

@m-dzianishchyts m-dzianishchyts added the 📃 Требуется изменение WIKI Эти изменения необходимо внести на нашу WIKI. label Jan 25, 2025
@m-dzianishchyts m-dzianishchyts changed the title [TM] Disable broadcasting common freq for most radios [TM] Communication Update Jan 28, 2025
@github-actions github-actions bot added Merge Conflict Ну блять... 💾 Изменение конфига Ф-ф-фуриор...? :feelsgood: Частичная модульность Не всегда получается всё впихнуть в модуль, увы. TGUI Кто-то решил потрогать интерфейсы. labels Jan 28, 2025
@github-actions github-actions bot removed the Merge Conflict Ну блять... label Jan 28, 2025
@github-actions github-actions bot removed :neckbeard: Документация Улучшения и дополнения в документации 🎸 Инструменты Мы выдаем себя за реальное сообщество разработчиков. Кибериада Этот ПР изменил что-то на Кибериаде (BoxStation) Керберос Этот ПР изменил что-то на Керберосе (DeltaStation) Цереброн Этот ПР изменил что-то на Цереброне (MetaStation) 💿 SQL Надо править БД. labels Feb 11, 2025
@m-dzianishchyts m-dzianishchyts marked this pull request as draft February 12, 2025 13:49
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from f749f44 to 03f7404 Compare February 13, 2025 09:07
@github-actions github-actions bot added :neckbeard: Документация Улучшения и дополнения в документации 🗺️ Изменение Карты В этом ПРе затронут файл не станционной карты. Может и не один. and removed 💾 Изменение конфига Ф-ф-фуриор...? 🔉 Звук Услада для ушей. labels Feb 13, 2025
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from 03f7404 to 7c43ec7 Compare February 13, 2025 09:19
@github-actions github-actions bot added 💾 Изменение конфига Ф-ф-фуриор...? 🔉 Звук Услада для ушей. and removed :neckbeard: Документация Улучшения и дополнения в документации 🗺️ Изменение Карты В этом ПРе затронут файл не станционной карты. Может и не один. labels Feb 13, 2025
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from 7c43ec7 to c172e44 Compare February 13, 2025 10:18
@github-actions github-actions bot added 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! and removed 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! labels Feb 13, 2025
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from 85b4278 to 18c5064 Compare February 16, 2025 11:37
@github-actions github-actions bot added the Merge Conflict Ну блять... label Feb 18, 2025
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from 18c5064 to cad7c78 Compare February 18, 2025 12:43
@github-actions github-actions bot removed 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! Merge Conflict Ну блять... labels Feb 18, 2025
@m-dzianishchyts m-dzianishchyts marked this pull request as ready for review February 18, 2025 18:42
@Legendaxe Legendaxe merged commit ec3de0e into ss220club:master Feb 18, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:feelsgood: Частичная модульность Не всегда получается всё впихнуть в модуль, увы. 💾 Изменение конфига Ф-ф-фуриор...? 📃 Требуется изменение WIKI Эти изменения необходимо внести на нашу WIKI. 📜 CL валиден Этот чейнджлог будет успешно опубликован 🔉 Звук Услада для ушей. Testmerge Required TGUI Кто-то решил потрогать интерфейсы. :trollface: Фича Новая функция, фишка или механика. Абсолютно точно новые баги.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants