* Moving Gibbing rework out from medrefactor into it's own PR * Re-enabled warning for missing gibbable on TryGibEntity * Implemented better logic for gibbing failover and better logging * Allowing audio params and drop scattering customization per component. Created UnGibbable organ base types and made brains ungibbable. Removed delete brain from gibBody function. Artifact crusher does not destroy brains anymore. It only destroyed brains before not other organs which was wierd. * Update Content.Shared/Body/Systems/SharedBodySystem.Body.cs Fixing space for multiplication Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * Added event raised when attempting to gib contained entities to allow modification of allowed and excluded container ids * removing audioParams var from component (sound specifier includes it) * Fixing signature --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Gibbing.Events;
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// Called just before we actually gib the target entity
|
|
/// </summary>
|
|
/// <param name="Target">The entity being gibed</param>
|
|
/// <param name="GibType">What type of gibbing is occuring</param>
|
|
/// <param name="AllowedContainers">Containers we are allow to gib</param>
|
|
/// <param name="ExcludedContainers">Containers we are allow not allowed to gib</param>
|
|
[ByRefEvent] public record struct AttemptEntityContentsGibEvent(
|
|
EntityUid Target,
|
|
GibContentsOption GibType,
|
|
List<string>? AllowedContainers,
|
|
List<string>? ExcludedContainers
|
|
);
|
|
|
|
|
|
/// <summary>
|
|
/// Called just before we actually gib the target entity
|
|
/// </summary>
|
|
/// <param name="Target">The entity being gibed</param>
|
|
/// <param name="GibletCount">how many giblets to spawn</param>
|
|
/// <param name="GibType">What type of gibbing is occuring</param>
|
|
[ByRefEvent] public record struct AttemptEntityGibEvent(EntityUid Target, int GibletCount, GibType GibType);
|
|
|
|
/// <summary>
|
|
/// Called immediately after we gib the target entity
|
|
/// </summary>
|
|
/// <param name="Target">The entity being gibbed</param>
|
|
/// <param name="DroppedEntities">Any entities that are spilled out (if any)</param>
|
|
[ByRefEvent] public record struct EntityGibbedEvent(EntityUid Target, List<EntityUid> DroppedEntities);
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum GibType : byte
|
|
{
|
|
Skip,
|
|
Drop,
|
|
Gib,
|
|
}
|
|
|
|
public enum GibContentsOption : byte
|
|
{
|
|
Skip,
|
|
Drop,
|
|
Gib
|
|
}
|