From ebfc8680d628b66c0f4f7715b7ee3248bd47345a Mon Sep 17 00:00:00 2001 From: Dave Roman <43916038+MrDave1999@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:13:08 -0500 Subject: [PATCH] feat: Create class selection module (#80) --- .../Players/{ => ClassSelection}/ClassSelectionComponent.cs | 2 +- .../ClassSelectionExtensions.cs | 2 +- .../Players/{ => ClassSelection}/ClassSelectionSystem.cs | 4 ++-- .../Players/{ => ClassSelection}/ClassSelectionTextDraw.cs | 3 +-- src/Application/Usings.cs | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) rename src/Application/Players/{ => ClassSelection}/ClassSelectionComponent.cs (67%) rename src/Application/Players/{Extensions => ClassSelection}/ClassSelectionExtensions.cs (93%) rename src/Application/Players/{ => ClassSelection}/ClassSelectionSystem.cs (96%) rename src/Application/Players/{ => ClassSelection}/ClassSelectionTextDraw.cs (98%) diff --git a/src/Application/Players/ClassSelectionComponent.cs b/src/Application/Players/ClassSelection/ClassSelectionComponent.cs similarity index 67% rename from src/Application/Players/ClassSelectionComponent.cs rename to src/Application/Players/ClassSelection/ClassSelectionComponent.cs index 48425b08..b8a6156f 100644 --- a/src/Application/Players/ClassSelectionComponent.cs +++ b/src/Application/Players/ClassSelection/ClassSelectionComponent.cs @@ -1,4 +1,4 @@ -namespace CTF.Application.Players; +namespace CTF.Application.Players.ClassSelection; public class ClassSelectionComponent : Component { diff --git a/src/Application/Players/Extensions/ClassSelectionExtensions.cs b/src/Application/Players/ClassSelection/ClassSelectionExtensions.cs similarity index 93% rename from src/Application/Players/Extensions/ClassSelectionExtensions.cs rename to src/Application/Players/ClassSelection/ClassSelectionExtensions.cs index f2dd805b..3d251ea8 100644 --- a/src/Application/Players/Extensions/ClassSelectionExtensions.cs +++ b/src/Application/Players/ClassSelection/ClassSelectionExtensions.cs @@ -1,4 +1,4 @@ -namespace CTF.Application.Players.Extensions; +namespace CTF.Application.Players.ClassSelection; public static class ClassSelectionExtensions { diff --git a/src/Application/Players/ClassSelectionSystem.cs b/src/Application/Players/ClassSelection/ClassSelectionSystem.cs similarity index 96% rename from src/Application/Players/ClassSelectionSystem.cs rename to src/Application/Players/ClassSelection/ClassSelectionSystem.cs index a3cb0aac..45f2923b 100644 --- a/src/Application/Players/ClassSelectionSystem.cs +++ b/src/Application/Players/ClassSelection/ClassSelectionSystem.cs @@ -1,4 +1,4 @@ -namespace CTF.Application.Players; +namespace CTF.Application.Players.ClassSelection; public class ClassSelectionSystem(ClassSelectionTextDraw classSelectionTextDraw) : ISystem { @@ -17,7 +17,7 @@ public void OnPlayerConnect(Player player) [Event] public void OnPlayerRequestClass(Player player, int classId) { - if(player.HasForcedClassSelectionAfterDeath()) + if (player.HasForcedClassSelectionAfterDeath()) { player.SetSpawnInfo(player.Team, player.Skin, player.Position, player.Angle); player.Spawn(); diff --git a/src/Application/Players/ClassSelectionTextDraw.cs b/src/Application/Players/ClassSelection/ClassSelectionTextDraw.cs similarity index 98% rename from src/Application/Players/ClassSelectionTextDraw.cs rename to src/Application/Players/ClassSelection/ClassSelectionTextDraw.cs index 27cc2f84..b80c5560 100644 --- a/src/Application/Players/ClassSelectionTextDraw.cs +++ b/src/Application/Players/ClassSelection/ClassSelectionTextDraw.cs @@ -1,4 +1,4 @@ -namespace CTF.Application.Players; +namespace CTF.Application.Players.ClassSelection; public class ClassSelectionTextDraw { @@ -93,4 +93,3 @@ private void Initialize() _blueCommandListBox.Selectable = false; } } - \ No newline at end of file diff --git a/src/Application/Usings.cs b/src/Application/Usings.cs index a29cbc93..64f91e27 100644 --- a/src/Application/Usings.cs +++ b/src/Application/Usings.cs @@ -20,6 +20,7 @@ global using CTF.Application.Common.Resources; global using CTF.Application.Common.Extensions; global using CTF.Application.Players; +global using CTF.Application.Players.ClassSelection; global using CTF.Application.Players.Accounts; global using CTF.Application.Players.Ranks; global using CTF.Application.Players.Combos;