diff --git a/Content.Client/PDA/Ringer/RingerBoundUserInterface.cs b/Content.Client/PDA/Ringer/RingerBoundUserInterface.cs index bb8b785287..aee8357cdc 100644 --- a/Content.Client/PDA/Ringer/RingerBoundUserInterface.cs +++ b/Content.Client/PDA/Ringer/RingerBoundUserInterface.cs @@ -43,7 +43,7 @@ namespace Content.Client.PDA.Ringer return false; } - ringtone = new Note[4]; + ringtone = new Note[_menu.RingerNoteInputs.Length]; for (int i = 0; i < _menu.RingerNoteInputs.Length; i++) { diff --git a/Content.Client/PDA/Ringer/RingtoneMenu.xaml b/Content.Client/PDA/Ringer/RingtoneMenu.xaml index ecf5d30436..a361a58dd2 100644 --- a/Content.Client/PDA/Ringer/RingtoneMenu.xaml +++ b/Content.Client/PDA/Ringer/RingtoneMenu.xaml @@ -1,7 +1,7 @@ + MinSize="320 128" + SetSize="320 128"> + MinSize="180 0"> diff --git a/Content.Client/PDA/Ringer/RingtoneMenu.xaml.cs b/Content.Client/PDA/Ringer/RingtoneMenu.xaml.cs index 198c34b095..044714b06f 100644 --- a/Content.Client/PDA/Ringer/RingtoneMenu.xaml.cs +++ b/Content.Client/PDA/Ringer/RingtoneMenu.xaml.cs @@ -10,14 +10,14 @@ namespace Content.Client.PDA.Ringer [GenerateTypedNameReferences] public sealed partial class RingtoneMenu : DefaultWindow { - public string[] PreviousNoteInputs = new[] { "A", "A", "A", "A" }; + public string[] PreviousNoteInputs = new[] { "A", "A", "A", "A", "A", "A" }; public LineEdit[] RingerNoteInputs = default!; public RingtoneMenu() { RobustXamlLoader.Load(this); - RingerNoteInputs = new[] { RingerNoteOneInput, RingerNoteTwoInput, RingerNoteThreeInput, RingerNoteFourInput }; + RingerNoteInputs = new[] { RingerNoteOneInput, RingerNoteTwoInput, RingerNoteThreeInput, RingerNoteFourInput, RingerNoteFiveInput, RingerNoteSixInput }; for (var i = 0; i < RingerNoteInputs.Length; ++i) { diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index b134bad703..8778e29ec0 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -249,7 +249,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem traitorRole.Mind.Briefing = string.Format( "{0}\n{1}", Loc.GetString("traitor-role-codewords-short", ("codewords", string.Join(", ", traitorRule.Codewords))), - Loc.GetString("traitor-role-uplink-code-short", ("code", string.Join("", code)))); + Loc.GetString("traitor-role-uplink-code-short", ("code", string.Join("-", code).Replace("sharp","#")))); // Assign traitor roles _mindSystem.AddRole(mind, traitorRole); @@ -295,7 +295,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem { _chatManager.DispatchServerMessage(session, Loc.GetString("traitor-role-greeting")); _chatManager.DispatchServerMessage(session, Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ", codewords)))); - _chatManager.DispatchServerMessage(session, Loc.GetString("traitor-role-uplink-code", ("code", string.Join("", code)))); + _chatManager.DispatchServerMessage(session, Loc.GetString("traitor-role-uplink-code", ("code", string.Join("-", code).Replace("sharp","#")))); } } diff --git a/Content.Server/PDA/Ringer/RingerSystem.cs b/Content.Server/PDA/Ringer/RingerSystem.cs index 46bcc999b8..eba052f9e1 100644 --- a/Content.Server/PDA/Ringer/RingerSystem.cs +++ b/Content.Server/PDA/Ringer/RingerSystem.cs @@ -122,7 +122,30 @@ namespace Content.Server.PDA.Ringer public void RandomizeUplinkCode(EntityUid uid, RingerUplinkComponent uplink, ComponentInit args) { - uplink.Code = GenerateRingtone(); + var notes = new[] + { + Note.A, + Note.Asharp, + Note.B, + Note.C, + Note.Csharp, + Note.D, + Note.Dsharp, + Note.E, + Note.F, + Note.Fsharp, + Note.G, + Note.Gsharp, + }; + + var ringtone = new Note[RingtoneLength]; + + for (var i = 0; i < RingtoneLength; i++) + { + ringtone[i] = _random.Pick(notes); + } + + uplink.Code = ringtone; } //Non Event Functions @@ -141,7 +164,7 @@ namespace Content.Server.PDA.Ringer var ringtone = new Note[RingtoneLength]; - for (var i = 0; i < 4; i++) + for (var i = 0; i < RingtoneLength; i++) { ringtone[i] = _random.Pick(notes); } @@ -196,7 +219,7 @@ namespace Content.Server.PDA.Ringer ringer.NoteCount++; - if (ringer.NoteCount > 3) + if (ringer.NoteCount > RingtoneLength - 1) { remove.Add(uid); UpdateRingerUserInterface(uid, ringer); diff --git a/Content.Shared/PDA/SharedRingerSystem.cs b/Content.Shared/PDA/SharedRingerSystem.cs index 7796351732..5652a60599 100644 --- a/Content.Shared/PDA/SharedRingerSystem.cs +++ b/Content.Shared/PDA/SharedRingerSystem.cs @@ -4,7 +4,7 @@ namespace Content.Shared.PDA; public abstract class SharedRingerSystem : EntitySystem { - public const int RingtoneLength = 4; + public const int RingtoneLength = 6; public const int NoteTempo = 300; public const float NoteDelay = 60f / NoteTempo; }