Objects ordered through cargo system shouldn't start anchored (#28115)

* Order normal space heater instead of anchored variant

* Make sure ordered objects don't spawn anchored

* Order space heater flatpack instead of a regular space heater

* Remove obsolete TODO

* Remove unnecessary name

---------

Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
This commit is contained in:
eoineoineoin
2024-05-25 21:26:48 +01:00
committed by GitHub
parent ac08f0068f
commit 229f6d697c
5 changed files with 26 additions and 2 deletions

View File

@@ -20,6 +20,8 @@ namespace Content.Server.Cargo.Systems
{
public sealed partial class CargoSystem
{
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
/// <summary>
/// How much time to wait (in seconds) before increasing bank accounts balance.
/// </summary>
@@ -489,6 +491,9 @@ namespace Content.Server.Cargo.Systems
// Create the item itself
var item = Spawn(order.ProductId, spawn);
// Ensure the item doesn't start anchored
_transformSystem.Unanchor(item, Transform(item));
// Create a sheet of paper to write the order details on
var printed = EntityManager.SpawnEntity(paperProto, spawn);
if (TryComp<PaperComponent>(printed, out var paper))