mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 23:02:34 +02:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using Robust.Shared.Audio;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Serialization;
|
|
using System;
|
|
|
|
#nullable disable
|
|
|
|
namespace Robust.Shared.GameObjects
|
|
{
|
|
// TODO: This is quite bandwidth intensive.
|
|
// Sending bus names and file names as strings is expensive and can be optimized.
|
|
// Also there's redundant fields in AudioParams in most cases.
|
|
[Serializable, NetSerializable]
|
|
public abstract class AudioMessage : EntityEventArgs
|
|
{
|
|
public uint Identifier { get; set; }
|
|
public string FileName { get; set; }
|
|
public AudioParams AudioParams { get; set; }
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class StopAudioMessageClient : EntityEventArgs
|
|
{
|
|
public uint Identifier {get; set;}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class PlayAudioGlobalMessage : AudioMessage
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class PlayAudioPositionalMessage : AudioMessage
|
|
{
|
|
public EntityCoordinates Coordinates { get; set; }
|
|
public EntityCoordinates FallbackCoordinates { get; set; }
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class PlayAudioEntityMessage : AudioMessage
|
|
{
|
|
public EntityUid EntityUid { get; set; }
|
|
public EntityCoordinates Coordinates { get; set; }
|
|
public EntityCoordinates FallbackCoordinates { get; set; }
|
|
}
|
|
}
|