aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut27
1 files changed, 15 insertions, 12 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
index 56750352..107a3f7f 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
@@ -67,6 +67,7 @@ void function BurnMeter_Init()
AddCallback_OnClientConnected( InitBurncardsForLateJoiner )
AddCallback_OnPlayerRespawned( StartPhaseRewindLifetime )
+ AddCallback_OnPlayerRespawned( InitialisePermenantAmpedWeaponsForPlayer )
AddCallback_OnTitanBecomesPilot( RemoveAmpedWeaponsForTitanPilot )
// necessary signals
@@ -84,16 +85,10 @@ void function BurnMeter_SetBoostRewardCount( string burnRef, int rewardCount )
file.boostRewardCount[burnRef] <- rewardCount
}
-int function BurnMeter_GetLimitedRewardCount( entity player, string burnRef = "" )
+int function BurnMeter_GetLimitedRewardCount( entity player )
{
- // added burnRef as a parameter, used for dice roll
- // means we dont call two lots of BurnReward_GetRandom() whilst also being able to give multiple items per dice roll (ticks)
- if (burnRef == "")
- {
- EarnObject earnObject = PlayerEarnMeter_GetReward( player )
- burnRef = earnObject.ref
- }
-
+ EarnObject earnObject = PlayerEarnMeter_GetReward( player )
+ string burnRef = earnObject.ref
int limit = -1
int rewardCount = 1
@@ -347,9 +342,10 @@ void function PlayerUsesAmpedWeaponsBurncardThreaded( entity player )
void function RemoveAmpedWeaponsForTitanPilot( entity player, entity titan )
{
- foreach ( entity weapon in player.GetMainWeapons() )
- foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) )
- weapon.RemoveMod( mod )
+ if ( !( "hasPermenantAmpedWeapons" in player.s ) || !player.s.hasPermenantAmpedWeapons )
+ foreach ( entity weapon in player.GetMainWeapons() )
+ foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) )
+ weapon.RemoveMod( mod )
}
void function PlayerUsesSmartPistolBurncard( entity player )
@@ -570,8 +566,15 @@ void function PlayerUsesNukeBurncardThreaded( entity player )
thread TitanEjectPlayer( titan, true )
}
+void function InitialisePermenantAmpedWeaponsForPlayer( entity player )
+{
+ player.s.hasPermenantAmpedWeapons <- false
+}
+
void function PlayerUsesPermanentAmpedWeaponsBurncard( entity player )
{
+ player.s.hasPermenantAmpedWeapons = true
+
array<entity> weapons = player.GetMainWeapons()
//weapons.extend( player.GetOffhandWeapons() ) // idk? unsure of vanilla behaviour here
foreach ( entity weapon in weapons )