Fix centcom cargo gifts (#24701)
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Server.Cargo.Components;
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Station.Components;
|
||||
using Content.Server.StationEvents.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -39,7 +40,8 @@ public sealed class CargoGiftsRule : StationEventSystem<CargoGiftsRuleComponent>
|
||||
|
||||
component.TimeUntilNextGifts += 30f;
|
||||
|
||||
if (!TryGetRandomStation(out var station, HasComp<StationCargoOrderDatabaseComponent>))
|
||||
if (!TryGetRandomStation(out var station, HasComp<StationCargoOrderDatabaseComponent>) ||
|
||||
!TryComp<StationDataComponent>(station, out var stationData))
|
||||
return;
|
||||
|
||||
if (!TryComp<StationCargoOrderDatabaseComponent>(station, out var cargoDb))
|
||||
@@ -65,7 +67,8 @@ public sealed class CargoGiftsRule : StationEventSystem<CargoGiftsRuleComponent>
|
||||
Loc.GetString(component.Sender),
|
||||
Loc.GetString(component.Description),
|
||||
Loc.GetString(component.Dest),
|
||||
cargoDb
|
||||
cargoDb,
|
||||
stationData!
|
||||
))
|
||||
{
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user