GibbingEvents.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Robust.Shared.Serialization;
  2. namespace Content.Shared.Gibbing.Events;
  3. /// <summary>
  4. /// Called just before we actually gib the target entity
  5. /// </summary>
  6. /// <param name="Target">The entity being gibed</param>
  7. /// <param name="GibType">What type of gibbing is occuring</param>
  8. /// <param name="AllowedContainers">Containers we are allow to gib</param>
  9. /// <param name="ExcludedContainers">Containers we are allow not allowed to gib</param>
  10. [ByRefEvent] public record struct AttemptEntityContentsGibEvent(
  11. EntityUid Target,
  12. GibContentsOption GibType,
  13. List<string>? AllowedContainers,
  14. List<string>? ExcludedContainers
  15. );
  16. /// <summary>
  17. /// Called just before we actually gib the target entity
  18. /// </summary>
  19. /// <param name="Target">The entity being gibed</param>
  20. /// <param name="GibletCount">how many giblets to spawn</param>
  21. /// <param name="GibType">What type of gibbing is occuring</param>
  22. [ByRefEvent] public record struct AttemptEntityGibEvent(EntityUid Target, int GibletCount, GibType GibType);
  23. /// <summary>
  24. /// Called immediately after we gib the target entity
  25. /// </summary>
  26. /// <param name="Target">The entity being gibbed</param>
  27. /// <param name="DroppedEntities">Any entities that are spilled out (if any)</param>
  28. [ByRefEvent] public record struct EntityGibbedEvent(EntityUid Target, List<EntityUid> DroppedEntities);
  29. [Serializable, NetSerializable]
  30. public enum GibType : byte
  31. {
  32. Skip,
  33. Drop,
  34. Gib,
  35. }
  36. public enum GibContentsOption : byte
  37. {
  38. Skip,
  39. Drop,
  40. Gib
  41. }