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>
This commit is contained in:
Tornado Tech
2025-05-01 00:25:10 +10:00
committed by GitHub
parent b4ea0f69f5
commit ad2fc18356
36 changed files with 335 additions and 121 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using System.Text;
using Content.Shared._CP14.MagicEnergy;
using Content.Shared._CP14.MagicEnergy.Components;
@@ -118,7 +119,7 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
if (_proto.TryIndex(ent.Comp.MagicType, out var indexedMagic))
{
sb.Append($"\n{Loc.GetString("cp14-magic-magic-type")}: [color={indexedMagic.Color.ToHex()}]{Loc.GetString(indexedMagic.Name)}[/color]");
sb.Append($"\n{Loc.GetString("cp14-magic-type")}: [color={indexedMagic.Color.ToHex()}]{Loc.GetString(indexedMagic.Name)}[/color]");
}
if (TryComp<CP14MagicEffectVerbalAspectComponent>(ent, out var verbal))
@@ -148,20 +149,23 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
/// <summary>
/// Checking to see if the spell can be used at all
/// </summary>
private bool CanCastSpell(Entity<CP14MagicEffectComponent> ent, EntityUid performer)
private bool CanCastSpell(Entity<CP14MagicEffectComponent> ent, CP14SpellEffectBaseArgs args)
{
var ev = new CP14CastMagicEffectAttemptEvent(performer);
RaiseLocalEvent(ent, ref ev);
if (ev.Reason != string.Empty && _net.IsServer)
{
_popup.PopupEntity(ev.Reason, performer, performer);
}
if (args.User is not { } performer)
return true;
var ev = new CP14CastMagicEffectAttemptEvent(performer, args.Used, args.Target, args.Position);
RaiseLocalEvent(ent, ev);
if (ev.Reason != string.Empty)
_popup.PopupPredicted(ev.Reason, performer, performer);
return !ev.Cancelled;
}
private void CastTelegraphy(Entity<CP14MagicEffectComponent> ent, CP14SpellEffectBaseArgs args)
{
if (!_net.IsServer)
if (_net.IsClient)
return;
foreach (var effect in ent.Comp.TelegraphyEffects)
@@ -175,12 +179,12 @@ public abstract partial class CP14SharedMagicSystem : EntitySystem
var ev = new CP14MagicEffectConsumeResourceEvent(args.User);
RaiseLocalEvent(ent, ref ev);
if (_net.IsServer)
if (_net.IsClient)
return;
foreach (var effect in ent.Comp.Effects)
{
foreach (var effect in ent.Comp.Effects)
{
effect.Effect(EntityManager, args);
}
effect.Effect(EntityManager, args);
}
}