diff options
author | zxcPandora <81985226+zxcPandora@users.noreply.github.com> | 2022-02-05 06:04:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 19:04:04 -0300 |
commit | 74064c469b18067bb6693b3f27e9955fc3a1d17e (patch) | |
tree | 7b98c3311a046d39e46212abc358398141d3db8f /Northstar.CustomServers/mod/scripts | |
parent | c778b07874bbc44fa9ab2a164eaf952d7b78296f (diff) | |
download | NorthstarMods-74064c469b18067bb6693b3f27e9955fc3a1d17e.tar.gz NorthstarMods-74064c469b18067bb6693b3f27e9955fc3a1d17e.zip |
Print private match settings update (#154)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut index 388f4794..c56e537a 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut @@ -40,9 +40,13 @@ bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array<str if ( GetConVarBool( "ns_private_match_only_host_can_start" ) ) if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) return true + + PlayerChangedTheGame( player , " changed the game state." , args ) if ( file.startState == ePrivateMatchStartState.STARTING ) { + PlayerChangedTheGame( player , " canceled the game countdown." , args ) + // cancel start if we're already mid-countdown file.startState = ePrivateMatchStartState.READY SetUIVar( level, "privatematch_starting", ePrivateMatchStartState.READY ) @@ -50,6 +54,8 @@ bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array<str } else { + PlayerChangedTheGame( player , " started the game countdown." , args ) + // start match file.startState = ePrivateMatchStartState.STARTING thread StartMatch() @@ -70,6 +76,8 @@ bool function ClientCommandCallback_PrivateMatchSetMode( entity player, array<st if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) return true + PlayerChangedTheGame( player , " changed the mode to " , args ) + // todo: need to verify this value file.mode = args[0] //GameRules_SetGameMode( args[0] ) // can't do this here due to out of sync errors with new clients @@ -92,6 +100,8 @@ bool function ClientCommandCallback_SetCustomMap( entity player, array<string> a if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) return true + PlayerChangedTheGame( player , " changed the map to " , args ) + // todo: need to verify this value file.map = args[0] @@ -206,7 +216,9 @@ bool function ClientCommandCallback_PrivateMatchSetPlaylistVarOverride( entity p if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 ) if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) return true - + + PlayerChangedTheGame( player , " override the setting " , args ) + bool found = false foreach ( string category in GetPrivateMatchSettingCategories() ) { @@ -231,7 +243,21 @@ bool function ClientCommandCallback_ResetMatchSettingsToDefault( entity player, if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 ) if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) return true + + PlayerChangedTheGame( player , " reset to default" , args ) ClearPlaylistVarOverrides() return true +} + +void function PlayerChangedTheGame( entity player , string step , array<string> args ){ + if( step.find( "mode" ) || step.find( "map" )){ + print( player.GetPlayerName() + step + args[ 0 ] + ".---" + "UID:" +player.GetUID() ) + } + else if(step.find("setting")){ + print( player.GetPlayerName() + step + args[ 0 ] + " to "+ args[ 1 ] + ".---" + "UID:" +player.GetUID() ) + } + else{ + print( player.GetPlayerName() + step + ".---" + "UID:" + player.GetUID()) + } }
\ No newline at end of file |