Files
wwdpublic/Content.Shared/Magic/Events/ChangeComponentSpellEvent.cs
Spatison 2a10c02eb5 No spead merge (#475)
* Revert "[GoobPort] WIZ REAL (#465)"

This reverts commit 091a8ff433.

* fix local
2025-04-26 10:50:32 +03:00

28 lines
898 B
C#

using Content.Shared.Actions;
using Content.Shared.Chat;
using Robust.Shared.Prototypes;
namespace Content.Shared.Magic.Events;
/// <summary>
/// Spell that uses the magic of ECS to add & remove components. Components are first removed, then added.
/// </summary>
public sealed partial class ChangeComponentsSpellEvent : EntityTargetActionEvent, ISpeakSpell
{
// TODO allow it to set component data-fields?
// for now a Hackish way to do that is to remove & add, but that doesn't allow you to selectively set specific data fields.
[DataField("toAdd")]
[AlwaysPushInheritance]
public ComponentRegistry ToAdd = new();
[DataField("toRemove")]
[AlwaysPushInheritance]
public HashSet<string> ToRemove = new();
[DataField("speech")]
public string? Speech { get; private set; }
public InGameICChatType ChatType { get; } = InGameICChatType.Speak;
}