Addes Car Battery support for Spindown dice results

This commit is contained in:
Wofsauge committed 2021-06-13 23:18:22 +02:00
1 parent d2bf2bc4b9
commit 5e89828980
1 file changed
+8
+8
View File
@@ -70,8 +70,13 @@ local game = Game()
local function SpindownDiceCallback(descObj)
EID:appendToDescription(descObj, "#{{Collectible723}} :")
local refID = descObj.ObjSubType
local hasCarBattery = EID.player:HasCollectible(CollectibleType.COLLECTIBLE_CAR_BATTERY)
for i = 1,EID.Config["SpindownDiceResults"] do
local spinnedID = EID:getSpindownResult(refID)
if hasCarBattery then
refID = spinnedID
spinnedID = EID:getSpindownResult(refID)
end
refID = spinnedID
if spinnedID > 0 then
EID:appendToDescription(descObj, "{{Collectible"..spinnedID.."}}")
@@ -84,6 +89,9 @@ local game = Game()
break
end
end
if hasCarBattery then
EID:appendToDescription(descObj, " (Results with {{Collectible356}})")
end
return descObj
end
EID:addDescriptionModifier("Spindown Dice", SpindownDiceCondition, SpindownDiceCallback)