Files
wwdpublic/Content.Shared/Chemistry/Components/SolutionContainerMixerComponent.cs
sleepyyapril 4b8b0591d6 v239.0.0 + .NET 9 (#1475)
yeag

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

(cherry picked from commit 64a389a1158d22fbe7cdbe0a71d223b66dcfd5b6)
2025-01-14 02:18:31 +03:00

45 lines
1.4 KiB
C#

using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reaction;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Components;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Chemistry.Components;
/// <summary>
/// This is used for an entity that uses <see cref="ReactionMixerComponent"/> to mix any container with a solution after a period of time.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedSolutionContainerMixerSystem))]
public sealed partial class SolutionContainerMixerComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string ContainerId = "mixer";
[DataField, AutoNetworkedField]
public bool Mixing;
/// <summary>
/// How long it takes for mixing to occurs.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public TimeSpan MixDuration;
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public TimeSpan MixTimeEnd;
[DataField, AutoNetworkedField]
public SoundSpecifier? MixingSound;
[ViewVariables]
public Entity<AudioComponent>? MixingSoundEntity;
}
[Serializable, NetSerializable]
public enum SolutionContainerMixerVisuals : byte
{
Mixing
}