Refactor magic speak system to be a component added to actions (#36328)

This commit is contained in:
J
2025-05-04 18:34:19 +01:00
committed by GitHub
parent 81cbb31425
commit 7b352643d5
28 changed files with 115 additions and 115 deletions

View File

@@ -6,7 +6,7 @@ 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
public sealed partial class ChangeComponentsSpellEvent : EntityTargetActionEvent
{
// 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.
@@ -19,9 +19,4 @@ public sealed partial class ChangeComponentsSpellEvent : EntityTargetActionEvent
[AlwaysPushInheritance]
public HashSet<string> ToRemove = new();
[DataField]
public string? Speech { get; private set; }
[DataField]
public bool DoSpeech { get; private set; }
}