Fix game states

This commit is contained in:
TDSTOS
2025-12-11 19:47:25 +01:00
parent 31c1e6e316
commit 05e0e2dcf9
6 changed files with 7 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ abstract class GameState(
) {
private var tickTask: TaskRegistration? = null
var remainingSeconds: Int = durationSeconds ?: 0
private var remainingSeconds: Int = durationSeconds ?: 0
private var isActive: Boolean = false
open fun onEnter(

View File

@@ -28,7 +28,7 @@ class BattleState(
{
val win = checkForWinners()
when( remainingSeconds )
when( getRemainingSeconds() )
{
300 ->
{

View File

@@ -27,7 +27,7 @@ class DeathmatchState(
{
checkForWinners()
when( remainingSeconds )
when( getRemainingSeconds() )
{
0 ->
{

View File

@@ -49,7 +49,7 @@ class FeastState(
override fun onTick()
{
when( remainingSeconds )
when( getRemainingSeconds() )
{
300 -> announce( AnnouncementType.MINUTES, 5 )
240 -> announce( AnnouncementType.MINUTES, 4 )

View File

@@ -48,7 +48,7 @@ class ImmunityState(
override fun onTick()
{
when( remainingSeconds )
when( getRemainingSeconds() )
{
180 -> announce( AnnouncementType.MINUTES, 3 )
120 -> announce( AnnouncementType.MINUTES, 2 )

View File

@@ -42,10 +42,10 @@ class PreStartState(
if ( !isStarting )
return
if ( remainingSeconds == 15 )
if ( getRemainingSeconds() == 15 )
teleport()
when( remainingSeconds )
when( getRemainingSeconds() )
{
300 -> announce( AnnouncementType.MINUTES, 5 )
240 -> announce( AnnouncementType.MINUTES, 4 )