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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user