diff --git a/ChangeLog.md b/ChangeLog.md index 445ed16d..54920061 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,7 @@ * Add effective total shield value to defence summary * Fix issue where new module added to a slot did not reset its enabled status * Show integrity value for relevant modules + * Reset old modification values when a new roll is applied #2.2.19 * Power management panel now displays modules in descending order of power usage by default diff --git a/src/app/components/ModificationsMenu.jsx b/src/app/components/ModificationsMenu.jsx index 0b25479b..ee961d29 100644 --- a/src/app/components/ModificationsMenu.jsx +++ b/src/app/components/ModificationsMenu.jsx @@ -174,6 +174,7 @@ export default class ModificationsMenu extends TranslatedComponent { */ _rollWorst() { const { m, ship } = this.props; + ship.clearModifications(m); const features = m.blueprint.grades[m.blueprint.grade].features; for (const featureName in features) { let value = features[featureName][0]; @@ -188,6 +189,7 @@ export default class ModificationsMenu extends TranslatedComponent { */ _rollRandom() { const { m, ship } = this.props; + ship.clearModifications(m); const features = m.blueprint.grades[m.blueprint.grade].features; for (const featureName in features) { let value = features[featureName][0] + (Math.random() * (features[featureName][1] - features[featureName][0])); @@ -216,6 +218,7 @@ export default class ModificationsMenu extends TranslatedComponent { */ _rollExtreme() { const { m, ship } = this.props; + ship.clearModifications(m); const features = m.blueprint.grades[m.blueprint.grade].features; for (const featureName in features) { let value;