aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_utility_shared.nut28
1 files changed, 28 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_utility_shared.nut b/Northstar.CustomServers/mod/scripts/vscripts/_utility_shared.nut
index e3cb0dbf..c5887f2b 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_utility_shared.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_utility_shared.nut
@@ -1191,6 +1191,34 @@ int function GetGameState()
return expect int( GetServerVar( "gameState" ) )
}
+string function GameStateToString()
+{
+ switch ( GetGameState() )
+ {
+ case eGameState.WaitingForCustomStart:
+ return "WaitingForCustomStart"
+ case eGameState.WaitingForPlayers:
+ return "WaitingForPlayers"
+ case eGameState.PickLoadout:
+ return "PickLoadout"
+ case eGameState.Prematch:
+ return "Prematch"
+ case eGameState.Playing:
+ return "Playing"
+ case eGameState.SuddenDeath:
+ return "SuddenDeath"
+ case eGameState.SwitchingSides:
+ return "SwitchingSides"
+ case eGameState.WinnerDetermined:
+ return "WinnerDetermined"
+ case eGameState.Epilogue:
+ return "Epilogue"
+ case eGameState.Postmatch:
+ return "Postmatch"
+ }
+ unreachable
+}
+
bool function GamePlaying()
{
return GetGameState() == eGameState.Playing