aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut44
1 files changed, 44 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut
new file mode 100644
index 00000000..78357d20
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hidden.nut
@@ -0,0 +1,44 @@
+global function Sh_GamemodeHidden_Init
+
+global const string GAMEMODE_HIDDEN = "hidden"
+
+void function Sh_GamemodeHidden_Init()
+{
+ // create custom gamemode
+ AddCallback_OnCustomGamemodesInit( CreateGamemodeHidden )
+ AddCallback_OnRegisteringCustomNetworkVars( HiddenRegisterNetworkVars )
+}
+
+void function CreateGamemodeHidden()
+{
+ GameMode_Create( GAMEMODE_HIDDEN )
+ GameMode_SetName( GAMEMODE_HIDDEN, "#GAMEMODE_HIDDEN" )
+ GameMode_SetDesc( GAMEMODE_HIDDEN, "#PL_hidden_desc" )
+ GameMode_SetGameModeAnnouncement( GAMEMODE_HIDDEN, "ffa_modeDesc" )
+ GameMode_SetDefaultTimeLimits( GAMEMODE_HIDDEN, 5, 0.0 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_HIDDEN, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_HIDDEN, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 )
+ GameMode_SetColor( GAMEMODE_HIDDEN, [147, 204, 57, 255] )
+
+ AddPrivateMatchMode( GAMEMODE_HIDDEN ) // add to private lobby modes
+
+ #if SERVER
+ GameMode_AddServerInit( GAMEMODE_HIDDEN, GamemodeHidden_Init )
+ GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_HIDDEN, RateSpawnpoints_Generic )
+ GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_HIDDEN, RateSpawnpoints_Generic )
+ #elseif CLIENT
+ GameMode_AddClientInit( GAMEMODE_HIDDEN, ClGamemodeHidden_Init )
+ #endif
+ #if !UI
+ GameMode_SetScoreCompareFunc( GAMEMODE_HIDDEN, CompareAssaultScore )
+ #endif
+}
+
+void function HiddenRegisterNetworkVars()
+{
+ if ( GAMETYPE != GAMEMODE_HIDDEN )
+ return
+
+ Remote_RegisterFunction( "ServerCallback_YouAreHidden" )
+ Remote_RegisterFunction( "ServerCallback_AnnounceHidden" )
+}