Changes as per comments on the PR

This commit is contained in:
Alex Williams
2024-05-17 15:24:29 +01:00
parent 14ffa26ef9
commit 5c8ff57d16
3 changed files with 2 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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.