From 9ff8ac483c669c1a35673b6af10668a6d5bb66d3 Mon Sep 17 00:00:00 2001 From: Dave Roman <43916038+MrDave1999@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:29:45 -0500 Subject: [PATCH 01/12] refactor!: Inject IDialogService via constructor into the weapon system (#255) --- .../Players/Weapons/WeaponSystem.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Application/Players/Weapons/WeaponSystem.cs b/src/Application/Players/Weapons/WeaponSystem.cs index f0508ef5..dadfc86a 100644 --- a/src/Application/Players/Weapons/WeaponSystem.cs +++ b/src/Application/Players/Weapons/WeaponSystem.cs @@ -2,9 +2,11 @@ public class WeaponSystem : ISystem { + private readonly IDialogService _dialogService; private readonly ListDialog _weaponsDialog; - public WeaponSystem() + public WeaponSystem(IDialogService dialogService) { + _dialogService = dialogService; _weaponsDialog = new ListDialog("Weapons", "Select", "Close"); var weapons = GtaWeapons.GetAll(); foreach (IWeapon weapon in weapons) @@ -32,11 +34,11 @@ public void OnPlayerSpawn(Player player) } [PlayerCommand("weapons")] - public async void ShowWeapons(Player player, IDialogService dialogService) + public async void ShowWeapons(Player player) { var weaponSelection = player.GetComponent(); WeaponPack selectedWeapons = weaponSelection.SelectedWeapons; - ListDialogResponse response = await dialogService.ShowAsync(player, _weaponsDialog); + ListDialogResponse response = await _dialogService.ShowAsync(player, _weaponsDialog); if (response.IsRightButtonOrDisconnected()) return; @@ -45,7 +47,7 @@ public async void ShowWeapons(Player player, IDialogService dialogService) { var message = Smart.Format(Messages.WeaponAlreadyExists, weaponSelectedFromDialog); player.SendClientMessage(Color.Red, message); - ShowWeapons(player, dialogService); + ShowWeapons(player); return; } @@ -55,11 +57,11 @@ public async void ShowWeapons(Player player, IDialogService dialogService) var message = Smart.Format(Messages.WeaponSuccessfullyAdded, weaponSelectedFromDialog); player.SendClientMessage(Color.Yellow, message); } - ShowWeapons(player, dialogService); + ShowWeapons(player); } [PlayerCommand("pack")] - public async void ShowWeaponPackage(Player player, IDialogService dialogService) + public async void ShowWeaponPackage(Player player) { var weaponSelection = player.GetComponent(); WeaponPack selectedWeapons = weaponSelection.SelectedWeapons; @@ -72,7 +74,7 @@ public async void ShowWeaponPackage(Player player, IDialogService dialogService) foreach (IWeapon weapon in selectedWeapons) dialog.Add(weapon.Name); - ListDialogResponse response = await dialogService.ShowAsync(player, dialog); + ListDialogResponse response = await _dialogService.ShowAsync(player, dialog); if (response.IsRightButtonOrDisconnected()) return; @@ -83,6 +85,6 @@ public async void ShowWeaponPackage(Player player, IDialogService dialogService) player.ResetWeapons(); foreach (IWeapon weapon in selectedWeapons) player.GiveWeapon(weapon.Id, IWeapon.UnlimitedAmmo); - ShowWeaponPackage(player, dialogService); + ShowWeaponPackage(player); } } From d0460aff5bcaa7aa90144f9298f096175ca926c1 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Thu, 19 Dec 2024 20:03:12 -0500 Subject: [PATCH 02/12] refactor: Move spawn validation logic to PlayerRequestSpawnMiddleware This change centralizes the spawn validation logic, ensuring that validations are performed before the 'OnPlayerRequestSpawn' event handlers are executed. --- src/Application/SampEcsBuilderExtensions.cs | 3 +- .../ClassSelection/ClassSelectionSystem.cs | 16 --------- .../PlayerRequestSpawnMiddleware.cs | 35 +++++++++++++++++++ 3 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs diff --git a/src/Application/SampEcsBuilderExtensions.cs b/src/Application/SampEcsBuilderExtensions.cs index 8a0471a6..ba71b3b1 100644 --- a/src/Application/SampEcsBuilderExtensions.cs +++ b/src/Application/SampEcsBuilderExtensions.cs @@ -5,7 +5,8 @@ public static class ApplicationEcsBuilderExtensions public static IEcsBuilder RegisterMiddlewares(this IEcsBuilder builder) { builder - .UseMiddleware(name: "OnPlayerCommandText"); + .UseMiddleware(name: "OnPlayerCommandText") + .UseMiddleware(name: "OnPlayerRequestSpawn"); return builder; } diff --git a/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs b/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs index 07df668a..01ff3fe0 100644 --- a/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs +++ b/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs @@ -57,23 +57,7 @@ public void OnPlayerRequestClass(Player player, int classId) [Event] public bool OnPlayerRequestSpawn(Player player) { - if (player.IsUnauthenticated()) - { - player.SendClientMessage(Color.Red, Messages.LoginOrRegisterToContinue); - return false; - } - if (mapRotationService.IsMapLoading()) - { - player.SendClientMessage(Color.Red, Messages.MapIsLoading); - return false; - } Team selectedTeam = player.Team == (int)TeamId.Alpha ? Team.Alpha : Team.Beta; - if (selectedTeam.IsFull()) - { - string gameText = selectedTeam.GetAvailabilityMessage(); - player.GameText(gameText, 999999999, 3); - return false; - } player.DisableClassSelection(); player.HideGameText(style: 3); player.GetInfo().SetTeam(selectedTeam.Id); diff --git a/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs b/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs new file mode 100644 index 00000000..d6710949 --- /dev/null +++ b/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs @@ -0,0 +1,35 @@ +namespace CTF.Application.Teams.ClassSelection; + +public class PlayerRequestSpawnMiddleware( + IEntityManager entityManager, + EventDelegate next, + MapRotationService mapRotationService) +{ + public object Invoke(EventContext context) + { + int playerId = (int)context.Arguments[0]; + EntityId entity = SampEntities.GetPlayerId(playerId); + Player player = entityManager.GetComponent(entity); + if (player.IsUnauthenticated()) + { + player.SendClientMessage(Color.Red, Messages.LoginOrRegisterToContinue); + return false; + } + + if (mapRotationService.IsMapLoading()) + { + player.SendClientMessage(Color.Red, Messages.MapIsLoading); + return false; + } + + Team selectedTeam = player.Team == (int)TeamId.Alpha ? Team.Alpha : Team.Beta; + if (selectedTeam.IsFull()) + { + string gameText = selectedTeam.GetAvailabilityMessage(); + player.GameText(gameText, 999999999, 3); + return false; + } + + return next(context); + } +} From 85952f20c3cfb77035dca9f1f8d88918fbc9e274 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Thu, 19 Dec 2024 20:12:57 -0500 Subject: [PATCH 03/12] feat: Show weapon menu when player spawns after class selection --- src/Application/Players/Weapons/WeaponSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Application/Players/Weapons/WeaponSystem.cs b/src/Application/Players/Weapons/WeaponSystem.cs index dadfc86a..98225b75 100644 --- a/src/Application/Players/Weapons/WeaponSystem.cs +++ b/src/Application/Players/Weapons/WeaponSystem.cs @@ -19,6 +19,12 @@ public void OnPlayerConnect(Player player) player.AddComponent(); } + [Event] + public void OnPlayerRequestSpawn(Player player) + { + ShowWeapons(player); + } + [Event] public void OnPlayerSpawn(Player player) { From 96bac07a141b24b8ff02a93ffd686a0fdff0f803 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 07:59:48 -0500 Subject: [PATCH 04/12] chore: update sample .env file --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 96a346a7..165b30b2 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ ServerInfo__HostName=[CTF] Capture The Flag | Team Deathmatch | [TDM] ServerInfo__LanguageText=English -ServerInfo__GameModeText=CTF/Team Deathmatch [v9.1] +ServerInfo__GameModeText=CTF/Team Deathmatch [v9] ServerInfo__MapName=RC_Battlefield ServerInfo__WebUrl=https://github.com/MrDave1999/Capture-The-Flag ServerInfo__IntroAudioUrl=https://od.lk/s/Nl8yMDg4MTc0NDBf/intro-cs.mp3 From 38b779006a5d5fc725f431561d62c7a0c872e861 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 08:04:02 -0500 Subject: [PATCH 05/12] docs: add XML comments to `Invoke` methods in middlewares --- src/Application/CommandLockMiddleware.cs | 8 ++++++++ .../Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Application/CommandLockMiddleware.cs b/src/Application/CommandLockMiddleware.cs index 09f4078b..00cec3fc 100644 --- a/src/Application/CommandLockMiddleware.cs +++ b/src/Application/CommandLockMiddleware.cs @@ -5,6 +5,14 @@ public class CommandLockMiddleware( EventDelegate next, MapRotationService mapRotationService) { + /// + /// Invokes the middleware logic to lock player commands if certain conditions are met. + /// + /// Contains context information about the fired event. + /// + /// if any condition is met to block the command. + /// Otherwise, it proceeds to the next middleware or action. + /// public object Invoke(EventContext context) { int playerId = (int)context.Arguments[0]; diff --git a/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs b/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs index d6710949..5dec6d58 100644 --- a/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs +++ b/src/Application/Teams/ClassSelection/PlayerRequestSpawnMiddleware.cs @@ -5,6 +5,14 @@ public class PlayerRequestSpawnMiddleware( EventDelegate next, MapRotationService mapRotationService) { + /// + /// Invokes the middleware logic to handle player spawn requests. + /// + /// Contains context information about the fired event. + /// + /// if any condition is met to prevent the player from spawning. + /// Otherwise, it proceeds to the next middleware or action. + /// public object Invoke(EventContext context) { int playerId = (int)context.Arguments[0]; From d6d62760a5736488c298a9d4263794ee095f373a Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 13:08:03 -0500 Subject: [PATCH 06/12] refactor: Rename type to PlayerCommandLockMiddleware --- ...{CommandLockMiddleware.cs => PlayerCommandLockMiddleware.cs} | 2 +- src/Application/SampEcsBuilderExtensions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/Application/{CommandLockMiddleware.cs => PlayerCommandLockMiddleware.cs} (96%) diff --git a/src/Application/CommandLockMiddleware.cs b/src/Application/PlayerCommandLockMiddleware.cs similarity index 96% rename from src/Application/CommandLockMiddleware.cs rename to src/Application/PlayerCommandLockMiddleware.cs index 00cec3fc..c540192b 100644 --- a/src/Application/CommandLockMiddleware.cs +++ b/src/Application/PlayerCommandLockMiddleware.cs @@ -1,6 +1,6 @@ namespace CTF.Application; -public class CommandLockMiddleware( +public class PlayerCommandLockMiddleware( IEntityManager entityManager, EventDelegate next, MapRotationService mapRotationService) diff --git a/src/Application/SampEcsBuilderExtensions.cs b/src/Application/SampEcsBuilderExtensions.cs index ba71b3b1..6c409f30 100644 --- a/src/Application/SampEcsBuilderExtensions.cs +++ b/src/Application/SampEcsBuilderExtensions.cs @@ -5,7 +5,7 @@ public static class ApplicationEcsBuilderExtensions public static IEcsBuilder RegisterMiddlewares(this IEcsBuilder builder) { builder - .UseMiddleware(name: "OnPlayerCommandText") + .UseMiddleware(name: "OnPlayerCommandText") .UseMiddleware(name: "OnPlayerRequestSpawn"); return builder; From 87267e597e6688d9574bec7e7f015d4c04cbf1f7 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 13:30:38 -0500 Subject: [PATCH 07/12] feat: Add keyboard shortcuts for /weapons and /pack commands * /weapons is now mapped to the 'Y' key * /pack is now mapped to the 'H' key --- src/Application/Players/Weapons/WeaponSystem.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Application/Players/Weapons/WeaponSystem.cs b/src/Application/Players/Weapons/WeaponSystem.cs index 98225b75..4ca9c28f 100644 --- a/src/Application/Players/Weapons/WeaponSystem.cs +++ b/src/Application/Players/Weapons/WeaponSystem.cs @@ -25,6 +25,19 @@ public void OnPlayerRequestSpawn(Player player) ShowWeapons(player); } + [Event] + public void OnPlayerKeyStateChange(Player player, Keys newKeys, Keys oldKeys) + { + if (KeyUtils.HasPressed(newKeys, oldKeys, Keys.Yes)) + { + ShowWeapons(player); + } + else if (KeyUtils.HasPressed(newKeys,oldKeys, Keys.CtrlBack)) + { + ShowWeaponPackage(player); + } + } + [Event] public void OnPlayerSpawn(Player player) { From 2ac05fb9897cb9c300bfa17d87422667e7ed6605 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 13:34:42 -0500 Subject: [PATCH 08/12] feat: Add keyboard shortcut for /combos command * /combos is now mapped to the 'NUM 4' key --- src/Application/Players/Combos/ComboSystem.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Application/Players/Combos/ComboSystem.cs b/src/Application/Players/Combos/ComboSystem.cs index 8f572c75..1557c98f 100644 --- a/src/Application/Players/Combos/ComboSystem.cs +++ b/src/Application/Players/Combos/ComboSystem.cs @@ -33,6 +33,15 @@ public ComboSystem( _tablistDialog.Add(combo.Name, combo.RequiredCoins.ToString()); } + [Event] + public void OnPlayerKeyStateChange(Player player, Keys newKeys, Keys oldKeys) + { + if (KeyUtils.HasPressed(newKeys, oldKeys, Keys.AnalogLeft)) + { + ShowCombos(player); + } + } + [PlayerCommand("combos")] public async void ShowCombos(Player player) { From c52597a090b150ad474dcf96ae381c36766964be Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 13:42:16 -0500 Subject: [PATCH 09/12] fix: Parameter 'mapRotationService' is unread --- src/Application/Teams/ClassSelection/ClassSelectionSystem.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs b/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs index 01ff3fe0..39aae5e6 100644 --- a/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs +++ b/src/Application/Teams/ClassSelection/ClassSelectionSystem.cs @@ -4,7 +4,6 @@ public class ClassSelectionSystem( IWorldService worldService, ClassSelectionTextDrawRenderer classSelectionTextDrawRenderer, TeamTextDrawRenderer teamTextDrawRenderer, - MapRotationService mapRotationService, ServerSettings serverSettings) : ISystem { [Event] From 5eeb2bc2777dfb102a37db6b4b582393c36c4d37 Mon Sep 17 00:00:00 2001 From: Dave Roman <43916038+MrDave1999@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:49:50 -0500 Subject: [PATCH 10/12] feat: Paginate the list of commands into two pages for better usability (#258) --- .../{ => Public}/PublicCommands.cs | 14 +------ .../GeneralCommands/Public/ShowCommands.cs | 41 +++++++++++++++++++ .../Resources/DetailedCommandInfo.Designer.cs | 22 ++++++++-- .../Resources/DetailedCommandInfo.resx | 22 ++++++---- 4 files changed, 75 insertions(+), 24 deletions(-) rename src/Application/Players/GeneralCommands/{ => Public}/PublicCommands.cs (92%) create mode 100644 src/Application/Players/GeneralCommands/Public/ShowCommands.cs diff --git a/src/Application/Players/GeneralCommands/PublicCommands.cs b/src/Application/Players/GeneralCommands/Public/PublicCommands.cs similarity index 92% rename from src/Application/Players/GeneralCommands/PublicCommands.cs rename to src/Application/Players/GeneralCommands/Public/PublicCommands.cs index 26a9ab73..e94a0bdd 100644 --- a/src/Application/Players/GeneralCommands/PublicCommands.cs +++ b/src/Application/Players/GeneralCommands/Public/PublicCommands.cs @@ -1,21 +1,9 @@ -namespace CTF.Application.Players.GeneralCommands; +namespace CTF.Application.Players.GeneralCommands.Public; public class PublicCommands( IEntityManager entityManager, IDialogService dialogService) : ISystem { - [PlayerCommand("cmds")] - public void ShowCommands(Player player) - { - var content = Smart.Format(DetailedCommandInfo.Public, new - { - Color1 = Color.Yellow, - Color2 = Color.White - }); - var dialog = new MessageDialog(caption: "Commands", content, "Close"); - dialogService.ShowAsync(player, dialog); - } - [PlayerCommand("help")] public void ShowHelp(Player player) { diff --git a/src/Application/Players/GeneralCommands/Public/ShowCommands.cs b/src/Application/Players/GeneralCommands/Public/ShowCommands.cs new file mode 100644 index 00000000..e6c1cba2 --- /dev/null +++ b/src/Application/Players/GeneralCommands/Public/ShowCommands.cs @@ -0,0 +1,41 @@ +namespace CTF.Application.Players.GeneralCommands.Public; + +public class ShowCommands(IDialogService dialogService) : ISystem +{ + [PlayerCommand("cmds")] + public async void ShowFirstDialog(Player player) + { + var content = Smart.Format(DetailedCommandInfo.Public1, new + { + Color1 = Color.Yellow, + Color2 = Color.White + }); + var firstDialog = new MessageDialog( + caption: "Commands [1/2]", + content, + button1: "Next", + button2: "Close" + ); + var response = await dialogService.ShowAsync(player, firstDialog); + if (response.Response == DialogResponse.LeftButton) + ShowNextDialog(player); + } + + private async void ShowNextDialog(Player player) + { + var content = Smart.Format(DetailedCommandInfo.Public2, new + { + Color1 = Color.Yellow, + Color2 = Color.White + }); + var nextDialog = new MessageDialog( + caption: "Commands [2/2]", + content, + button1: "Previous", + button2: "Close" + ); + var response = await dialogService.ShowAsync(player, nextDialog); + if (response.Response == DialogResponse.LeftButton) + ShowFirstDialog(player); + } +} diff --git a/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.Designer.cs b/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.Designer.cs index 8cfd61ff..c727c9f6 100644 --- a/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.Designer.cs +++ b/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.Designer.cs @@ -134,11 +134,27 @@ internal static string Moderator { ///{Color1}/mystats: {Color2}Display the statistics of the current player. ///{Color1}/stats: {Color2}Show the statistics of a specified player. ///{Color1}/tstats: {Color2}Display the statistics of the teams (Alpha and Beta). - ///{Color1}/topkills: {Color2}Display the list of top playe [rest of string was truncated]";. + ///{Color1}/changepass: {Color2}Change your account passwor [rest of string was truncated]";. /// - internal static string Public { + internal static string Public1 { get { - return ResourceManager.GetString("Public", resourceCulture); + return ResourceManager.GetString("Public1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {Color1}/topkills: {Color2}Display the list of top players based on their total number of kills. + ///{Color1}/topspree: {Color2}Display the list of top players based on their maximum killing spree. + ///{Color1}/team: {Color2}Switch to a different team. + ///{Color1}/kill: {Color2}Eliminate your character for respawn purposes. + ///{Color1}/re: {Color2}Reset the statistics of the current player. + ///{Color1}/admins: {Color2}List the current server administrators. + ///{Color1}/vips: {Color2}Display the list of VIP players. + ///{Col [rest of string was truncated]";. + /// + internal static string Public2 { + get { + return ResourceManager.GetString("Public2", resourceCulture); } } diff --git a/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.resx b/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.resx index fd88f4e2..c1301d20 100644 --- a/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.resx +++ b/src/Application/Players/GeneralCommands/Resources/DetailedCommandInfo.resx @@ -177,23 +177,32 @@ Beware! Enemies will see flag carriers on their radar as well! {Color1}Use the '&' symbol at the start of your message to access the private moderator chat. - + {Color1}/help: {Color2}Display an introduction to the Capture The Flag game mode. {Color1}/credits: {Color2}Show credits for the game and contributors. {Color1}/ranks: {Color2}List the different player ranks and their requirements. {Color1}/mystats: {Color2}Display the statistics of the current player. {Color1}/stats: {Color2}Show the statistics of a specified player. {Color1}/tstats: {Color2}Display the statistics of the teams (Alpha and Beta). -{Color1}/topkills: {Color2}Display the list of top players based on their total number of kills. -{Color1}/topspree: {Color2}Display the list of top players based on their maximum killing spree. {Color1}/changepass: {Color2}Change your account password. {Color1}/changename: {Color2}Change your account name. {Color1}/skin: {Color2}Change your character's skin. {Color1}/weapons: {Color2}Display a list of available weapons {Color1}/pack: {Color2}Display your current weapons package. {Color1}/combos: {Color2}Display a list of available combos and their benefits. -{Color1}/team: {Color2}Switch to a different team. {Color1}/scoreboard: {Color2}Show the current scoreboard with player scores. + +{Color1}Shortcuts: +{Color2}Use the '!' symbol at the start of your message to access the private team chat. +{Color2}Use the 'N' key to show the scoreboard with the players of both teams. +{Color2}Use the 'Y' key to show the weapons menu. +{Color2}Use the 'H' key to show your current weapons package. +{Color2}Use the 'NUM 4' key to show a list of available combos and their benefits. + + + {Color1}/topkills: {Color2}Display the list of top players based on their total number of kills. +{Color1}/topspree: {Color2}Display the list of top players based on their maximum killing spree. +{Color1}/team: {Color2}Switch to a different team. {Color1}/kill: {Color2}Eliminate your character for respawn purposes. {Color1}/re: {Color2}Reset the statistics of the current player. {Color1}/admins: {Color2}List the current server administrators. @@ -203,10 +212,7 @@ Beware! Enemies will see flag carriers on their radar as well! {Color1}/class: {Color2}Redirect to the class selection menu and enter AFK mode. {Color1}/cmdsvip: {Color2}Display a list of commands available to VIP players. {Color1}/cmdsadmin: {Color2}Show the commands accessible to server administrators. -{Color1}/cmdsmoderator: {Color2}Show the commands accessible to server moderators. - -{Color1}Use the '!' symbol at the start of your message to access the private team chat. -{Color1}Use the 'N' key to show the scoreboard with the players of both teams. +{Color1}/cmdsmoderator: {Color2}Show the commands accessible to server moderators. {Color1}/armour: {Color2}Grants you temporary armour, reducing damage taken from attacks. From a6bec65015cdc129414847f52467fd6b87c723ef Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 20:53:55 -0500 Subject: [PATCH 11/12] chore: Remove all dangling images --- .github/workflows/deploy-prod.yml | 3 ++- .github/workflows/deploy-test.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 06c8728e..1421e40e 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -21,4 +21,5 @@ jobs: git pull origin main git status sudo docker compose up --build -d - sudo docker builder prune -f \ No newline at end of file + sudo docker builder prune -f -a + sudo docker image prune -f -a \ No newline at end of file diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index d7d20487..b6c03385 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -21,4 +21,5 @@ jobs: git pull origin dev git status sudo docker compose up --build -d - sudo docker builder prune -f \ No newline at end of file + sudo docker builder prune -f -a + sudo docker image prune -f -a \ No newline at end of file From 6c62129633ca26fd61922bb30427e3d8a724bfa4 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Fri, 20 Dec 2024 21:01:51 -0500 Subject: [PATCH 12/12] chore: Retrieve the ssh port as a secret --- .github/workflows/deploy-prod.yml | 2 +- .github/workflows/deploy-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 1421e40e..298d58df 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -15,7 +15,7 @@ jobs: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} key: ${{ secrets.PRIVATE_KEY }} - port: 22 + port: ${{ secrets.PORT }} script: | cd ctf-prod git pull origin main diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index b6c03385..73647c52 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -15,7 +15,7 @@ jobs: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} key: ${{ secrets.PRIVATE_KEY }} - port: 22 + port: ${{ secrets.PORT }} script: | cd ctf-test git pull origin dev