diff --git a/package.json b/package.json index e8a748f8..c15ae150 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coriolis_shipyard", - "version": "2.9.5", + "version": "2.9.6", "repository": { "type": "git", "url": "https://github.com/EDCD/coriolis" diff --git a/src/app/utils/BlueprintFunctions.js b/src/app/utils/BlueprintFunctions.js index d69fe33b..878c2af6 100644 --- a/src/app/utils/BlueprintFunctions.js +++ b/src/app/utils/BlueprintFunctions.js @@ -262,7 +262,7 @@ export function setPercent(ship, m, percent) { ship.clearModifications(m); const features = m.blueprint.grades[m.blueprint.grade].features; for (const featureName in features) { - const value = features[featureName][0]; + const value = features[featureName][1]; const featureIsBeneficial = isBeneficial(featureName, features[featureName]); if (featureIsBeneficial === true) { _setValue(ship, m, featureName, (percent / 100) * value); diff --git a/src/app/utils/CompanionApiUtils.js b/src/app/utils/CompanionApiUtils.js index 78fe0be4..4f6d86e0 100644 --- a/src/app/utils/CompanionApiUtils.js +++ b/src/app/utils/CompanionApiUtils.js @@ -148,15 +148,15 @@ export function shipFromJson(json) { // Add the bulkheads const armourJson = json.modules.Armour.module; - if (armourJson.name.endsWith('_Armour_Grade1')) { + if (armourJson.name.toLowerCase().endsWith('_armour_grade1')) { ship.useBulkhead(0, true); - } else if (armourJson.name.endsWith('_Armour_Grade2')) { + } else if (armourJson.name.toLowerCase().endsWith('_armour_grade2')) { ship.useBulkhead(1, true); - } else if (armourJson.name.endsWith('_Armour_Grade3')) { + } else if (armourJson.name.toLowerCase().endsWith('_armour_grade3')) { ship.useBulkhead(2, true); - } else if (armourJson.name.endsWith('_Armour_Mirrored')) { + } else if (armourJson.name.toLowerCase().endsWith('_armour_mirrored')) { ship.useBulkhead(3, true); - } else if (armourJson.name.endsWith('_Armour_Reactive')) { + } else if (armourJson.name.toLowerCase().endsWith('_armour_reactive')) { ship.useBulkhead(4, true); } else { throw 'Unknown bulkheads "' + armourJson.name + '"';