predict morgue and crematorium (#39293)

This commit is contained in:
slarticodefast
2025-08-22 01:49:50 +02:00
committed by GitHub
parent be62e08de4
commit d4f96fd1c6
29 changed files with 433 additions and 341 deletions

View File

@@ -0,0 +1,42 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Morgue.Components;
/// <summary>
/// Allows an entity storage to dispose bodies by turning them into ash.
/// </summary>
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class CrematoriumComponent : Component
{
/// <summary>
/// The entity to spawn when something was burned.
/// </summary>
[DataField, AutoNetworkedField]
public EntProtoId LeftOverProtoId = "Ash";
/// <summary>
/// The time it takes to cremate something.
/// </summary>
[DataField, AutoNetworkedField]
public TimeSpan CookTime = TimeSpan.FromSeconds(5);
/// <summary>
/// The timestamp at which cremating is finished.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan ActiveUntil = TimeSpan.Zero;
[DataField]
public SoundSpecifier CremateStartSound = new SoundPathSpecifier("/Audio/Items/Lighters/lighter1.ogg");
[DataField]
public SoundSpecifier CrematingSound = new SoundPathSpecifier("/Audio/Effects/burning.ogg");
[DataField]
public SoundSpecifier CremateFinishSound = new SoundPathSpecifier("/Audio/Machines/ding.ogg");
}