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

Fix time display #1114

Merged
merged 5 commits into from
Jan 31, 2025
Merged

Fix time display #1114

merged 5 commits into from
Jan 31, 2025

Conversation

Gaxeer
Copy link
Collaborator

@Gaxeer Gaxeer commented Jan 31, 2025

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

Round time и lobby time теперь показывают время правильно

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

Запустил, проверил

Changelog

🆑
fix: Round time и lobby time теперь показывают время правильно
/:cl:

Summary by Sourcery

Bug Fixes:

  • Correctly display the round and lobby time in the stat panel and escape menu.

Copy link

sourcery-ai bot commented Jan 31, 2025

Reviewer's Guide by Sourcery

This pull request fixes the way round and lobby time are displayed by ensuring the correct time is shown.

Sequence diagram for time display calculation

sequenceDiagram
    participant Client
    participant StatPanel
    participant GameTimestamp
    participant TimeHelpers

    Client->>StatPanel: Request time display
    StatPanel->>GameTimestamp: gameTimestamp(STATION_TIME_PASSED(), timezone=0)
    GameTimestamp->>TimeHelpers: time2text(wtime, format, timezone)
    TimeHelpers-->>GameTimestamp: Formatted time string
    GameTimestamp-->>StatPanel: Time string
    StatPanel-->>Client: Display time with timezone adjustment
Loading

Class diagram for time-related functions

classDiagram
    class TimeHelpers {
        +time2text(timeofday, format)
        +gameTimestamp(format, wtime, timezone)
        +station_time(display_only, wtime)
    }

    class StatPanels {
        +initialize()
        +update_time_display()
    }

    note for TimeHelpers "Modified gameTimestamp to include timezone parameter"
    StatPanels --> TimeHelpers: uses
Loading

File-Level Changes

Change Details Files
Modified the gameTimestamp proc to accept a timezone parameter.
  • Added a timezone parameter to the gameTimestamp proc.
  • Passed the timezone parameter to the time2text proc.
code/__HELPERS/time.dm
Modified the statpanel and escape menu to pass a timezone of 0 to the gameTimestamp proc.
  • Added a timezone parameter to the gameTimestamp proc call in the statpanel.
  • Added a timezone parameter to the gameTimestamp proc call in the escape menu.
code/controllers/subsystem/statpanel.dm
code/modules/escape_menu/details.dm

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 🔧 Фикс Перенос бага в другое место. label Jan 31, 2025
@ss220app ss220app bot added the 📜 CL валиден Этот чейнджлог будет успешно опубликован label Jan 31, 2025
code/modules/escape_menu/details.dm Outdated Show resolved Hide resolved
code/controllers/subsystem/statpanel.dm Outdated Show resolved Hide resolved
Gaxeer and others added 2 commits January 31, 2025 23:55
Co-authored-by: dj-34 <dj-34@bk.ru>
Co-authored-by: dj-34 <dj-34@bk.ru>
@Gaxeer Gaxeer merged commit f1d71ee into ss220club:master Jan 31, 2025
23 checks passed
ss220app bot added a commit that referenced this pull request Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 CL валиден Этот чейнджлог будет успешно опубликован 🔧 Фикс Перенос бага в другое место.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants