aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers
diff options
context:
space:
mode:
authorRoyalBlue1 <malte.hoermeyer@web.de>2022-07-18 17:35:48 +0200
committerRoyalBlue1 <malte.hoermeyer@web.de>2022-07-18 17:35:48 +0200
commit3e72be3a9e6ef9a37981ea501684c9c1651f6b78 (patch)
tree0e0b17c41cfb2a73afab847b0c717a40229c7668 /Northstar.CustomServers
parent6e97ffcb8ac1d2b3ab0b6af798a51a15ffd34db6 (diff)
downloadNorthstarMods-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.gnut12
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