diff options
author | ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2022-05-03 22:30:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 23:30:30 +0200 |
commit | 080f68ee8779ade26492b3f7b1be872528dcad8a (patch) | |
tree | 12970ff746ed0ca2326dc3ac50d52758266fa99e /Northstar.CustomServers/mod/scripts/vscripts/burnmeter | |
parent | d6c7badc4b89700b2f763328a1b8e903fb4cc5c1 (diff) | |
download | NorthstarMods-080f68ee8779ade26492b3f7b1be872528dcad8a.tar.gz NorthstarMods-080f68ee8779ade26492b3f7b1be872528dcad8a.zip |
Fixed dice roll only giving one tick (again) (#313)
* added second parameter to BurnMeter_GetLimitedRewardCount
* fixed some weird shit happening
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/burnmeter')
-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 e2ca9917..056f0313 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut @@ -82,10 +82,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
|