feat: properly perform predicted porta pottys (fix toilet prediction) (#39394)

This commit is contained in:
Perry Fraser
2025-08-05 21:34:41 -04:00
committed by GitHub
parent 63b2979e73
commit 053c5f64a0
5 changed files with 146 additions and 147 deletions

View File

@@ -2,39 +2,36 @@ using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Toilet.Components
namespace Content.Shared.Toilet.Components;
/// <summary>
/// Seats that can toggled up and down with visuals to match.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ToiletComponent : Component
{
/// <summary>
/// Toilets that can be flushed, seats toggled up and down, items hidden in cistern.
/// Toggles seat state.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ToiletComponent : Component
{
/// <summary>
/// Toggles seat state.
/// </summary>
[DataField, AutoNetworkedField]
public bool ToggleSeat;
[DataField, AutoNetworkedField]
public bool ToggleSeat;
/// <summary>
/// Sound to play when toggling toilet seat.
/// </summary>
[DataField]
public SoundSpecifier SeatSound = new SoundPathSpecifier("/Audio/Effects/toilet_seat_down.ogg");
}
[Serializable, NetSerializable]
public enum ToiletVisuals : byte
{
SeatVisualState,
}
[Serializable, NetSerializable]
public enum SeatVisualState : byte
{
SeatUp,
SeatDown
}
/// <summary>
/// Sound to play when toggling toilet seat.
/// </summary>
[DataField]
public SoundSpecifier SeatSound = new SoundPathSpecifier("/Audio/Effects/toilet_seat_down.ogg");
}
[Serializable, NetSerializable]
public enum ToiletVisuals : byte
{
SeatVisualState,
}
[Serializable, NetSerializable]
public enum SeatVisualState : byte
{
SeatUp,
SeatDown,
}