mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 14:33:22 +00:00
fix engagement range slider and armour integrity
hopefully
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user