From c8d58ea00713e4513da883b3eebbcb71c21e838e Mon Sep 17 00:00:00 2001 From: VigersRay Date: Sun, 23 Jun 2024 20:54:13 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=BA=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=B0?= =?UTF-8?q?=D1=82=D1=8B=20=D0=B8=20=D0=BF=D0=BE=D1=87=D0=B8=D0=BD=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BD=D0=B0=D0=B6=D0=B0=D1=82=D0=B8=D0=B5=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20ShuttleTimeButt?= =?UTF-8?q?on=20=D0=B2=20=D0=9A=D0=9F=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Client/PDA/PdaMenu.xaml.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Content.Client/PDA/PdaMenu.xaml.cs b/Content.Client/PDA/PdaMenu.xaml.cs index 3a5ab152b5..2369dee095 100644 --- a/Content.Client/PDA/PdaMenu.xaml.cs +++ b/Content.Client/PDA/PdaMenu.xaml.cs @@ -122,7 +122,8 @@ namespace Content.Client.PDA StationTimeButton.OnPressed += _ => { var stationTime = _entitySystem.GetEntitySystem().GetStationTime(); - _clipboard.SetText($"{stationTime.Date} {stationTime.Time:hh\\:mm}"); + var stationDate = _entitySystem.GetEntitySystem().GetDate(); + _clipboard.SetText($"{stationDate} {stationTime.Time:hh:mm}"); }; StartTimeButton.OnPressed += _ => @@ -130,7 +131,17 @@ namespace Content.Client.PDA var stationTime = _gameTiming.CurTime.Subtract(_gameTicker.RoundStartTimeSpan); _clipboard.SetText((stationTime.ToString("hh\\:mm"))); }; - + + ShuttleTimeButton.OnPressed += _ => + { + var remaining = TimeSpan.Zero; + + if (_evacShuttleTime != null) + remaining = TimeSpan.FromSeconds(Math.Max((_evacShuttleTime.Value - _gameTiming.CurTime).TotalSeconds, 0)); + + _clipboard.SetText(remaining.ToString(@"hh\:mm\:ss")); + }; + StationAlertLevelInstructionsButton.OnPressed += _ => { _clipboard.SetText(_instructions); @@ -392,7 +403,7 @@ namespace Content.Client.PDA StartTimeLabel.SetMarkup(Loc.GetString("comp-pda-ui-start-time", ("time", startTime.ToString("hh\\:mm")))); - + StationTimeLabel.SetMarkup(Loc.GetString("comp-pda-ui-station-time", ("time", stationTime.Time.ToString("hh\\:mm")), ("date", stationDate)));