Update waste calculation
This commit is contained in:
@@ -263,9 +263,9 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut, Mu
|
||||
cycleTime = cycleParams.averageTime
|
||||
yield_ = sum([getter(d) for d in self.MINING_ATTRIBUTES]) * self.amountActive
|
||||
yps = yield_ / (cycleTime / 1000.0)
|
||||
wasteChance = max(0, min(1, self.getModifiedItemAttr("miningWasteProbability")))
|
||||
wasteChance = max(0, min(100, self.getModifiedItemAttr("miningWasteProbability")))
|
||||
wasteMult = self.getModifiedItemAttr("miningWastedVolumeMultiplier")
|
||||
wps = yps * wasteChance * wasteMult
|
||||
wps = yps * (wasteChance / 100) * wasteMult
|
||||
return yps, wps
|
||||
else:
|
||||
return 0, 0
|
||||
|
||||
@@ -443,8 +443,8 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut, M
|
||||
if self.charge is not None:
|
||||
wasteChance += self.getModifiedChargeAttr("specializationCrystalMiningWasteProbabilityBonus", 0)
|
||||
wasteMult *= self.getModifiedChargeAttr("specializationCrystalMiningWastedVolumeMultiplierBonus", 1)
|
||||
wasteChance = max(0, min(1, wasteChance))
|
||||
wps = yps * wasteChance * wasteMult
|
||||
wasteChance = max(0, min(100, wasteChance))
|
||||
wps = yps * (wasteChance / 100) * wasteMult
|
||||
return yps, wps
|
||||
|
||||
def isDealingDamage(self, ignoreState=False):
|
||||
|
||||
Reference in New Issue
Block a user