BodyPartEvents.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
  2. // SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
  3. // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
  4. //
  5. // SPDX-License-Identifier: AGPL-3.0-or-later
  6. using Content.Shared.Body.Part;
  7. namespace Content.Shared._Shitmed.Body.Events;
  8. /// <summary>
  9. /// Raised on an entity when attempting to remove a body part.
  10. /// </summary>
  11. [ByRefEvent]
  12. public readonly record struct AmputateAttemptEvent(EntityUid Part);
  13. // Kind of a clone of BodyPartAddedEvent for surgical reattachment specifically.
  14. [ByRefEvent]
  15. public readonly record struct BodyPartAttachedEvent(Entity<BodyPartComponent> Part);
  16. // Kind of a clone of BodyPartRemovedEvent for any instances where we call DropPart(), reasoning being that RemovedEvent fires off
  17. // a lot more often than what I'd like due to PVS.
  18. [ByRefEvent]
  19. public readonly record struct BodyPartDroppedEvent(Entity<BodyPartComponent> Part);
  20. [ByRefEvent]
  21. public readonly record struct BodyPartEnableChangedEvent(bool Enabled);
  22. [ByRefEvent]
  23. public readonly record struct BodyPartEnabledEvent(Entity<BodyPartComponent> Part);
  24. [ByRefEvent]
  25. public readonly record struct BodyPartDisabledEvent(Entity<BodyPartComponent> Part);
  26. public readonly record struct BodyPartComponentsModifyEvent(EntityUid Body, bool Add);