From 50787dc7d7c244c178ea6b5dda04780ed05de320 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Wed, 18 Sep 2024 09:36:16 -0500 Subject: [PATCH] BREAKING CHANGE: Rename rotation methods to clarify timer functionality --- src/Application/Maps/Services/MapRotationService.cs | 4 ++-- src/Application/Maps/Systems/MapRotationSystem.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Application/Maps/Services/MapRotationService.cs b/src/Application/Maps/Services/MapRotationService.cs index 60edd480..166b0de1 100644 --- a/src/Application/Maps/Services/MapRotationService.cs +++ b/src/Application/Maps/Services/MapRotationService.cs @@ -43,12 +43,12 @@ public MapRotationService( _isMapLoading = false; } - public void StartRotation() + public void StartRotationTimer() { _timerReference ??= _timerService.Start(action: OnTimer, interval: TimeSpan.FromMilliseconds(1000)); } - public void StopRotation() + public void StopRotationTimer() { if (_timerReference is null) return; diff --git a/src/Application/Maps/Systems/MapRotationSystem.cs b/src/Application/Maps/Systems/MapRotationSystem.cs index 781a15dc..8a5840a4 100644 --- a/src/Application/Maps/Systems/MapRotationSystem.cs +++ b/src/Application/Maps/Systems/MapRotationSystem.cs @@ -16,7 +16,7 @@ public void OnPlayerSpawn(Player player) [Event] public void OnGameModeInit() { - mapRotationService.StartRotation(); + mapRotationService.StartRotationTimer(); } [PlayerCommand("startrt")] @@ -25,7 +25,7 @@ public void StartRotationTimer(Player player) if (player.HasLowerRoleThan(RoleId.Moderator)) return; - mapRotationService.StartRotation(); + mapRotationService.StartRotationTimer(); } [PlayerCommand("stoprt")] @@ -34,7 +34,7 @@ public void StopRotationTimer(Player player) if (player.HasLowerRoleThan(RoleId.Moderator)) return; - mapRotationService.StopRotation(); + mapRotationService.StopRotationTimer(); } [PlayerCommand("settimeleft")]