From 64c5d542e9d7a1da0724d9fe243d5c0bd32410ea Mon Sep 17 00:00:00 2001 From: willyb321 Date: Sun, 17 Dec 2017 12:27:04 +1100 Subject: [PATCH] more work on mods --- src/app/utils/CompanionApiUtils.js | 32 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/app/utils/CompanionApiUtils.js b/src/app/utils/CompanionApiUtils.js index d0ad793e..7df9de23 100644 --- a/src/app/utils/CompanionApiUtils.js +++ b/src/app/utils/CompanionApiUtils.js @@ -342,7 +342,6 @@ function _addModifications(module, modifiers, blueprint, grade, specialModificat } // Carry out the required changes for (const action in modifierActions) { - console.log(action); if (isNaN(modifierActions[action])) { module.setModValue(action, modifierActions[action]); } else { @@ -352,7 +351,6 @@ function _addModifications(module, modifiers, blueprint, grade, specialModificat mod = 0; } module.setModValue(action, ((1 + mod) * (1 + actionValue) - 1) * 10000); - // Bulkhead boost is based off the inherent boost of the module } } } @@ -394,21 +392,7 @@ function _addModifications(module, modifiers, blueprint, grade, specialModificat // Shield generator resistance is actually a damage modifier, so needs to be inverted. // In addition, the modification is based off the inherent resistance of the module - // if (ModuleUtils.isShieldGenerator(module.grp)) { - // if (module.getModValue('explres')) { - // module.setModValue('explres', ((1 - (1 - module.explres) * (1 + module.getModValue('explres') / 10000)) - module.explres) * 10000); - // } - // if (module.getModValue('kinres')) { - // module.setModValue('kinres', ((1 - (1 - module.kinres) * (1 + module.getModValue('kinres') / 10000)) - module.kinres) * 10000); - // } - // if (module.getModValue('thermres')) { - // module.setModValue('thermres', ((1 - (1 - module.thermres) * (1 + module.getModValue('thermres') / 10000)) - module.thermres) * 10000); - // } - // } - - // Hull reinforcement package resistance is actually a damage modifier, so needs to be inverted. - // In addition, the modification is based off the inherent resistance of the module - if (module.grp === 'hr') { + if (ModuleUtils.isShieldGenerator(module.grp)) { if (module.getModValue('explres')) { module.setModValue('explres', ((1 - (1 - module.explres) * (1 + module.getModValue('explres') / 10000)) - module.explres) * 10000); } @@ -420,6 +404,20 @@ function _addModifications(module, modifiers, blueprint, grade, specialModificat } } + // Hull reinforcement package resistance is actually a damage modifier, so needs to be inverted. + // In addition, the modification is based off the inherent resistance of the module + // if (module.grp === 'hr') { + // if (module.getModValue('explres')) { + // module.setModValue('explres', ((1 - (1 - module.explres) * (1 + module.getModValue('explres') / 10000)) - module.explres) * 10000); + // } + // if (module.getModValue('kinres')) { + // module.setModValue('kinres', ((1 - (1 - module.kinres) * (1 + module.getModValue('kinres') / 10000)) - module.kinres) * 10000); + // } + // if (module.getModValue('thermres')) { + // module.setModValue('thermres', ((1 - (1 - module.thermres) * (1 + module.getModValue('thermres') / 10000)) - module.thermres) * 10000); + // } + // } + // Bulkhead resistance is actually a damage modifier, so needs to be inverted. // In addition, the modification is based off the inherent resistance of the module if (module.grp == 'bh') {