Essence collector (#952)
* collector attract essence * collector * Update magic-essence.yml * Update essence_collelctor.yml
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
using Content.Server._CP14.MagicEnergy;
|
||||
using Content.Server.Audio;
|
||||
using Content.Shared._CP14.MagicEnergy.Components;
|
||||
using Content.Shared.Audio;
|
||||
using Content.Shared.Chemistry.Components.SolutionManager;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
@@ -9,7 +6,7 @@ using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server._CP14.Alchemy;
|
||||
namespace Content.Server._CP14.Alchemy.EntitySystems;
|
||||
|
||||
public sealed partial class CP14SolutionNormalizerSystem : EntitySystem
|
||||
{
|
||||
@@ -17,26 +14,12 @@ public sealed partial class CP14SolutionNormalizerSystem : EntitySystem
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
|
||||
[Dependency] private readonly CP14MagicEnergyCrystalSlotSystem _magicSlot = default!;
|
||||
[Dependency] private readonly AmbientSoundSystem _ambient = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<CP14SolutionNormalizerComponent,CP14SlotCrystalPowerChangedEvent>(OnSlotPowerChanged);
|
||||
}
|
||||
|
||||
private void OnSlotPowerChanged(Entity<CP14SolutionNormalizerComponent> ent, ref CP14SlotCrystalPowerChangedEvent args)
|
||||
{
|
||||
if (TryComp<AmbientSoundComponent>(ent, out var ambient))
|
||||
{
|
||||
_ambient.SetAmbience(ent, args.Powered);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
var query = EntityQueryEnumerator<CP14SolutionNormalizerComponent, SolutionContainerManagerComponent>();
|
||||
var query = EntityQueryEnumerator<Components.CP14SolutionNormalizerComponent, SolutionContainerManagerComponent>();
|
||||
while (query.MoveNext(out var uid, out var normalizer, out var containerManager))
|
||||
{
|
||||
if (_timing.CurTime <= normalizer.NextUpdateTime)
|
||||
|
||||
Reference in New Issue
Block a user