From d1217439bdb7a69804e75f25f054979ff2511346 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Sun, 2 Jun 2024 11:02:52 +0100 Subject: [PATCH] Fixed autodeploy to do latest coriolis-data dist. Fixed sendToEDOMH function to only send the blueprint at the selected grade, not each grade up to that grade. --- .github/workflows/autodeploy.yml | 1 + src/app/components/ModalShoppingList.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autodeploy.yml b/.github/workflows/autodeploy.yml index 8f28cc84..1933a2e9 100644 --- a/.github/workflows/autodeploy.yml +++ b/.github/workflows/autodeploy.yml @@ -22,6 +22,7 @@ jobs: git clone https://github.com/alex-williams/coriolis-data.git --single-branch --branch alpha cd coriolis-data npm install + npm start cd ../coriolis npm install npm run build diff --git a/src/app/components/ModalShoppingList.jsx b/src/app/components/ModalShoppingList.jsx index 5900d8ce..c8c0b571 100644 --- a/src/app/components/ModalShoppingList.jsx +++ b/src/app/components/ModalShoppingList.jsx @@ -173,11 +173,12 @@ export default class ModalShoppingList extends TranslatedComponent { "blueprint": module.m.blueprint.special.edname }); } - for (const g in module.m.blueprint.grades) { + for (let g in module.m.blueprint.grades) { if (!module.m.blueprint.grades.hasOwnProperty(g)) { continue; } - if (g < module.m.blueprint.grade) { + // We only want the grade that the module is currently at, not every grade up to that point + if (Number(g) !== module.m.blueprint.grade) { continue; } let item = ""; @@ -200,11 +201,11 @@ export default class ModalShoppingList extends TranslatedComponent { item = ship.id + "_Armour_Reactive"; break; } - console.log(item); } else { item = module.m.symbol; } + console.log(module.m) blueprints.push({ "item": item,