Files
tbd-station-14/Content.Shared/Gibbing/Components/GibbableComponent.cs
Jezithyr 541d8f8715 Gibbing refactor (Per-part gibbing and giblet throwing!) (#24989)
* 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>
2024-02-10 15:37:06 -08:00

35 lines
1.2 KiB
C#

using Content.Shared.Gibbing.Systems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Gibbing.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(GibbingSystem))]
public sealed partial class GibbableComponent : Component
{
/// <summary>
/// Giblet entity prototypes to randomly select from when spawning additional giblets
/// </summary>
[DataField, AutoNetworkedField]
public List<EntProtoId> GibPrototypes = new();
/// <summary>
/// Number of giblet entities to spawn in addition to entity contents
/// </summary>
[DataField, AutoNetworkedField]
public int GibCount;
/// <summary>
/// Sound to be played when this entity is gibbed, only played when playsound is true on the gibbing function
/// </summary>
[DataField, AutoNetworkedField]
public SoundSpecifier? GibSound = new SoundCollectionSpecifier("gib", AudioParams.Default.WithVariation(0.025f));
/// <summary>
/// Max distance giblets can be dropped from an entity when NOT using physics-based scattering
/// </summary>
[DataField, AutoNetworkedField]
public float GibScatterRange = 0.3f;
}