diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-15 00:41:45 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-15 00:41:45 +0000 |
commit | 3f7c13c0df67d1e80ffafa65f9fb6d87c38f4653 (patch) | |
tree | 86c154287f2fa858a2f9a07e7c49fec08a555c9d /Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut | |
parent | 4f53db798e049fd55219a6a3ec3157568cac6828 (diff) | |
parent | 9d346f8c96cbfad841c82eaefa437015c9bf4ce4 (diff) | |
download | NorthstarMods-3f7c13c0df67d1e80ffafa65f9fb6d87c38f4653.tar.gz NorthstarMods-3f7c13c0df67d1e80ffafa65f9fb6d87c38f4653.zip |
Merge branch 'main' of https://github.com/R2Northstar/NorthstarMods
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut new file mode 100644 index 000000000..b3d2c2da3 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut @@ -0,0 +1,51 @@ +globalize_all_functions + +global array<var> consoleVars; +global const string GAMEMODE_SNS = "sns" + +void function SNSMode_Init() +{ + AddCallback_OnCustomGamemodesInit( CreateGamemodeSNS ) + AddCallback_OnRegisteringCustomNetworkVars( SNSRegisterNetworkVars ) +} + + +void function CreateGamemodeSNS() +{ + GameMode_Create( GAMEMODE_SNS ) + GameMode_SetName( GAMEMODE_SNS, "#GAMEMODE_SNS" ) + GameMode_SetDesc( GAMEMODE_SNS, "#PL_sns_desc" ) + GameMode_SetGameModeAnnouncement( GAMEMODE_SNS, "ffa_modeDesc" ) + GameMode_SetDefaultTimeLimits( GAMEMODE_SNS, 15, 0.0 ) + GameMode_AddScoreboardColumnData( GAMEMODE_SNS, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 ) + GameMode_AddScoreboardColumnData( GAMEMODE_SNS, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 ) + GameMode_AddScoreboardColumnData( GAMEMODE_SNS, "#SCOREBOARD_BANKRUPTS", PGS_TITAN_KILLS, 2 ) + GameMode_SetColor( GAMEMODE_SNS, [147, 204, 57, 255] ) + + AddPrivateMatchMode( GAMEMODE_SNS ) // add to private lobby modes + + GameMode_SetDefaultScoreLimits( GAMEMODE_SNS, 300, 0 ) + + #if SERVER + GameMode_AddServerInit( GAMEMODE_SNS, SNS_Init ) + GameMode_AddServerInit( GAMEMODE_SNS, GamemodeFFAShared_Init ) + GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_SNS, RateSpawnpoints_Generic ) + GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_SNS, RateSpawnpoints_Generic ) + #elseif CLIENT + GameMode_AddClientInit( GAMEMODE_SNS, ClGameModeSNS_Init ) + GameMode_AddClientInit( GAMEMODE_SNS, GamemodeFFAShared_Init ) + GameMode_AddClientInit( GAMEMODE_SNS, ClGamemodeFFA_Init ) + #endif + #if !UI + GameMode_SetScoreCompareFunc( GAMEMODE_SNS, CompareAssaultScore ) + GameMode_AddSharedInit( GAMEMODE_SNS, GamemodeFFA_Dialogue_Init ) + #endif +} + +void function SNSRegisterNetworkVars() +{ + if ( GAMETYPE != GAMEMODE_SNS ) + return + Remote_RegisterFunction( "ServerCallback_AnnounceBankrupt" ) + Remote_RegisterFunction( "ServerCallback_AnnounceKillLeaderBankrupt" ) +}
\ No newline at end of file |