Files
crystall-punk-14/Content.Shared/_CP14/MagicSpell/Events/CP14DelayedActionEvents.cs
Tornado Tech ad2fc18356 Dimensional (#1140)
* 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>
2025-04-30 17:25:10 +03:00

150 lines
3.7 KiB
C#

using Content.Shared.Actions;
using Content.Shared.DoAfter;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
namespace Content.Shared._CP14.MagicSpell.Events;
public interface ICP14DelayedMagicEffect
{
public float Cooldown { get; }
public float CastDelay { get; }
public bool BreakOnMove { get; }
public bool BreakOnDamage { get; }
public float DistanceThreshold { get; }
public bool Hidden { get; }
public bool RequireCanInteract { get; }
}
public sealed partial class CP14DelayedEntityWorldTargetActionEvent : EntityWorldTargetActionEvent,
ICP14DelayedMagicEffect
{
[DataField]
public float Cooldown { get; private set; } = 1f;
[DataField]
public float CastDelay { get; private set; } = 1f;
[DataField]
public bool BreakOnMove { get; private set; } = true;
[DataField]
public bool BreakOnDamage { get; private set; } = true;
[DataField]
public float DistanceThreshold { get; private set; } = 100f;
[DataField]
public bool Hidden { get; private set; } = false;
[DataField]
public bool RequireCanInteract { get; private set; } = true;
}
//Entity Target
public sealed partial class CP14DelayedEntityTargetActionEvent : EntityTargetActionEvent,
ICP14DelayedMagicEffect
{
[DataField]
public float Cooldown { get; private set; } = 1f;
[DataField]
public float CastDelay { get; private set; } = 1f;
[DataField]
public bool BreakOnMove { get; private set; } = true;
[DataField]
public bool BreakOnDamage { get; private set; } = true;
[DataField]
public float DistanceThreshold { get; private set; } = 100f;
[DataField]
public bool Hidden { get; private set; } = false;
[DataField]
public bool RequireCanInteract { get; private set; } = true;
}
public sealed partial class CP14DelayedInstantActionEvent : InstantActionEvent, ICP14DelayedMagicEffect
{
[DataField]
public float Cooldown { get; private set; } = 3f;
[DataField]
public float CastDelay { get; private set; } = 1f;
[DataField]
public bool BreakOnMove { get; private set; } = true;
[DataField]
public bool BreakOnDamage { get; private set; } = true;
[DataField]
public float DistanceThreshold { get; private set; } = 100f;
[DataField]
public bool Hidden { get; private set; } = false;
[DataField]
public bool RequireCanInteract { get; private set; } = true;
}
[Serializable, NetSerializable]
public sealed partial class CP14DelayedEntityWorldTargetActionDoAfterEvent : DoAfterEvent
{
[DataField]
public NetCoordinates? TargetPosition;
[DataField]
public NetEntity? TargetEntity;
[DataField]
public float? Cooldown;
public CP14DelayedEntityWorldTargetActionDoAfterEvent(NetCoordinates? targetPos, NetEntity? targetEntity, float cooldown)
{
TargetPosition = targetPos;
TargetEntity = targetEntity;
Cooldown = cooldown;
}
public override DoAfterEvent Clone() => this;
}
[Serializable, NetSerializable]
public sealed partial class CP14DelayedEntityTargetActionDoAfterEvent : DoAfterEvent
{
[DataField]
public NetEntity? TargetEntity;
[DataField]
public float? Cooldown;
public CP14DelayedEntityTargetActionDoAfterEvent(NetEntity? targetEntity, float cooldown)
{
TargetEntity = targetEntity;
Cooldown = cooldown;
}
public override DoAfterEvent Clone() => this;
}
[Serializable, NetSerializable]
public sealed partial class CP14DelayedInstantActionDoAfterEvent : DoAfterEvent
{
[DataField]
public float? Cooldown;
public CP14DelayedInstantActionDoAfterEvent(float cooldown)
{
Cooldown = cooldown;
}
public override DoAfterEvent Clone() => this;
}