diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-10-14 21:01:40 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-10-14 21:01:40 +0100 |
commit | 9a2778eabc7ba968968e41dda9f03525d6c5383d (patch) | |
tree | 6d1c5dc64754d542d68a7f47742a701a4eec9308 /Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hs.gnut | |
parent | c0a0c7e502f2bc99185d79a485b965f63de7a203 (diff) | |
download | NorthstarMods-9a2778eabc7ba968968e41dda9f03525d6c5383d.tar.gz NorthstarMods-9a2778eabc7ba968968e41dda9f03525d6c5383d.zip |
oh fuck i forgot to commit for a while
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hs.gnut')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hs.gnut | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hs.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hs.gnut new file mode 100644 index 00000000..f4269ac4 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_hs.gnut @@ -0,0 +1,47 @@ +global function Sh_GamemodeHideAndSeek_Init + +global const string GAMEMODE_HIDEANDSEEK = "hs" +global const int HIDEANDSEEK_TEAM_SEEKER = TEAM_IMC +global const int HIDEANDSEEK_TEAM_HIDER = TEAM_MILITIA + +void function Sh_GamemodeHideAndSeek_Init() +{ + // create custom gamemode + AddCallback_OnCustomGamemodesInit( CreateGamemodeHideAndSeek ) + AddCallback_OnRegisteringCustomNetworkVars( HideAndSeekRegisterNetworkVars ) +} + +void function CreateGamemodeHideAndSeek() +{ + GameMode_Create( GAMEMODE_HIDEANDSEEK ) + GameMode_SetName( GAMEMODE_HIDEANDSEEK, "#GAMEMODE_hs" ) + GameMode_SetDesc( GAMEMODE_HIDEANDSEEK, "#PL_hs_desc" ) + GameMode_SetGameModeAnnouncement( GAMEMODE_HIDEANDSEEK, "ffa_modeDesc" ) + GameMode_SetColor( GAMEMODE_HIDEANDSEEK, [147, 204, 57, 255] ) + + AddPrivateMatchMode( GAMEMODE_HIDEANDSEEK ) // add to private lobby modes + AddPrivateMatchModeSettingEnum( "#GAMEMODE_hs", "hideandseek_balance_teams", [ "Disabled", "Enabled" ], "1" ) + AddPrivateMatchModeSettingArbitrary( "#GAMEMODE_hs", "hideandseek_hiding_time", "60" ) + + #if SERVER + GameMode_AddServerInit( GAMEMODE_HIDEANDSEEK, GamemodeHideAndSeek_Init ) + GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_HIDEANDSEEK, RateSpawnpoints_Generic ) + GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_HIDEANDSEEK, RateSpawnpoints_Generic ) + #elseif CLIENT + GameMode_AddClientInit( GAMEMODE_HIDEANDSEEK, ClGamemodeHideAndSeek_Init ) + #endif + #if !UI + GameMode_SetScoreCompareFunc( GAMEMODE_HIDEANDSEEK, CompareAssaultScore ) + #endif +} + +void function HideAndSeekRegisterNetworkVars() +{ + if ( GAMETYPE != GAMEMODE_HIDEANDSEEK ) + return + + Remote_RegisterFunction( "ServerCallback_ShowHideAndSeekCountdown" ) + Remote_RegisterFunction( "ServerCallback_SeekersIncoming" ) + Remote_RegisterFunction( "ServerCallback_LastHiderAlive" ) + Remote_RegisterFunction( "ServerCallback_AnnounceHideAndSeekRole" ) +}
\ No newline at end of file |