aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut
blob: df336867337f1566850b68ef51f53ea69af84a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
	AddPrivateMatchModeSettingEnum( "#PL_sns", "sns_reset_pulse_blade_cooldown_on_pulse_blade_kill", [ "Disabled", "Enabled" ], "1"  )
	AddPrivateMatchModeSettingEnum( "#PL_sns", "sns_softball_enabled", [ "False", "True" ], "0"  )
	AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_softball_kill_value", "10" )
	AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_wme_kill_value", "10" )
	AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_offhand_kill_value", "10" )
	AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_reset_kill_value", "5" )
	AddPrivateMatchModeSettingArbitrary( "#PL_sns", "sns_melee_kill_value", "5" )
	

	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" )
}