aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-31 23:14:58 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-31 23:14:58 +0100
commit9a96d0bff56f1969c68bb52a2f33296095bdc67d (patch)
tree4175928e488632705692e3cccafa1a38dd854615 /Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut
parent27bd240871b7c0f2f49fef137718b2e3c208e3b4 (diff)
downloadNorthstarMods-9a96d0bff56f1969c68bb52a2f33296095bdc67d.tar.gz
NorthstarMods-9a96d0bff56f1969c68bb52a2f33296095bdc67d.zip
move to new mod format
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut47
1 files changed, 47 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut
new file mode 100644
index 000000000..2462d5376
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_fastball.gnut
@@ -0,0 +1,47 @@
+global function Sh_GamemodeFastball_Init
+
+global const string GAMEMODE_FASTBALL = "fastball"
+
+void function Sh_GamemodeFastball_Init()
+{
+ // create custom gamemode
+ AddCallback_OnCustomGamemodesInit( CreateGamemodeFastball )
+ AddCallback_OnRegisteringCustomNetworkVars( FastballRegisterNetworkVars )
+}
+
+void function CreateGamemodeFastball()
+{
+ GameMode_Create( GAMEMODE_FASTBALL )
+ GameMode_SetName( GAMEMODE_FASTBALL, "#GAMEMODE_FASTBALL" )
+ GameMode_SetDesc( GAMEMODE_FASTBALL, "#PL_fastball_desc" )
+ GameMode_SetGameModeAnnouncement( GAMEMODE_FASTBALL, "grnc_modeDesc" )
+ GameMode_SetDefaultTimeLimits( GAMEMODE_FASTBALL, 1, 0 )
+ GameMode_SetDefaultScoreLimits( GAMEMODE_FASTBALL, 5, 0 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_FASTBALL, "#SCOREBOARD_FASTBALL_HACKS", PGS_ASSAULT_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_FASTBALL, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_FASTBALL, "#SCOREBOARD_DEATHS", PGS_DEATHS, 2 )
+ GameMode_SetColor( GAMEMODE_FASTBALL, [147, 204, 57, 255] )
+
+ AddPrivateMatchMode( GAMEMODE_FASTBALL ) // add to private lobby modes
+
+ #if SERVER
+ GameMode_AddServerInit( GAMEMODE_FASTBALL, GamemodeFastball_Init )
+ GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_FASTBALL, RateSpawnpoints_Generic )
+ GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_FASTBALL, RateSpawnpoints_Generic )
+ #elseif CLIENT
+ GameMode_AddClientInit( GAMEMODE_FASTBALL, ClGamemodeFastball_Init )
+ #endif
+ #if !UI
+ GameMode_SetScoreCompareFunc( GAMEMODE_FASTBALL, CompareAssaultScore )
+ #endif
+}
+
+void function FastballRegisterNetworkVars()
+{
+ if ( GAMETYPE != GAMEMODE_FASTBALL )
+ return
+
+ Remote_RegisterFunction( "ServerCallback_FastballUpdatePanelRui" )
+ Remote_RegisterFunction( "ServerCallback_FastballPanelHacked" )
+ Remote_RegisterFunction( "ServerCallback_FastballRespawnPlayer" )
+} \ No newline at end of file