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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
components:
|
||||
- type: StorageFill
|
||||
contents:
|
||||
- id: EmitterFlatpack # TODO change to flatpack
|
||||
- id: EmitterFlatpack
|
||||
|
||||
- type: entity
|
||||
id: CrateEngineeringSingularityCollector
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user