mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Reset old modification values when a new roll is applied
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user