shadow grab test
This commit is contained in:
@@ -91,6 +91,7 @@ public partial class CP14SharedMagicSystem : EntitySystem
|
||||
BreakOnDamage = delayedEffect.BreakOnDamage,
|
||||
Hidden = delayedEffect.Hidden,
|
||||
BlockDuplicate = true,
|
||||
DistanceThreshold = 100f,
|
||||
};
|
||||
|
||||
_doAfter.TryStartDoAfter(doAfterEventArgs);
|
||||
@@ -129,6 +130,7 @@ public partial class CP14SharedMagicSystem : EntitySystem
|
||||
BreakOnDamage = delayedEffect.BreakOnDamage,
|
||||
Hidden = delayedEffect.Hidden,
|
||||
BlockDuplicate = true,
|
||||
DistanceThreshold = 100f,
|
||||
};
|
||||
|
||||
_doAfter.TryStartDoAfter(doAfterEventArgs);
|
||||
@@ -162,6 +164,7 @@ public partial class CP14SharedMagicSystem : EntitySystem
|
||||
BreakOnDamage = delayedEffect.BreakOnDamage,
|
||||
Hidden = delayedEffect.Hidden,
|
||||
BlockDuplicate = true,
|
||||
DistanceThreshold = 100f,
|
||||
};
|
||||
|
||||
_doAfter.TryStartDoAfter(doAfterEventArgs);
|
||||
|
||||
23
Content.Shared/_CP14/MagicSpell/Spells/CP14ThrowToUser.cs
Normal file
23
Content.Shared/_CP14/MagicSpell/Spells/CP14ThrowToUser.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Content.Shared.Throwing;
|
||||
|
||||
namespace Content.Shared._CP14.MagicSpell.Spells;
|
||||
|
||||
public sealed partial class CP14SpellThrowToUser : CP14SpellEffect
|
||||
{
|
||||
[DataField]
|
||||
public float ThrowPower = 10f;
|
||||
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
|
||||
{
|
||||
if (args.Target is null)
|
||||
return;
|
||||
|
||||
var targetEntity = args.Target.Value;
|
||||
|
||||
var throwing = entManager.System<ThrowingSystem>();
|
||||
|
||||
if (!entManager.TryGetComponent<TransformComponent>(args.User, out var xform))
|
||||
return;
|
||||
|
||||
throwing.TryThrow(targetEntity, xform.Coordinates, ThrowPower);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user