1
0

SolutionContainerMixerComponent.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Content.Shared.Chemistry.EntitySystems;
  2. using Content.Shared.Chemistry.Reaction;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Audio.Components;
  5. using Robust.Shared.GameStates;
  6. using Robust.Shared.Serialization;
  7. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  8. namespace Content.Shared.Chemistry.Components;
  9. /// <summary>
  10. /// This is used for an entity that uses <see cref="ReactionMixerComponent"/> to mix any container with a solution after a period of time.
  11. /// </summary>
  12. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  13. [Access(typeof(SharedSolutionContainerMixerSystem))]
  14. public sealed partial class SolutionContainerMixerComponent : Component
  15. {
  16. [DataField, ViewVariables(VVAccess.ReadWrite)]
  17. public string ContainerId = "mixer";
  18. [DataField, AutoNetworkedField]
  19. public bool Mixing;
  20. /// <summary>
  21. /// How long it takes for mixing to occurs.
  22. /// </summary>
  23. [DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
  24. public TimeSpan MixDuration;
  25. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
  26. public TimeSpan MixTimeEnd;
  27. [DataField, AutoNetworkedField]
  28. public SoundSpecifier? MixingSound;
  29. [ViewVariables]
  30. public Entity<AudioComponent>? MixingSoundEntity;
  31. }
  32. [Serializable, NetSerializable]
  33. public enum SolutionContainerMixerVisuals : byte
  34. {
  35. Mixing
  36. }