Skip to content

Commit

Permalink
TradeCrate: no freebies without destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 committed Dec 23, 2024
1 parent ab65676 commit 563932c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Content.Server/_NF/Cargo/Systems/CargoSystem.TradeCrates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ private void OnTradeCrateGetPriceEvent(EntityUid uid, TradeCrateComponent compon

private void OnTradeCrateInit(EntityUid uid, TradeCrateComponent component, ref ComponentInit ev)
{
// If there are no available destinations, tough luck.
if (_destinations.Count > 0)
{
var destination = _destinations[_random.Next(_destinations.Count)];
component.DestinationStation = destination;
if (TryComp<TradeCrateDestinationComponent>(destination, out var destComp))
_appearance.SetData(uid, TradeCrateVisuals.DestinationIcon, destComp.DestinationProto);
}
else
{
// No destination, everywhere is elsewhere, throw the courier a bone.
component.ValueElsewhere = component.ValueAtDestination;
}

if (component.ExpressDeliveryDuration > TimeSpan.Zero)
{
Expand Down

0 comments on commit 563932c

Please sign in to comment.