Thrusters (shuttle go nyoom) (#5352)
This commit is contained in:
@@ -26,8 +26,6 @@ namespace Content.Server.Cargo.Components
|
||||
public class CargoTelepadComponent : Component
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
|
||||
public override string Name => "CargoTelepad";
|
||||
|
||||
private const float TeleportDuration = 0.5f;
|
||||
@@ -120,11 +118,14 @@ namespace Content.Server.Cargo.Components
|
||||
// spawn the order
|
||||
if (!_prototypeManager.TryIndex(data.ProductId, out CargoProductPrototype? prototype))
|
||||
return;
|
||||
|
||||
var product = Owner.EntityManager.SpawnEntity(prototype.Product, Owner.Transform.Coordinates);
|
||||
|
||||
product.Transform.Anchored = false;
|
||||
|
||||
// spawn a piece of paper.
|
||||
var printed = Owner.EntityManager.SpawnEntity(PrinterOutput, Owner.Transform.Coordinates);
|
||||
if (!_entityManager.TryGetComponent(printed.Uid, out PaperComponent paper))
|
||||
if (!Owner.EntityManager.TryGetComponent(printed.Uid, out PaperComponent paper))
|
||||
return;
|
||||
|
||||
// fill in the order data
|
||||
@@ -137,7 +138,7 @@ namespace Content.Server.Cargo.Components
|
||||
("approver", data.Approver)));
|
||||
|
||||
// attempt to attach the label
|
||||
if (_entityManager.TryGetComponent(product.Uid, out PaperLabelComponent label))
|
||||
if (Owner.EntityManager.TryGetComponent(product.Uid, out PaperLabelComponent label))
|
||||
{
|
||||
EntitySystem.Get<ItemSlotsSystem>().TryInsert(OwnerUid, label.LabelSlot, printed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user