Skip to content

Commit

Permalink
Trade crates: fix time reference (#2900)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 authored Feb 11, 2025
1 parent a4bfbc8 commit bc3bec6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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<EntityUid> _destinations = new();

private void InitializeTradeCrates()
Expand Down Expand Up @@ -87,7 +89,8 @@ private void OnTradeCrateExamined(Entity<TradeCrateComponent> 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)
Expand Down

0 comments on commit bc3bec6

Please sign in to comment.