From ea3d57399cda0e5dc19842a3d153f9ee63ee36dd Mon Sep 17 00:00:00 2001
From: Cmdr McDonald
Date: Tue, 21 Feb 2017 16:27:09 +0000
Subject: [PATCH] Tidy up available modules layout
---
ChangeLog.md | 1 +
package.json | 2 +-
src/app/components/AvailableModulesMenu.jsx | 6 +++++-
src/app/i18n/en.js | 2 ++
src/less/select.less | 9 ---------
5 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/ChangeLog.md b/ChangeLog.md
index a35d018b..de78613e 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -2,6 +2,7 @@
* Change methodology for calculating explorer role; can result in lighter builds
* Tidy up layout for module selection and lay everything out in a consistent best-to-worst for both class and grade
* Make integrity for module reinforcement packages visible
+ * Clean up breakpoints for modules in available modules list; stops 7- or 8- module long lines
#2.2.17
* Use in-game terminology for shield generator optmul and optmass items
diff --git a/package.json b/package.json
index 67ab2a88..12359301 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coriolis_shipyard",
- "version": "2.2.17",
+ "version": "2.2.18b",
"repository": {
"type": "git",
"url": "https://github.com/EDCD/coriolis"
diff --git a/src/app/components/AvailableModulesMenu.jsx b/src/app/components/AvailableModulesMenu.jsx
index 9485eac3..a1e93235 100644
--- a/src/app/components/AvailableModulesMenu.jsx
+++ b/src/app/components/AvailableModulesMenu.jsx
@@ -207,6 +207,8 @@ export default class AvailableModulesMenu extends TranslatedComponent {
const tmp = sortedModules.map((v, i) => v['class']).reduce((count, cls) => { count[cls] = ++count[cls] || 1; return count; }, {});
const itemsPerClass = Math.max.apply(null, Object.keys(tmp).map(key => tmp[key]));
+ let itemsOnThisRow = 0;
+
for (let i = 0; i < sortedModules.length; i++) {
let m = sortedModules[i];
let mount = null;
@@ -240,8 +242,9 @@ export default class AvailableModulesMenu extends TranslatedComponent {
case 'T': mount = ; break;
}
- if (i > 0 && sortedModules.length > 3 && itemsPerClass > 2 && m.class != prevClass && (m.rating != prevRating || m.mount)) {
+ if (itemsOnThisRow == 6 || i > 0 && sortedModules.length > 3 && itemsPerClass > 2 && m.class != prevClass && (m.rating != prevRating || m.mount)) {
elems.push(
);
+ itemsOnThisRow = 0;
}
elems.push(
@@ -250,6 +253,7 @@ export default class AvailableModulesMenu extends TranslatedComponent {
{(mount ? ' ' : '') + m.class + m.rating + (m.missile ? '/' + m.missile : '') + (m.name ? ' ' + translate(m.name) : '')}
);
+ itemsOnThisRow++;
prevClass = m.class;
prevRating = m.rating;
}
diff --git a/src/app/i18n/en.js b/src/app/i18n/en.js
index dc04c526..9e6d636b 100644
--- a/src/app/i18n/en.js
+++ b/src/app/i18n/en.js
@@ -212,6 +212,8 @@ Once you have a working companion API connection go to the 'Shipyard'
Note that Internet Explorer and Edge might not import correctly, due to their internal restrictions on URL length. If you find that this is the case then please change your default browser to Chrome.
+Also, the imported information does not provide any data on the power priority or enabled status of your cargo hatch. Coriolis sets this item to have a power priority of "5" and to be disabled by default. You can change this after import in the Power Management section.
+
Importing Your Ship From EDMC
To import your ship from EDMC once your connection to the Frontier servers' companion API is working go to 'Settings ->Configuration' and set the 'Preferred Shipyard' to 'Coriolis'. Once this is set up clicking on your ship in the main window will open your default web browser in Coriolis with the ship's build.
diff --git a/src/less/select.less b/src/less/select.less
index 8169a6a8..c32c55ca 100755
--- a/src/less/select.less
+++ b/src/less/select.less
@@ -158,15 +158,6 @@ select {
width: 4.5em;
padding: 0.1em 0.2em;
}
- ul {
- width: 17em;
- }
- }
-
- &.standard {
- ul {
- width: 16.25em;
- }
}
}