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

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

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: Использование тревожной кнопки отправляет гостам уведомления аналогично разным ивентам.
/: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.

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
@m-dzianishchyts m-dzianishchyts marked this pull request as draft January 28, 2025 09:46
@github-actions github-actions bot added 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! Merge Conflict Ну блять... labels Jan 28, 2025
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from 67b9317 to bee6ccd Compare February 1, 2025 04:36
@github-actions github-actions bot removed 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! Merge Conflict Ну блять... labels Feb 1, 2025
@github-actions github-actions bot added the 🔉 Звук Услада для ушей. label Feb 1, 2025
@m-dzianishchyts m-dzianishchyts marked this pull request as ready for review February 1, 2025 11:34
@github-actions github-actions bot added the 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! label Feb 1, 2025
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from 99ee4e8 to c4e8cf6 Compare February 1, 2025 17:37
@m-dzianishchyts m-dzianishchyts force-pushed the radios-with-disabled-common-feat branch from c4e8cf6 to da27c5c Compare February 3, 2025 10:34
@kyunkyunkyun
Copy link

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

@m-dzianishchyts
Copy link
Collaborator Author

Не воспроизводится. Да и нечему тут такие проблемы вызывать - прием не менялся

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.

3 participants