Remove speech & popups from actions (#15747)

This commit is contained in:
Leon Friedrich
2023-04-26 16:04:44 +12:00
committed by GitHub
parent beacaed0bb
commit 4e7cea96de
22 changed files with 89 additions and 126 deletions

View File

@@ -6,7 +6,7 @@ namespace Content.Server.Magic.Events;
/// <summary>
/// Spell that uses the magic of ECS to add & remove components. Components are first removed, then added.
/// </summary>
public sealed class ChangeComponentsSpellEvent : EntityTargetActionEvent
public sealed 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.
@@ -18,4 +18,7 @@ public sealed class ChangeComponentsSpellEvent : EntityTargetActionEvent
[DataField("toRemove")]
[AlwaysPushInheritance]
public HashSet<string> ToRemove = new();
[DataField("speech")]
public string? Speech { get; }
}