revenant cleanup (#10662)

This commit is contained in:
Nemanja
2022-08-18 20:04:23 -04:00
committed by GitHub
parent b8ce23f666
commit d7e0b70e2c
18 changed files with 92 additions and 388 deletions

View File

@@ -23,7 +23,9 @@ using Content.Shared.MobState;
using Content.Server.Explosion.EntitySystems;
using System.Linq;
using Content.Server.Emag;
using Content.Server.Store.Components;
using Content.Shared.CharacterAppearance.Components;
using Content.Shared.FixedPoint;
using Robust.Shared.Utility;
namespace Content.Server.Revenant.EntitySystems;
@@ -177,7 +179,9 @@ public sealed partial class RevenantSystem : EntitySystem
essence.Harvested = true;
ChangeEssenceAmount(uid, essence.EssenceAmount, component);
component.StolenEssence += essence.EssenceAmount;
if (TryComp<StoreComponent>(uid, out var store))
_store.TryAddCurrency(new Dictionary<string, FixedPoint2>()
{ {component.StolenEssenceCurrencyPrototype, essence.EssenceAmount} }, store);
if (!TryComp<MobStateComponent>(args.Target, out var mobstate))
return;