Add PDA Ringtones (#5842)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -30,6 +30,14 @@ namespace Content.Shared.PDA
|
||||
|
||||
}
|
||||
}
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PDAShowRingtoneMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public PDAShowRingtoneMessage()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PDAShowUplinkMessage : BoundUserInterfaceMessage
|
||||
|
||||
24
Content.Shared/PDA/Ringer/RingerMessagesUI.cs
Normal file
24
Content.Shared/PDA/Ringer/RingerMessagesUI.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using System;
|
||||
|
||||
namespace Content.Shared.PDA.Ringer
|
||||
{
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RingerRequestUpdateInterfaceMessage : BoundUserInterfaceMessage {}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RingerPlayRingtoneMessage : BoundUserInterfaceMessage {}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RingerSetRingtoneMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public Note[] Ringtone {get;}
|
||||
|
||||
public RingerSetRingtoneMessage(Note[] ringTone)
|
||||
{
|
||||
Ringtone = ringTone;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Content.Shared/PDA/Ringer/RingerUpdateState.cs
Normal file
20
Content.Shared/PDA/Ringer/RingerUpdateState.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using System;
|
||||
|
||||
namespace Content.Shared.PDA.Ringer
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RingerUpdateState : BoundUserInterfaceState
|
||||
{
|
||||
public bool IsPlaying;
|
||||
public Note[] Ringtone;
|
||||
|
||||
public RingerUpdateState(bool isPlay, Note[] ringtone)
|
||||
{
|
||||
IsPlaying = isPlay;
|
||||
Ringtone = ringtone;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
12
Content.Shared/PDA/Ringer/RingerVisuals.cs
Normal file
12
Content.Shared/PDA/Ringer/RingerVisuals.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.PDA.Ringer
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public enum RingerUiKey
|
||||
{
|
||||
Key
|
||||
}
|
||||
|
||||
}
|
||||
29
Content.Shared/PDA/SharedRingerSystem.cs
Normal file
29
Content.Shared/PDA/SharedRingerSystem.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.PDA;
|
||||
|
||||
public abstract class SharedRingerSystem : EntitySystem
|
||||
{
|
||||
public const int RingtoneLength = 4;
|
||||
public const int NoteTempo = 300;
|
||||
public const float NoteDelay = 60f / NoteTempo;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum Note : byte
|
||||
{
|
||||
A,
|
||||
Asharp,
|
||||
B,
|
||||
C,
|
||||
Csharp,
|
||||
D,
|
||||
Dsharp,
|
||||
E,
|
||||
F,
|
||||
Fsharp,
|
||||
G,
|
||||
Gsharp
|
||||
}
|
||||
Reference in New Issue
Block a user