* Update StationSpawningSystem.cs Web-edit to allow feeding in an existing entity. * Update StationSpawningSystem.cs value type moment * Update StationSpawningSystem.cs * Oh goddamnit this is a refactor now. * awawawa * aaaaaaaaaaa * ee * forgot records. * no records? no records. * What's in a name? * Sloth forcing me to do the refactor properly smh. * e * optional evac in test. * tests pls work * awa --------- Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
25 lines
774 B
C#
25 lines
774 B
C#
using Content.Shared.Actions;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
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, 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; }
|
|
}
|