[Sci] Non-destructive XenoArch Research (#15398)

* Non-destructive XenoArch research

* nerf the price

* Points -> Extract
This commit is contained in:
Nemanja
2023-04-17 01:57:21 -04:00
committed by GitHub
parent adb6b168b7
commit 2a83a9bc17
11 changed files with 89 additions and 167 deletions

View File

@@ -6,6 +6,8 @@ namespace Content.Server.Xenoarchaeology.Equipment.Systems;
public sealed class SuppressArtifactContainerSystem : EntitySystem
{
[Dependency] private readonly ArtifactSystem _artifact = default!;
public override void Initialize()
{
base.Initialize();
@@ -15,17 +17,17 @@ public sealed class SuppressArtifactContainerSystem : EntitySystem
private void OnInserted(EntityUid uid, SuppressArtifactContainerComponent component, EntInsertedIntoContainerMessage args)
{
if (!TryComp(args.Entity, out ArtifactComponent? artifact))
if (!TryComp<ArtifactComponent>(args.Entity, out var artifact))
return;
artifact.IsSuppressed = true;
_artifact.SetIsSuppressed(args.Entity, true, artifact);
}
private void OnRemoved(EntityUid uid, SuppressArtifactContainerComponent component, EntRemovedFromContainerMessage args)
{
if (!TryComp(args.Entity, out ArtifactComponent? artifact))
if (!TryComp<ArtifactComponent>(args.Entity, out var artifact))
return;
artifact.IsSuppressed = false;
_artifact.SetIsSuppressed(args.Entity, false, artifact);
}
}