Give suppressed artifacts a much higher sell price (#11305)

This commit is contained in:
metalgearsloth
2022-09-16 03:28:06 +10:00
committed by GitHub
parent 3dd479f436
commit d8754b2014
3 changed files with 21 additions and 1 deletions

View File

@@ -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
{
/// <summary>
/// Artifacts go from 2k to 4k, 1.5k net profit (considering the container price
/// </summary>
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<StaticPriceComponent>(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<StaticPriceComponent>(args.Entity, out var price))
{
price.Price /= ContainedArtifactModifier;
}
}
}

View File

@@ -72,3 +72,5 @@
containers:
entity_storage: !type:Container
paper_label: !type:ContainerSlot
- type: StaticPrice
price: 250

View File

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