Skip to content

Commit

Permalink
Merge pull request #51 from VMSolidus/Fix-psychic-power-bug
Browse files Browse the repository at this point in the history
Update PsionicAbilitiesSystem.cs
  • Loading branch information
VMSolidus authored Jul 25, 2024
2 parents 84a3007 + cf3a8f9 commit 3560f0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Server/Psionics/Abilities/PsionicAbilitiesSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Robust.Shared.Random;
using Robust.Shared.Prototypes;
using Content.Shared.Popups;
using Robust.Shared.Serialization.Manager;

namespace Content.Server.Psionics.Abilities
{
Expand All @@ -19,6 +20,7 @@ public sealed class PsionicAbilitiesSystem : EntitySystem
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedPopupSystem _popups = default!;
[Dependency] private readonly ISerializationManager _serialization = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -50,7 +52,7 @@ public void AddRandomPsionicPower(EntityUid uid)
return;
}

var newPool = pool;
var newPool = _serialization.CreateCopy(pool, null, false, true);
foreach (var component in pool.Weights.Keys)
{
var checkedComponent = _componentFactory.GetComponent(component);
Expand Down

0 comments on commit 3560f0c

Please sign in to comment.