Transform sting nerf (#269)
* - add: 10 minutes of suffering. * - fix: No monkey evolution. * - fix: Remove Absorb on rejuvenate. * - tweak: Less thick armor. * - fix: Transfer uncloneable on transform.
This commit is contained in:
39
Content.Server/Changeling/TransformStungSystem.cs
Normal file
39
Content.Server/Changeling/TransformStungSystem.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Content.Server.Forensics;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
|
||||
namespace Content.Server.Changeling;
|
||||
|
||||
public sealed class TransformStungSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ChangelingSystem _ling = default!;
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
var query = EntityQueryEnumerator<TransformStungComponent, MobStateComponent, DnaComponent>();
|
||||
while (query.MoveNext(out var uid, out var stung, out var state, out var dna))
|
||||
{
|
||||
if (dna.DNA == stung.OriginalHumanoidData.Dna)
|
||||
{
|
||||
RemCompDeferred<TransformStungComponent>(uid);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state.CurrentState != MobState.Alive)
|
||||
continue;
|
||||
|
||||
stung.Accumulator += frameTime;
|
||||
|
||||
if (stung.Accumulator < stung.Duration.TotalSeconds)
|
||||
continue;
|
||||
|
||||
stung.Accumulator = 0f;
|
||||
|
||||
_ling.TransformPerson(uid, stung.OriginalHumanoidData);
|
||||
|
||||
RemCompDeferred<TransformStungComponent>(uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user