diff options
author | RoyalBlue1 <malte.hoermeyer@web.de> | 2022-07-18 17:35:48 +0200 |
---|---|---|
committer | RoyalBlue1 <malte.hoermeyer@web.de> | 2022-07-18 17:35:48 +0200 |
commit | 3e72be3a9e6ef9a37981ea501684c9c1651f6b78 (patch) | |
tree | 0e0b17c41cfb2a73afab847b0c717a40229c7668 /Northstar.CustomServers | |
parent | 6e97ffcb8ac1d2b3ab0b6af798a51a15ffd34db6 (diff) | |
download | NorthstarMods-3e72be3a9e6ef9a37981ea501684c9c1651f6b78.tar.gz NorthstarMods-3e72be3a9e6ef9a37981ea501684c9c1651f6b78.zip |
Revert BurnMeter_getLimitedRewardCount changes
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut index afa8ff3d..7ff4bcf8 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut @@ -83,10 +83,16 @@ void function BurnMeter_SetBoostRewardCount( string burnRef, int rewardCount ) file.boostRewardCount[burnRef] <- rewardCount
}
-int function BurnMeter_GetLimitedRewardCount( entity player )
+int function BurnMeter_GetLimitedRewardCount( entity player, string burnRef = "" )
{
- EarnObject earnObject = PlayerEarnMeter_GetReward( player )
- string burnRef = earnObject.ref
+ // 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
+ }
+
int limit = -1
int rewardCount = 1
|