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

feat: ERT Request panel for admins #1061

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

Conversation

RosSample
Copy link

@RosSample RosSample commented Jan 24, 2025

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

Порт ЕРТ панели с пары. Пока не модульно, надо чтоб всё заработало.

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

admins want

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

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

лкльн

Changelog

🆑
admin: Панель ЕРТ Менеджера
/:cl:

Summary by Sourcery

Add an ERT request panel for admins to the communications console. Allow admins to send ERT requests, view existing requests, and deny requests with a reason.

New Features:

  • Adds a new "Request Emergency Response Team" button to the communications console for admins.
  • Adds a new ERT manager interface for admins, accessible through the admin verbs menu.

Copy link

sourcery-ai bot commented Jan 24, 2025

Reviewer's Guide by Sourcery

This pull request introduces an Emergency Response Team (ERT) request panel for admins. It allows admins to dispatch ERTs with different roles and manage incoming ERT requests.

Sequence diagram for ERT request and response flow

sequenceDiagram
    actor User
    participant CC as Communications Console
    participant Server
    participant Admin
    participant ERT as ERT Manager

    User->>CC: Click 'Request Emergency Response Team'
    CC->>User: Show reason input modal
    User->>CC: Enter reason
    CC->>Server: Send ERT request
    Server->>Admin: Notify about ERT request
    Admin->>ERT: Open ERT Manager
    alt Accept Request
        ERT->>Server: Configure and dispatch ERT
        Server->>User: Announce ERT deployment
    else Deny Request
        ERT->>Server: Send denial with reason
        Server->>User: Announce ERT denial
    end
Loading

Class diagram for ERT Manager system

classDiagram
    class ErtManager {
        +String name
        +String ert_type
        +int admin_slots
        +int commander_slots
        +int security_slots
        +int medical_slots
        +int engineering_slots
        +int janitor_slots
        +int inquisitor_slots
        +ui_interact()
        +ui_data()
        +ui_act()
        +slots_to_roles()
        +makeERTFromSlots()
    }

    class MessageType {
        +String time
        +String sender_real_name
        +String sender_uid
        +String message
    }

    ErtManager -- MessageType
Loading

File-Level Changes

Change Details Files
Added the ability for the Communications Console to request an ERT.
  • Added a new button to the Communications Console to request an ERT.
  • Added a new modal to the Communications Console to input the reason for the ERT request.
  • Added a new 'canRequestERT' property to the CommsConsoleData type.
  • Added logic to the communications computer to handle the ERT request.
tgui/packages/tgui/interfaces/CommunicationsConsole/Main.tsx
tgui/packages/tgui/interfaces/CommunicationsConsole/types.ts
code/game/machinery/computer/communications.dm
Implemented the ERT request manager.
  • Added a new request type for ERT requests.
  • Added logic to the request manager to handle ERT requests.
  • Added a button to the request manager to handle ERT requests.
  • Added a new admin verb to open the ERT manager.
  • Added a new admin topic to respond to ERT requests.
  • Added a new define for the ERT respond button.
code/modules/requests/request_manager.dm
tgui/packages/tgui/interfaces/RequestManager.tsx
code/__DEFINES/admin.dm
code/modules/admin/verbs/pray.dm
code/modules/admin/topic.dm
Created the ERT manager UI.
  • Created a new UI for the ERT manager.
  • Added logic to the ERT manager to dispatch ERTs.
  • Added logic to the ERT manager to manage ERT requests.
  • Added a new modpack for the ERT manager.
  • Added a new file for the ERT manager.
tgui/packages/tgui/interfaces/ErtManager.tsx
modular_bandastation/ert/code/ert_manager.dm
modular_bandastation/ert/_ert.dm
modular_bandastation/ert/_ert.dme
Added a new map file for CentCom.
  • Added a new map file for CentCom.
_maps/map_files/generic/CentCom.dmm
Added a new modular file for bandastation.
  • Added a new modular file for bandastation.
modular_bandastation/modular_bandastation.dme

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 TGUI Добавление или изменение существующего интерфейса на базе фреймворка TGUI label Jan 24, 2025
@dj-34 dj-34 added the :trollface: Фича Новая, определённо уникальная и интересная фича. Она абсолютно точно всем понравится! label Jan 26, 2025
@github-actions github-actions bot removed the :trollface: Фича Новая, определённо уникальная и интересная фича. Она абсолютно точно всем понравится! label Jan 30, 2025
@RosSample RosSample changed the title ERT Request panel for admins feat: ERT Request panel for admins Jan 30, 2025
@github-actions github-actions bot added the 🗺️ Изменение Карты В этом ПРе затронут файл не станционной карты. Может и не один. label Jan 31, 2025
@RosSample RosSample marked this pull request as ready for review January 31, 2025 21:40
@ss220app ss220app bot added the 📜 CL валиден Этот чейнджлог будет успешно опубликован label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 CL валиден Этот чейнджлог будет успешно опубликован TGUI Добавление или изменение существующего интерфейса на базе фреймворка TGUI 🗺️ Изменение Карты В этом ПРе затронут файл не станционной карты. Может и не один.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants