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;
|
using Robust.Shared.Containers;
|
||||||
|
|
||||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Equipment.Systems;
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Equipment.Systems;
|
||||||
|
|
||||||
public sealed class SuppressArtifactContainerSystem : EntitySystem
|
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()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -18,6 +24,11 @@ public sealed class SuppressArtifactContainerSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
artifact.IsSuppressed = true;
|
artifact.IsSuppressed = true;
|
||||||
|
|
||||||
|
if (TryComp<StaticPriceComponent>(args.Entity, out var price))
|
||||||
|
{
|
||||||
|
price.Price *= ContainedArtifactModifier;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRemoved(EntityUid uid, SuppressArtifactContainerComponent component, EntRemovedFromContainerMessage args)
|
private void OnRemoved(EntityUid uid, SuppressArtifactContainerComponent component, EntRemovedFromContainerMessage args)
|
||||||
@@ -26,5 +37,10 @@ public sealed class SuppressArtifactContainerSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
artifact.IsSuppressed = false;
|
artifact.IsSuppressed = false;
|
||||||
|
|
||||||
|
if (TryComp<StaticPriceComponent>(args.Entity, out var price))
|
||||||
|
{
|
||||||
|
price.Price /= ContainedArtifactModifier;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,3 +72,5 @@
|
|||||||
containers:
|
containers:
|
||||||
entity_storage: !type:Container
|
entity_storage: !type:Container
|
||||||
paper_label: !type:ContainerSlot
|
paper_label: !type:ContainerSlot
|
||||||
|
- type: StaticPrice
|
||||||
|
price: 250
|
||||||
|
|||||||
@@ -40,6 +40,8 @@
|
|||||||
!type:CableDeviceNode
|
!type:CableDeviceNode
|
||||||
nodeGroupID: MVPower
|
nodeGroupID: MVPower
|
||||||
# sadly, HVPower and Apc cables doesn't work right now
|
# sadly, HVPower and Apc cables doesn't work right now
|
||||||
|
- type: StaticPrice
|
||||||
|
price: 2000
|
||||||
- type: Electrified
|
- type: Electrified
|
||||||
requirePower: true
|
requirePower: true
|
||||||
noWindowInTile: true
|
noWindowInTile: true
|
||||||
|
|||||||
Reference in New Issue
Block a user