aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod.json12
-rw-r--r--Northstar.Custom/mod/resource/northstar_custom_portuguese.txt138
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut23
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut32
4 files changed, 130 insertions, 75 deletions
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index 23132642b..7b2ad50d7 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -344,6 +344,18 @@
"ServerCallback": {
"After": "DisallowedWeapons_Init"
}
+ },
+
+ {
+ "Path": "sh_custom_pilot_collision.gnut",
+ "RunOn": "( CLIENT || SERVER ) && MP",
+ "ClientCallback": {
+ "After": "CustomPilotCollision_InitPlaylistVars"
+ },
+
+ "ServerCallback": {
+ "After": "CustomPilotCollision_InitPlaylistVars"
+ }
}
],
diff --git a/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt b/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt
index 62835f52c..f3446f13a 100644
--- a/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt
+++ b/Northstar.Custom/mod/resource/northstar_custom_portuguese.txt
@@ -1,69 +1,69 @@
-"lang"
-{
- "Language" "portuguese"
- "Tokens"
- {
- "PL_sbox" "Sandbox"
- "PL_sbox_lobby" "Saguão de Sandbox"
- "PL_sbox_desc" "gmod só que pior"
- "PL_sbox_abbr" "SBOX"
- "GAMEMODE_SBOX" "Sandbox"
-
- "PL_gg" "Gun Game"
- "PL_gg_lobby" "Saguão de Gun Game"
- "PL_gg_desc" "Mate com todas as armas para vencer"
- "PL_gg_abbr" "GG"
- "GAMEMODE_GG" "Gun Game"
-
- "PL_tt" "Titan Tag"
- "PL_tt_lobby" "Saguão de Titan Tag"
- "PL_tt_desc" "Ganhe pontos com seu titã. Destrua um para chamar o seu."
- "PL_tt_abbr" "TT"
- "GAMEMODE_TT" "Titan Tag"
-
- "PL_inf" "Infecção"
- "PL_inf_lobby" "Saguão de Infecção"
- "PL_inf_desc" "Sobreviva à infecção. Sobreviventes são infectados quando mortos."
- "PL_inf_abbr" "INF"
- "GAMEMODE_INF" "Infecção"
- "INFECTION_YOU_ARE_INFECTED" "Você foi infectado!"
- "INFECTION_KILL_SURVIVORS" "Infecte todos os sobreviventes restantes."
- "INFECTION_FIRST_INFECTED" "%s1 é o paciente zero."
- "INFECTION_LAST_SURVIVOR" "%s1 é o último sobrevivente!"
- "INFECTION_KILL_LAST_SURVIVOR" "Infecte eles antes que o tempo acabe!"
- "INFECTION_YOU_ARE_LAST_SURVIVOR" "Você é o último sobrevivente!"
- "INFECTION_SURVIVE_LAST_SURVIVOR" "Sobreviva."
-
- // these are defined in r1_english but titan war is a shit name so i'm changing it to another one that was referenced in development
- "GAMEMODE_fw" "Guerra pela Fronteira"
- "PL_fw" "Guerra pela Fronteira"
- "PL_fw_lobby" "Saguão de Guerra pela Fronteira"
- "PL_fw_desc" "Destrua a colheitadeira do inimigo e proteja a sua"
- "PL_fw_abbr" "FW"
-
- "GAMEMODE_kr" "Corrida de Matança"
- "PL_kr" "Corrida de Matança"
- "PL_kr_lobby" "Saguão de Matança"
- "PL_kr_desc" "Acabe com inimigos para aumentar sua matança. Capture a bandeira para começar. Vença matando mais."
- "PL_kr_abbr" "KR"
- "SCOREBOARD_KR_RECORD" "Recorde de mortes"
- "KR_NEW_RACER" "%s1 é o matador"
- "KR_YOU_ARE_NEW_RACER" "Você é o matador"
- "KR_YOU_SET_NEW_RECORD" "Bateu o recorde!"
- "KR_FLAG_INCOMING" "Bandeira reaparecerá em breve"
- "KR_COLLECT_FLAG" "Capture a bandeira para virar um Matador!"
- "KR_ENEMY_KILLRACE_OVER" "A matança de %s1 acabou"
- "KR_YOUR_KILLRACE_OVER" "Sua matança acabou"
- "KR_YOUR_KILLRACE_SCORE" "Você conseguiu %s1 mortes."
-
- "GAMEMODE_fastball" "Fastball"
- "PL_fastball" "Fastball"
- "PL_fastball_lobby" "Fastball Lobby"
- "PL_fastball_desc" "Sem reaparecimento. Invada painéis de controle para ganhar rounds e reaparecer seus aliados."
- "PL_fastball_abbr" "FB"
- "FASTBALL_PANEL_CAPTURED" "%s1 capturou painel %s2"
- "SCOREBOARD_FASTBALL_HACKS" "Painéis capturados"
-
- "GAMEMODE_ctf_comp" "CTF Competitivo"
- }
-}
+"lang"
+{
+ "Language" "portuguese"
+ "Tokens"
+ {
+ "PL_sbox" "Sandbox"
+ "PL_sbox_lobby" "Saguão de Sandbox"
+ "PL_sbox_desc" "gmod só que pior"
+ "PL_sbox_abbr" "SBOX"
+ "GAMEMODE_SBOX" "Sandbox"
+
+ "PL_gg" "Gun Game"
+ "PL_gg_lobby" "Saguão de Gun Game"
+ "PL_gg_desc" "Mate com todas as armas para vencer"
+ "PL_gg_abbr" "GG"
+ "GAMEMODE_GG" "Gun Game"
+
+ "PL_tt" "Titan Tag"
+ "PL_tt_lobby" "Saguão de Titan Tag"
+ "PL_tt_desc" "Ganhe pontos com seu titã. Destrua um para chamar o seu."
+ "PL_tt_abbr" "TT"
+ "GAMEMODE_TT" "Titan Tag"
+
+ "PL_inf" "Infecção"
+ "PL_inf_lobby" "Saguão de Infecção"
+ "PL_inf_desc" "Sobreviva à infecção. Sobreviventes são infectados quando mortos."
+ "PL_inf_abbr" "INF"
+ "GAMEMODE_INF" "Infecção"
+ "INFECTION_YOU_ARE_INFECTED" "Você foi infectado!"
+ "INFECTION_KILL_SURVIVORS" "Infecte todos os sobreviventes restantes."
+ "INFECTION_FIRST_INFECTED" "%s1 é o paciente zero."
+ "INFECTION_LAST_SURVIVOR" "%s1 é o último sobrevivente!"
+ "INFECTION_KILL_LAST_SURVIVOR" "Infecte eles antes que o tempo acabe!"
+ "INFECTION_YOU_ARE_LAST_SURVIVOR" "Você é o último sobrevivente!"
+ "INFECTION_SURVIVE_LAST_SURVIVOR" "Sobreviva."
+
+ // these are defined in r1_english but titan war is a shit name so i'm changing it to another one that was referenced in development
+ "GAMEMODE_fw" "Guerra pela Fronteira"
+ "PL_fw" "Guerra pela Fronteira"
+ "PL_fw_lobby" "Saguão de Guerra pela Fronteira"
+ "PL_fw_desc" "Destrua a colheitadeira do inimigo e proteja a sua"
+ "PL_fw_abbr" "FW"
+
+ "GAMEMODE_kr" "Corrida de Matança"
+ "PL_kr" "Corrida de Matança"
+ "PL_kr_lobby" "Saguão de Matança"
+ "PL_kr_desc" "Acabe com inimigos para aumentar sua matança. Capture a bandeira para começar. Vença matando mais."
+ "PL_kr_abbr" "KR"
+ "SCOREBOARD_KR_RECORD" "Recorde de mortes"
+ "KR_NEW_RACER" "%s1 é o matador"
+ "KR_YOU_ARE_NEW_RACER" "Você é o matador"
+ "KR_YOU_SET_NEW_RECORD" "Bateu o recorde!"
+ "KR_FLAG_INCOMING" "Bandeira reaparecerá em breve"
+ "KR_COLLECT_FLAG" "Capture a bandeira para virar um Matador!"
+ "KR_ENEMY_KILLRACE_OVER" "A matança de %s1 acabou"
+ "KR_YOUR_KILLRACE_OVER" "Sua matança acabou"
+ "KR_YOUR_KILLRACE_SCORE" "Você conseguiu %s1 mortes."
+
+ "GAMEMODE_fastball" "Fastball"
+ "PL_fastball" "Fastball"
+ "PL_fastball_lobby" "Fastball Lobby"
+ "PL_fastball_desc" "Sem reaparecimento. Invada painéis de controle para ganhar rounds e reaparecer seus aliados."
+ "PL_fastball_abbr" "FB"
+ "FASTBALL_PANEL_CAPTURED" "%s1 capturou painel %s2"
+ "SCOREBOARD_FASTBALL_HACKS" "Painéis capturados"
+
+ "GAMEMODE_ctf_comp" "CTF Competitivo"
+ }
+}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
index a0e0b7431..2ccd46ba2 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
@@ -30,7 +30,7 @@ void function InfectionInitPlayer( entity player )
if ( GetGameState() < eGameState.Playing )
SetTeam( player, INFECTION_TEAM_SURVIVOR )
else
- InfectPlayer( player )
+ InfectPlayer( player, player )
}
void function SelectFirstInfected()
@@ -45,23 +45,23 @@ void function SelectFirstInfectedDelayed()
array<entity> players = GetPlayerArray()
entity infected = players[ RandomInt( players.len() ) ]
- InfectPlayer( infected )
+ InfectPlayer( infected, infected )
RespawnInfected( infected )
}
void function InfectionOnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
- if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing )
+ if ( !victim.IsPlayer() || !attacker.IsPlayer() || GetGameState() != eGameState.Playing )
return
if ( victim.GetTeam() == INFECTION_TEAM_SURVIVOR )
- InfectPlayer( victim )
+ InfectPlayer( victim, attacker )
if ( attacker.IsPlayer() )
attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
}
-void function InfectPlayer( entity player )
+void function InfectPlayer( entity player, entity attacker )
{
SetTeam( player, INFECTION_TEAM_INFECTED )
player.SetPlayerGameStat( PGS_ASSAULT_SCORE, 0 ) // reset kills
@@ -70,7 +70,12 @@ void function InfectPlayer( entity player )
// check how many survivors there are
array<entity> survivors = GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR )
if ( survivors.len() == 0 )
+ {
+ SetRespawnsEnabled( false )
+ SetKillcamsEnabled( false )
+ SetRoundWinningKillReplayAttacker(attacker)
SetWinner( INFECTION_TEAM_INFECTED )
+ }
else if ( survivors.len() == 1 && !file.hasHadLastInfection )
SetLastSurvivor( survivors[ 0 ] )
@@ -183,8 +188,14 @@ void function SetLastSurvivor( entity player )
int function TimeoutCheckSurvivors()
{
- if ( GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR ).len() > 0 )
+ array<entity> survivors = GetPlayerArrayOfTeam( INFECTION_TEAM_SURVIVOR )
+ if ( survivors.len() > 0 )
+ {
+ SetRespawnsEnabled( false )
+ SetKillcamsEnabled( false )
+ SetRoundWinningKillReplayAttacker(survivors[ 0 ])
return INFECTION_TEAM_SURVIVOR
+ }
return INFECTION_TEAM_INFECTED
}
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut
new file mode 100644
index 000000000..b33a4c024
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/sh_custom_pilot_collision.gnut
@@ -0,0 +1,32 @@
+global function CustomPilotCollision_InitPlaylistVars
+
+void function CustomPilotCollision_InitPlaylistVars()
+{
+ AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_PILOT", "no_pilot_collision", [ "#SETTING_DISABLED", "#SETTING_ENABLED" ], "0" )
+
+#if SERVER
+ AddCallback_OnPlayerRespawned( SetPilotCollisionFlagsForRespawn )
+ AddCallback_OnPilotBecomesTitan( PilotCollisionOnPilotBecomesTitan )
+ AddCallback_OnTitanBecomesPilot( PilotCollisionOnTitanBecomesPilot )
+#endif
+}
+
+#if SERVER
+void function SetPilotCollisionFlagsForRespawn( entity player )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_BLOCK_WEAPONS
+}
+
+void function PilotCollisionOnPilotBecomesTitan( entity player, entity titan )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_PLAYER
+}
+
+void function PilotCollisionOnTitanBecomesPilot( entity player, entity titan )
+{
+ if ( GetCurrentPlaylistVarInt( "no_pilot_collision", 0 ) == 1 )
+ player.kv.CollisionGroup = TRACE_COLLISION_GROUP_BLOCK_WEAPONS
+}
+#endif \ No newline at end of file