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

Feedback popup for increased round time #2786

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Content.Server.GameTicking;
using Content.Shared._DV.FeedbackOverwatch;
using Content.Shared.GameTicking;
using Content.Shared.Mind;
using Robust.Shared.Timing;

namespace Content.Server._DV.FeedbackPopup;

public sealed partial class ExtendRoundTimeFeedbackPopupSystem : EntitySystem
{

[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly SharedFeedbackOverwatchSystem _feedback = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RoundEndMessageEvent>(OnRoundEnd);
}

private void OnRoundEnd(RoundEndMessageEvent ev)
{
if (!(_gameTiming.CurTime.Subtract(_gameTicker.RoundStartTimeSpan) >= TimeSpan.FromHours(2)))
beck-thompson marked this conversation as resolved.
Show resolved Hide resolved
return;

var allMinds = _mind.GetAliveHumans();

foreach (var mind in allMinds)
_feedback.SendPopupMind(mind, "RoundTimePopup");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feedbackpopup-round-time-name = Automatic recall time
feedbackpopup-round-time-title = [bold]Automatic shuttle recall time[/bold]
feedbackpopup-round-time-description-0 = We have extended the automatic shuttle recall time by 30 minutes. If you would like to share any feedback about this change, please comment it below. We would like to hear what you have to say!
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- type: feedbackPopup
id: RoundTimePopup
popupName: feedbackpopup-round-time-name
title: feedbackpopup-round-time-title
description:
- feedbackpopup-round-time-description-0
Loading