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))

View File

@@ -133,7 +133,7 @@
icon:
sprite: Structures/Piping/Atmospherics/Portable/portable_sheater.rsi
state: sheaterOff
product: SpaceHeaterAnchored
product: CrateEngineeringSpaceHeater
cost: 300
category: cargoproduct-category-name-engineering
group: market

View File

@@ -194,3 +194,13 @@
contents:
- id: WeaponParticleDecelerator
amount: 3
- type: entity
id: CrateEngineeringSpaceHeater
parent: CrateEngineering
name: space heater crate
description: Contains a space heater for climate control.
components:
- type: StorageFill
contents:
- id: SpaceHeaterFlatpack

View File

@@ -42,7 +42,7 @@
components:
- type: StorageFill
contents:
- id: EmitterFlatpack # TODO change to flatpack
- id: EmitterFlatpack
- type: entity
id: CrateEngineeringSingularityCollector

View File

@@ -195,3 +195,12 @@
- state: overlay
color: "#cec8ac"
- state: icon-default
- type: entity
parent: BaseFlatpack
id: SpaceHeaterFlatpack
name: space heater flatpack
description: A flatpack used for constructing a space heater.
components:
- type: Flatpack
entity: SpaceHeaterAnchored