WorldSpawnSpellEvent.cs 956 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Numerics;
  2. using Content.Shared.Actions;
  3. using Content.Shared.Storage;
  4. namespace Content.Shared.Magic.Events;
  5. // TODO: This class needs combining with InstantSpawnSpellEvent
  6. public sealed partial class WorldSpawnSpellEvent : WorldTargetActionEvent, ISpeakSpell
  7. {
  8. /// <summary>
  9. /// The list of prototypes this spell will spawn
  10. /// </summary>
  11. [DataField]
  12. public List<EntitySpawnEntry> Prototypes = new();
  13. // TODO: This offset is liable for deprecation.
  14. // TODO: Target tile via code instead?
  15. /// <summary>
  16. /// The offset the prototypes will spawn in on relative to the one prior.
  17. /// Set to 0,0 to have them spawn on the same tile.
  18. /// </summary>
  19. [DataField]
  20. public Vector2 Offset;
  21. /// <summary>
  22. /// Lifetime to set for the entities to self delete
  23. /// </summary>
  24. [DataField]
  25. public float? Lifetime;
  26. [DataField]
  27. public string? Speech { get; private set; }
  28. }