From 5c8ff57d16448ffd8a805f29ecdf9485ab6ac9ff Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Fri, 17 May 2024 15:24:29 +0100 Subject: [PATCH] Changes as per comments on the PR --- src/app/components/AvailableModulesMenu.jsx | 2 +- src/app/components/StandardSlot.jsx | 1 + src/app/shipyard/ModuleUtils.js | 9 --------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/app/components/AvailableModulesMenu.jsx b/src/app/components/AvailableModulesMenu.jsx index 110953cd..3f2637c8 100644 --- a/src/app/components/AvailableModulesMenu.jsx +++ b/src/app/components/AvailableModulesMenu.jsx @@ -312,7 +312,7 @@ export default class AvailableModulesMenu extends TranslatedComponent { let itemsOnThisRow = 0; for (let i = 0; i < sortedModules.length; i++) { let m = sortedModules[i]; - if (ModuleUtils.isMissingModule(m.info)) { + if (m.grp == 'mh' || m.grp == 'mm') { // If this is a missing module, skip it continue; } diff --git a/src/app/components/StandardSlot.jsx b/src/app/components/StandardSlot.jsx index 70bb57ae..09819009 100644 --- a/src/app/components/StandardSlot.jsx +++ b/src/app/components/StandardSlot.jsx @@ -93,6 +93,7 @@ export default class StandardSlot extends TranslatedComponent { this._modificationsSelected = false; } + // If this is a missing module, therefore has the 'info' field, set the warning value on the module to be true when loaded. if (m.info) { warning = () => true; } diff --git a/src/app/shipyard/ModuleUtils.js b/src/app/shipyard/ModuleUtils.js index 209e24b7..276de3c1 100755 --- a/src/app/shipyard/ModuleUtils.js +++ b/src/app/shipyard/ModuleUtils.js @@ -322,15 +322,6 @@ export function isShieldGenerator(g) { return g == 'sg' || g == 'psg' || g == 'bsg'; } -/** - * Determine if a module group is a missing module - * @param {String} info Module Group name - * @return {Boolean} True if the group is a missing module - */ -export function isMissingModule(info) { - return info == 'Not in Coriolis yet. Check GitHub issues. Add Issue if needed.'; -} - /** * Creates a new ModuleSet that contains all available modules * that the specified ship is eligible to use.