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

@@ -1,26 +1,38 @@
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Morgue.Components;
/// <summary>
/// When added to an entity storage this component will keep track of the mind status of the player inside.
/// </summary>
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class MorgueComponent : Component
{
/// <summary>
/// Whether or not the morgue beeps if a living player is inside.
/// Whether or not the morgue beeps if a living player is inside.
/// </summary>
[DataField]
[DataField, AutoNetworkedField]
public bool DoSoulBeep = true;
[DataField]
public float AccumulatedFrameTime = 0f;
/// <summary>
/// The timestamp for the next beep.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan NextBeep = TimeSpan.Zero;
/// <summary>
/// The amount of time between each beep.
/// The amount of time between each beep.
/// </summary>
[DataField]
public float BeepTime = 10f;
public TimeSpan BeepTime = TimeSpan.FromSeconds(10);
/// <summary>
/// The beep sound to play.
/// </summary>
[DataField]
public SoundSpecifier OccupantHasSoulAlarmSound = new SoundPathSpecifier("/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg");
}