From d8754b201458c25d5ea6c0230b784db8b44ceab2 Mon Sep 17 00:00:00 2001
From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Date: Fri, 16 Sep 2022 03:28:06 +1000
Subject: [PATCH] Give suppressed artifacts a much higher sell price (#11305)
---
.../Systems/SuppressArtifactContainerSystem.cs | 18 +++++++++++++++++-
.../Xenoarchaeology/artifact_equipment.yml | 2 ++
.../Specific/Xenoarchaeology/artifacts.yml | 2 ++
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Equipment/Systems/SuppressArtifactContainerSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Equipment/Systems/SuppressArtifactContainerSystem.cs
index 3015b6c11a..f60f86801c 100644
--- a/Content.Server/Xenoarchaeology/XenoArtifacts/Equipment/Systems/SuppressArtifactContainerSystem.cs
+++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Equipment/Systems/SuppressArtifactContainerSystem.cs
@@ -1,10 +1,16 @@
-using Content.Server.Xenoarchaeology.XenoArtifacts.Equipment.Components;
+using Content.Server.Cargo.Components;
+using Content.Server.Xenoarchaeology.XenoArtifacts.Equipment.Components;
using Robust.Shared.Containers;
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Equipment.Systems;
public sealed class SuppressArtifactContainerSystem : EntitySystem
{
+ ///
+ /// Artifacts go from 2k to 4k, 1.5k net profit (considering the container price
+ ///
+ public const double ContainedArtifactModifier = 2;
+
public override void Initialize()
{
base.Initialize();
@@ -18,6 +24,11 @@ public sealed class SuppressArtifactContainerSystem : EntitySystem
return;
artifact.IsSuppressed = true;
+
+ if (TryComp(args.Entity, out var price))
+ {
+ price.Price *= ContainedArtifactModifier;
+ }
}
private void OnRemoved(EntityUid uid, SuppressArtifactContainerComponent component, EntRemovedFromContainerMessage args)
@@ -26,5 +37,10 @@ public sealed class SuppressArtifactContainerSystem : EntitySystem
return;
artifact.IsSuppressed = false;
+
+ if (TryComp(args.Entity, out var price))
+ {
+ price.Price /= ContainedArtifactModifier;
+ }
}
}
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml
index 5480298774..ada7b1e609 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifact_equipment.yml
@@ -72,3 +72,5 @@
containers:
entity_storage: !type:Container
paper_label: !type:ContainerSlot
+ - type: StaticPrice
+ price: 250
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml
index 3d26101b87..5f64e39603 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/artifacts.yml
@@ -40,6 +40,8 @@
!type:CableDeviceNode
nodeGroupID: MVPower
# sadly, HVPower and Apc cables doesn't work right now
+ - type: StaticPrice
+ price: 2000
- type: Electrified
requirePower: true
noWindowInTile: true