diff options
author | Coopyy <pat.pvp.unturned@gmail.com> | 2022-01-13 18:21:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 21:21:21 -0300 |
commit | 0ed0ef8308b33cec72056a05ef7611645fde44a7 (patch) | |
tree | b62e77df00e1a16e344e4eafc252ff955ac46949 /Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut | |
parent | 16d0d693bbd5cdd3331daa0052f1eaeb8205a961 (diff) | |
download | NorthstarMods-0ed0ef8308b33cec72056a05ef7611645fde44a7.tar.gz NorthstarMods-0ed0ef8308b33cec72056a05ef7611645fde44a7.zip |
Add Gamemode: Sticks & Stones (#107)
* added Sticks and Stones
Co-authored-by: Barichello <artur@barichello.me>
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut new file mode 100644 index 00000000..f91c4255 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut @@ -0,0 +1,55 @@ +global function ClGameModeSNS_Init +global function ServerCallback_AnnounceKillLeaderBankrupt +global function ServerCallback_AnnounceBankrupt + +void function ClGameModeSNS_Init() +{ + ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_ffa.rpak" ) + + // add music for mode, this is copied directly from the ffa/fra music registered in cl_music.gnut + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_MILITIA ) + + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC ) + RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA ) + AddCallback_GameStateEnter( eGameState.Postmatch, DisplayPostMatchTop3 ) +} + +void function ServerCallback_AnnounceKillLeaderBankrupt( int leaderEHandle, int killerEHandle ) +{ + entity player = GetEntityFromEncodedEHandle( leaderEHandle ) + entity killer = GetEntityFromEncodedEHandle( killerEHandle ) + AnnouncementData announcement = Announcement_Create( "#SNS_LEADER_BANKRUPT" ) + Announcement_SetSubText( announcement, Localize( "#SNS_LEADER_BANKRUPT_SUB", player.GetPlayerName(), killer.GetPlayerName())) + Announcement_SetTitleColor( announcement, <1,1,0> ) + Announcement_SetPurge( announcement, true ) + Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc + Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK ) + Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK ) + AnnouncementFromClass( GetLocalViewPlayer(), announcement ) +} + +void function ServerCallback_AnnounceBankrupt(int killerEHandle) +{ + entity killer = GetEntityFromEncodedEHandle( killerEHandle ) + AnnouncementData announcement = Announcement_Create( "#SNS_BANKRUPT" ) + Announcement_SetSubText( announcement, Localize( "#SNS_BANKRUPT_SUB", killer.GetPlayerName() )) + Announcement_SetTitleColor( announcement, <1,0,0> ) + Announcement_SetPurge( announcement, true ) + Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc + Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK ) + Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK ) + AnnouncementFromClass( GetLocalViewPlayer(), announcement ) +}
\ No newline at end of file |