Give suppressed artifacts a much higher sell price (#11305)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,3 +72,5 @@
|
||||
containers:
|
||||
entity_storage: !type:Container
|
||||
paper_label: !type:ContainerSlot
|
||||
- type: StaticPrice
|
||||
price: 250
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user