aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut
diff options
context:
space:
mode:
authorWilliam Miller <william-millennium@hotmail.com>2024-06-28 15:10:45 -0300
committerGitHub <noreply@github.com>2024-06-28 20:10:45 +0200
commit6581c4e800e5cec0e4d6f5b3f87b80bd6989233c (patch)
treeee4b1825304312ac4ce24f1d1ee1ab077483159e /Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut
parent83e97763b3421e59d13e9a40bf20c0d987da9129 (diff)
downloadNorthstarMods-6581c4e800e5cec0e4d6f5b3f87b80bd6989233c.tar.gz
NorthstarMods-6581c4e800e5cec0e4d6f5b3f87b80bd6989233c.zip
Implement Match Goals menu and XP tracking (#756)v1.26.0-rc4v1.26.0
for vanilla parity when it comes to the progression system. See PR description for full details
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut15
1 files changed, 14 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut
index d36045a61..768bbde11 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut
@@ -180,6 +180,12 @@ void function MarkPlayers( entity imcMark, entity militiaMark )
entity livingMark = GetMarked( GetOtherTeam( deadMark.GetTeam() ) )
livingMark.SetPlayerGameStat( PGS_DEFENSE_SCORE, livingMark.GetPlayerGameStat( PGS_DEFENSE_SCORE ) + 1 )
+ if( !HasPlayerCompletedMeritScore( livingMark ) )
+ {
+ AddPlayerScore( livingMark, "ChallengeMFD" )
+ SetPlayerChallengeMeritScore( livingMark )
+ }
+
// thread this so we don't kill our own thread
thread AddTeamScore( livingMark.GetTeam(), 1 )
}
@@ -195,8 +201,15 @@ void function UpdateMarksForKill( entity victim, entity attacker, var damageInfo
MessageToAll( eEventNotifications.MarkedForDeathKill, null, victim, actualAttacker.GetEncodedEHandle() )
svGlobal.levelEnt.Signal( "MarkKilled", { mark = victim } )
-
+
if ( !isSuicide && attacker.IsPlayer() )
+ {
attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ if( !HasPlayerCompletedMeritScore( attacker ) )
+ {
+ AddPlayerScore( attacker, "ChallengeMFD" )
+ SetPlayerChallengeMeritScore( attacker )
+ }
+ }
}
} \ No newline at end of file