diff --git a/ChangeLog.md b/ChangeLog.md index bdca7dd9..c469a2e1 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,7 @@ * Fix detailed export of module reinforcement packages * Use damagedist for exact breakdown of weapons that have more than one type of damage * Use new-style modification validity data + * Provide ability to select engineering blueprint and roll sample values for them #2.2.9 * Use SSL-enabled server for shortlinks diff --git a/__tests__/fixtures/anaconda-test-detailed-export-v4.json b/__tests__/fixtures/anaconda-test-detailed-export-v4.json index 12327c14..402c67f2 100644 --- a/__tests__/fixtures/anaconda-test-detailed-export-v4.json +++ b/__tests__/fixtures/anaconda-test-detailed-export-v4.json @@ -269,20 +269,20 @@ "topSpeed": 187.01, "totalCost": 882362058, "totalDpe": 142.68, - "totalDps": 101.13, + "totalDps": 103.8, "totalEps": 22.71, "totalHps": 677.29, "totalExplDpe": 0, "totalExplDps": 0, "totalExplSDps": 0, "totalHps": 33.62, - "totalKinDpe": 116.29, - "totalKinDps": 16.01, - "totalKinSDps": 12.09, - "totalSDps": 89.99, - "totalThermDpe": 20.44, - "totalThermDps": 53.82, - "totalThermSDps": 53.82, + "totalKinDpe": 117.48, + "totalKinDps": 24.94, + "totalKinSDps": 18.76, + "totalSDps": 91.84, + "totalThermDpe": 21.63, + "totalThermDps": 60.08, + "totalThermSDps": 58.64, "baseShieldStrength": 350, "baseArmour": 945, "hullExplRes": 0.22, diff --git a/__tests__/test-import.js b/__tests__/test-import.js index a6a44dc6..42d6fe06 100644 --- a/__tests__/test-import.js +++ b/__tests__/test-import.js @@ -238,7 +238,7 @@ describe('Import Modal', function() { expect(modal.state.singleBuild).toBe(true); clickProceed(); expect(MockRouter.go.mock.calls.length).toBe(1); - expect(MockRouter.go.mock.calls[0][0]).toBe('/outfit/federal_corvette?code=A2putsFklndzsxf50x0x7l28281919040404040402020l06p05sf63c5ifr--v66g2f.AwRj4zNaqA%3D%3D.CwRgDBldUExuBiIlUA%3D%3D.H4sIAAAAAAAAA02SO0sDQRSFbxJ389jgJOsaN%2FGVmPXVKKRQC8FSA9oJWihWWgV%2FgIWFYBNb8RcIWiiIYiF2NqksIqaRoD%2FBQghB41zPFVa3OdzZ890zM3snpBeI6DsEyZgGkbpg5tg2lhzWGbEikN6aSVS0HSL3Ogxo6IvZmdbM9hFsjuickGgn%2B8SGv%2FvJ7DpxIqeCHjb0vJ80GrWIxu5RFmqARnYQEj%2FrMCdesFQzSOeYXvPP1BmGZPeiREa9xWyW0WifwnFX0MMJve4Hd5IQo4I9TcclGrxCUmoO34qVDaK%2BJuiJfD6%2FytZ%2Fj%2FGQAL7fD%2Fyiy8fbcNQdjsXJAFn9DRbyQchZIS9RqZJcGpckt4xjsdKL%2FtndJYjVQJkW8URUVYJTAegLat0IJOKJqCeB0gHoQ6BHgUQ8EdUNZvgghj3tAPmKa1vPQhIqTyp1KHE9AWgKV7Ka8NMinoiywLCrV%2F5Gvolo61ySpMn7xMdwsc3cf4w48w2Is40fwFld9oPzLbyL6CT88QaWoZpMcyDg32Jo0br4EaxDJXk8BT3o%2B7ktGS9B3GU8puS7zJh%2FAHGMT2qjAgAA&bn=Imported%20Federal%20Corvette'); + expect(MockRouter.go.mock.calls[0][0]).toBe('/outfit/federal_corvette?code=A2putsFklndzsxf50x0x7l28281919040404040402020l06p05sf63c5ifr--v66g2f.AwRj4zNaqA%3D%3D.CwRgDBldUExuBiIlUA%3D%3D.H4sIAAAAAAAAA02Svy9DURTHT1vvtfoat32eekVV9fm1kBgwSIw0YWYgBqmpMZkMBomFVfwFEoZKhBjE1qWTgegiDX%2BCQdKI1j2%2BR%2FJ4yzfnvu%2FnfO%2B979yQXiCi7xAkbRpEqsLMsRKWHNZpsSKQnppJVLAdIvc6DGiwxexMaWb7GDZHdJ%2BQaCf71Ia%2F88XsOp1EThk9bOh5P2kkahGN3qPM1wANbyOk87zNHH%2FBUs0gnWN61T9TOwfJ7EWJjMcms1lEo30Gx11BD8f1mh%2FcTkCMMvY0HZcoe4Wk5By%2BFcrrRL0N0OOlrd0Ntv57jGoc%2BH4%2F8EqHj3%2FCUXc4FicC5NFvsJBVIWeFvESlpuXSuCS5RRyLlV70z%2B4uQaw6ypSIJ6KOJDgZgFpQ60YgEU9EPQmUCkAfAj0IJOKJqC4wuYMY9rQD5CuubT0LSag8qdShxHUHoElcyWrAT4l4IsoCw65e%2BRv5BqKtC0mSJu8LH8OFT%2Bb%2BE8SZb0CcEn4AZ3TRDx5q4l1EJ%2BCP1bEM1WSaAwH%2FFkOLPoofwTo0LY8nr7O%2B37cp4yWIu4zHlHiXGfMPmat5gqMCAAA%3D&bn=Imported%20Federal%20Corvette'); }); it('imports a valid v4 build', function() { diff --git a/src/app/components/ModificationsMenu.jsx b/src/app/components/ModificationsMenu.jsx index 794dd644..76bf5218 100644 --- a/src/app/components/ModificationsMenu.jsx +++ b/src/app/components/ModificationsMenu.jsx @@ -117,7 +117,7 @@ export default class ModificationsMenu extends TranslatedComponent { let value = features[featureName][0]; if (m.grp == 'sb' && featureName == 'shieldboost') { // Shield boosters are a special case. Their boost is dependent on their base so we need to calculate the value here - value = ((1 + m.shieldboost)*(1 + value) - 1) / m.shieldboost - 1 + value = ((1 + m.shieldboost) * (1 + value) - 1) / m.shieldboost - 1; } if (Modifications.modifications[featureName].type == 'percentage') { @@ -145,7 +145,7 @@ export default class ModificationsMenu extends TranslatedComponent { let value = features[featureName][0] + (Math.random() * (features[featureName][1] - features[featureName][0])); if (m.grp == 'sb' && featureName == 'shieldboost') { // Shield boosters are a special case. Their boost is dependent on their base so we need to calculate the value here - value = ((1 + m.shieldboost)*(1 + value) - 1) / m.shieldboost - 1 + value = ((1 + m.shieldboost) * (1 + value) - 1) / m.shieldboost - 1; } if (Modifications.modifications[featureName].type == 'percentage') { @@ -168,12 +168,12 @@ export default class ModificationsMenu extends TranslatedComponent { const features = m.blueprint.features[m.blueprint.grade]; for (const featureName in features) { if (Modifications.modifications[featureName].method == 'overwrite') { - ship.setModification(m, featureName, features[featureName][1]); + ship.setModification(m, featureName, features[featureName][1]); } else { let value = features[featureName][1]; if (m.grp == 'sb' && featureName == 'shieldboost') { // Shield boosters are a special case. Their boost is dependent on their base so we need to calculate the value here - value = ((1 + m.shieldboost)*(1 + value) - 1) / m.shieldboost - 1 + value = ((1 + m.shieldboost) * (1 + value) - 1) / m.shieldboost - 1; } if (Modifications.modifications[featureName].type == 'percentage') {