fix engagement range slider and armour integrity

hopefully
This commit is contained in:
willyb321
2017-12-19 16:13:30 +11:00
parent ba2e46f88f
commit 1a1d539c60
2 changed files with 5 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ export default class EngagementRange extends TranslatedComponent {
const { ship } = props;
const maxRange = this._calcMaxRange(ship);
const maxRange = Math.round(this._calcMaxRange(ship));
this.state = {
maxRange

View File

@@ -303,7 +303,8 @@ export function shipFromJson(json) {
*/
function _addModifications(module, modifiers, blueprint, grade, specialModifications) {
if (!modifiers) return;
console.log(module);
console.log(modifiers);
let special;
if (specialModifications) {
special = Modifications.specials[Object.keys(specialModifications)[0]]
@@ -333,10 +334,9 @@ function _addModifications(module, modifiers, blueprint, grade, specialModificat
let value;
if (i === 'OutfittingFieldType_DefenceModifierShieldMultiplier') {
value = modifiers[i].value - 1;
} else if (i === 'OutfittingFieldType_DefenceModifierHealthMultiplier' && blueprint === 'Armour_Thermic') {
//TODO: fix the hull strength. not sure whats wrong with it.
} else if (i === 'OutfittingFieldType_DefenceModifierHealthMultiplier' && blueprint.startsWith('Armour_')) {
value = (modifiers[i].value - module.hullboost) / module.hullboost;
} else if (i === 'OutfittingFieldType_DefenceModifierHealthMultiplier') {
} else if (i === 'OutfittingFieldType_DefenceModifierHealthMultiplier') {
value = modifiers[i].value / module.hullboost;
} else if (i === 'OutfittingFieldType_RateOfFire') {
value = (1 / Math.abs(modifiers[i].value));