mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
Take base hull reinforcement resistances in to account when calculating modifiers
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
* Show integrity value for relevant modules
|
* Show integrity value for relevant modules
|
||||||
* Reset old modification values when a new roll is applied
|
* Reset old modification values when a new roll is applied
|
||||||
* Ensure that boost value is set correctly when modifications to power distributor enable/disable boost
|
* Ensure that boost value is set correctly when modifications to power distributor enable/disable boost
|
||||||
|
* Ensure that hull reinforcement modifications take the inherent resistance in to account when calculating modification percentages
|
||||||
|
|
||||||
#2.2.19
|
#2.2.19
|
||||||
* Power management panel now displays modules in descending order of power usage by default
|
* Power management panel now displays modules in descending order of power usage by default
|
||||||
|
|||||||
@@ -384,15 +384,16 @@ function _addModifications(module, modifiers, blueprint, grade) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hull reinforcement package resistance is actually a damage modifier, so needs to be inverted.
|
// 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.grp === 'hr') {
|
||||||
if (module.getModValue('explres')) {
|
if (module.getModValue('explres')) {
|
||||||
module.setModValue('explres', ((module.getModValue('explres') / 10000) * -1) * 10000);
|
module.setModValue('explres', ((1 - (1 - module.explres) * (1 + module.getModValue('explres') / 10000)) - module.explres) * 10000);
|
||||||
}
|
}
|
||||||
if (module.getModValue('kinres')) {
|
if (module.getModValue('kinres')) {
|
||||||
module.setModValue('kinres', ((module.getModValue('kinres') / 10000) * -1) * 10000);
|
module.setModValue('kinres', ((1 - (1 - module.kinres) * (1 + module.getModValue('kinres') / 10000)) - module.kinres) * 10000);
|
||||||
}
|
}
|
||||||
if (module.getModValue('thermres')) {
|
if (module.getModValue('thermres')) {
|
||||||
module.setModValue('thermres', ((module.getModValue('thermres') / 10000) * -1) * 10000);
|
module.setModValue('thermres', ((1 - (1 - module.thermres) * (1 + module.getModValue('thermres') / 10000)) - module.thermres) * 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user