fix cargo teleporter (#27255)

* fix cargo teleporter

* don't delete orders

* basado
This commit is contained in:
Nemanja
2024-04-23 08:07:12 -04:00
committed by GitHub
parent 8117131c91
commit 1bfc63c546
8 changed files with 133 additions and 37 deletions

View File

@@ -1,4 +1,6 @@
using Content.Server.Station.Components;
using Content.Shared.Cargo;
using Content.Shared.Cargo.Components;
using Content.Shared.Cargo.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -38,3 +40,17 @@ public sealed partial class StationCargoOrderDatabaseComponent : Component
[DataField]
public EntProtoId PrinterOutput = "PaperCargoInvoice";
}
/// <summary>
/// Event broadcast before a cargo order is fulfilled, allowing alternate systems to fulfill the order.
/// </summary>
[ByRefEvent]
public record struct FulfillCargoOrderEvent(Entity<StationDataComponent> Station, CargoOrderData Order, Entity<CargoOrderConsoleComponent> OrderConsole)
{
public Entity<CargoOrderConsoleComponent> OrderConsole = OrderConsole;
public Entity<StationDataComponent> Station = Station;
public CargoOrderData Order = Order;
public EntityUid? FulfillmentEntity;
public bool Handled = false;
}