From bc3bec6934c98a1a80182fb2bc576c66c07158d1 Mon Sep 17 00:00:00 2001 From: Whatstone <166147148+whatston3@users.noreply.github.com> Date: Tue, 11 Feb 2025 03:13:16 -0500 Subject: [PATCH] Trade crates: fix time reference (#2900) --- Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs b/Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs index c86ecf6ccf6..3bb35c2dd53 100644 --- a/Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs +++ b/Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs @@ -1,5 +1,6 @@ using System.Threading; using Content.Server._NF.Trade; +using Content.Server.GameTicking; using Content.Shared._NF.Trade; using Content.Shared.Examine; using Timer = Robust.Shared.Timing.Timer; @@ -8,6 +9,7 @@ namespace Content.Server.Cargo.Systems; // Needs to collide with base namespace public sealed partial class CargoSystem { + [Dependency] private GameTicker _gameTicker = default!; private readonly List _destinations = new(); private void InitializeTradeCrates() @@ -87,7 +89,8 @@ private void OnTradeCrateExamined(Entity ent, ref ExaminedE Loc.GetString("trade-crate-priority-active") : Loc.GetString("trade-crate-priority-inactive")); - ev.PushMarkup(Loc.GetString("trade-crate-priority-time", ("time", ent.Comp.ExpressDeliveryTime.Value.ToString(@"hh\:mm\:ss")))); + var shiftTime = ent.Comp.ExpressDeliveryTime - _gameTicker.RoundStartTimeSpan; + ev.PushMarkup(Loc.GetString("trade-crate-priority-time", ("time", shiftTime.Value.ToString(@"hh\:mm\:ss")))); } private void DisableTradeCratePriority(EntityUid uid)