Magic Items (#370)

* attuning to items start

* verbs attuning, forgot oldest attuning

* Update CP14SharedMagicAttuningSystem.cs

* some fixes

* add deattuning

* fix popups on owner

* file restructurization

* MORE FOLDER RENAMING GODD

* magic via holding yea!

* fix deattuning

* vfx bugfixs

* wearing magic items

* Cure wounds spell

* refactor spells

* more redo

* finish refactor
This commit is contained in:
Ed
2024-08-01 11:52:27 +03:00
committed by GitHub
parent 19365c0314
commit 56da23925f
40 changed files with 787 additions and 396 deletions

View File

@@ -10,7 +10,6 @@ public partial class CP14MagicEnergySystem
{
SubscribeLocalEvent<CP14MagicEnergyDrawComponent, MapInitEvent>(OnDrawMapInit);
SubscribeLocalEvent<CP14RandomAuraNodeComponent, MapInitEvent>(OnRandomRangeMapInit);
}
private void OnRandomRangeMapInit(Entity<CP14RandomAuraNodeComponent> random, ref MapInitEvent args)

View File

@@ -1,13 +1,15 @@
using Content.Server.Chat.Systems;
using Content.Shared._CP14.Magic;
using Content.Shared._CP14.Magic.Components;
using Content.Shared._CP14.Magic.Events;
using Content.Shared._CP14.MagicSpell;
using Content.Shared._CP14.MagicSpell.Components;
using Content.Shared._CP14.MagicSpell.Events;
using Robust.Server.GameObjects;
namespace Content.Server._CP14.Magic;
namespace Content.Server._CP14.MagicSpell;
public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
{
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly TransformSystem _transform = default!;
public override void Initialize()
{
@@ -26,6 +28,7 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
private void OnSpawnMagicVisualEffect(Entity<CP14MagicEffectCastingVisualComponent> ent, ref CP14StartCastMagicEffectEvent args)
{
var vfx = SpawnAttachedTo(ent.Comp.Proto, Transform(args.Performer).Coordinates);
_transform.SetParent(vfx, args.Performer);
ent.Comp.SpawnedEntity = vfx;
}