* add: Temporamancy tree with new shadow swap spell * feat: Increased tempo loadout to 2 * feat: Remove most popups from swap spell * fix: Swap with no mob entities * feat: Add CanCast to spell effect * fix: Handeling cancaled event & swap state * feat: Add UseCustomCastConditions * feat: Add swap to magic shadow staff * feat: Add tempo essence & magic type * feat: Add Tempo type to all dimension spells * fix: Magic shadow staff tempo manacost modify * fix: Spell type local * feat: Add touhou lore * fix: Review * feat: Add target dead block component * feat: Remove checking access * feat: Add RequireCanInteract * feat: Remove essence * fix: Review * fuck * fuck part 2 * Update Content.Shared/_CP14/MagicSpell/CP14SharedMagicSystem.DelayedActions.cs * Update dimension.png * minor nitpick * fix --------- Co-authored-by: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com> Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com> Co-authored-by: Ed <edwardxperia2000@gmail.com>
18 lines
627 B
C#
18 lines
627 B
C#
namespace Content.Shared._CP14.MagicSpell.Spells;
|
|
|
|
public sealed partial class CP14SpellCasterSwap : CP14SpellEffect
|
|
{
|
|
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
|
|
{
|
|
if (args.User is not { } user || args.Target is not { } target)
|
|
return;
|
|
|
|
var transform = entManager.System<SharedTransformSystem>();
|
|
var userPosition = transform.GetMoverCoordinates(user);
|
|
var targetPosition = transform.GetMoverCoordinates(target);
|
|
|
|
transform.SetCoordinates(user, targetPosition);
|
|
transform.SetCoordinates(target, userPosition);
|
|
}
|
|
}
|