);
}
diff --git a/src/app/i18n/en.js b/src/app/i18n/en.js
index 86b56bf8..e4979ff1 100644
--- a/src/app/i18n/en.js
+++ b/src/app/i18n/en.js
@@ -31,9 +31,9 @@ export const terms = {
PHRASE_ENGAGEMENT_RANGE: 'The distance between your ship and its target',
PHRASE_SELECT_BLUEPRINT: 'Click to select a blueprint',
PHRASE_BLUEPRINT_WORST: 'Worst primary values for this blueprint',
- PHRASE_BLUEPRINT_AVERAGE: 'Average primary values for this blueprint',
PHRASE_BLUEPRINT_RANDOM: 'Random selection between worst and best primary values for this blueprint',
PHRASE_BLUEPRINT_BEST: 'Best primary values for this blueprint',
+ PHRASE_BLUEPRINT_EXTREME: 'Best beneficial and worst detrimental primary values for this blueprint',
PHRASE_BLUEPRINT_RESET: 'Remove all modifications and blueprint',
PHRASE_SELECT_SPECIAL: 'Click to select an experimental effect',
PHRASE_NO_SPECIAL: 'No experimental effect',
@@ -115,6 +115,7 @@ export const terms = {
average: 'Average',
random: 'Random',
best: 'Best',
+ extreme: 'Extreme',
reset: 'Reset',
// Weapon, offence, defence and movement
From 2620935745aa6e185d32e57b54b1fc5d5b90127e Mon Sep 17 00:00:00 2001
From: Cmdr McDonald
Date: Sun, 12 Feb 2017 08:31:09 +0000
Subject: [PATCH 6/9] Add additional explanation for import failures
---
ChangeLog.md | 1 +
src/app/pages/ErrorDetails.jsx | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog.md b/ChangeLog.md
index f15a156e..b8aa5618 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -3,6 +3,7 @@
* Reload page if Safari throws a security error
* Handle import of ships with incorrectly-sized slots
* Add 'Extreme' blueprint roll: best beneficial and worst detrimental outcome (in place of 'Average' roll)
+ * Display information about Microsoft browser issues when an import fails
#2.2.14
* Ensure that jitter is shown correctly when the result of a special effect
diff --git a/src/app/pages/ErrorDetails.jsx b/src/app/pages/ErrorDetails.jsx
index c315a87e..507f5b94 100644
--- a/src/app/pages/ErrorDetails.jsx
+++ b/src/app/pages/ErrorDetails.jsx
@@ -39,10 +39,16 @@ export default class ErrorDetails extends React.Component {
;
}
+ const importerror = ed && ed.scriptUrl && ed.scriptUrl.indexOf('/import') != -1;
+
return
Jameson, we have a problem..
{error.message}
+
+ {importerror ?
If you are attempting to import a ship from EDDI or EDMC and are seeing a 'Z_BUF_ERROR' it means that the URL has not been provided correctly. This is a common problem when using Microsoft Internet Explorer or Microsoft Edge, and you should use another browser instead.
: null }
+
Please note that this site uses Google Analytics to track performance and usage. If you are blocking cookies, for example using Ghostery, please disable blocking for this site and try again.
+
{content}
;
}
From f011f1f4d57aa40c98beb749d2e9bbb7e95eff97 Mon Sep 17 00:00:00 2001
From: Cmdr McDonald
Date: Mon, 13 Feb 2017 07:59:29 +0000
Subject: [PATCH 7/9] Add ability to export module list to EDDB to find where
they can be purchased
---
ChangeLog.md | 1 +
src/app/components/SvgIcons.jsx | 20 ++++++++++++++++++++
src/app/i18n/en.js | 1 +
src/app/pages/OutfittingPage.jsx | 19 ++++++++++++++++++-
4 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/ChangeLog.md b/ChangeLog.md
index b8aa5618..88719997 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -4,6 +4,7 @@
* Handle import of ships with incorrectly-sized slots
* Add 'Extreme' blueprint roll: best beneficial and worst detrimental outcome (in place of 'Average' roll)
* Display information about Microsoft browser issues when an import fails
+ * Add 'purchase this build' icon link to EDDB
#2.2.14
* Ensure that jitter is shown correctly when the result of a special effect
diff --git a/src/app/components/SvgIcons.jsx b/src/app/components/SvgIcons.jsx
index 34d84118..af119679 100644
--- a/src/app/components/SvgIcons.jsx
+++ b/src/app/components/SvgIcons.jsx
@@ -227,6 +227,26 @@ export class LinkIcon extends SvgIcon {
}
}
+/**
+ * Shopping icon (dollar sign)
+ */
+export class ShoppingIcon extends SvgIcon {
+ /**
+ * Overriden view box
+ * @return {String} view box
+ */
+ viewBox() { return '0 0 200 200'; }
+ /**
+ * Generate the SVG
+ * @return {React.Component} SVG Contents
+ */
+ svg() {
+ return
+
+ ;
+ }
+}
+
/**
* No Power - Lightning bolt + no entry
*/
diff --git a/src/app/i18n/en.js b/src/app/i18n/en.js
index e4979ff1..ce9d4436 100644
--- a/src/app/i18n/en.js
+++ b/src/app/i18n/en.js
@@ -37,6 +37,7 @@ export const terms = {
PHRASE_BLUEPRINT_RESET: 'Remove all modifications and blueprint',
PHRASE_SELECT_SPECIAL: 'Click to select an experimental effect',
PHRASE_NO_SPECIAL: 'No experimental effect',
+ PHRASE_SHOPPING_LIST: 'Stations that sell this build',
HELP_MODIFICATIONS_MENU: 'Click on a number to enter a new value, or drag along the bar for small changes',
diff --git a/src/app/pages/OutfittingPage.jsx b/src/app/pages/OutfittingPage.jsx
index 46401c6b..9fdd86cb 100644
--- a/src/app/pages/OutfittingPage.jsx
+++ b/src/app/pages/OutfittingPage.jsx
@@ -8,7 +8,7 @@ import Persist from '../stores/Persist';
import Ship from '../shipyard/Ship';
import { toDetailedBuild } from '../shipyard/Serializer';
import { outfitURL } from '../utils/UrlGenerators';
-import { FloppyDisk, Bin, Switch, Download, Reload, Fuel, LinkIcon } from '../components/SvgIcons';
+import { FloppyDisk, Bin, Switch, Download, Reload, Fuel, LinkIcon, ShoppingIcon } from '../components/SvgIcons';
import ShipSummaryTable from '../components/ShipSummaryTable';
import StandardSlotSection from '../components/StandardSlotSection';
import HardpointsSlotSection from '../components/HardpointsSlotSection';
@@ -284,6 +284,20 @@ export default class OutfittingPage extends Page {
this.context.showModal();
}
+ /**
+ * Open up a window for EDDB with a shopping list of our components
+ */
+ _eddbShoppingList() {
+ const ship = this.state.ship;
+
+ const shipId = Ships[ship.id].eddbID;
+ // Provide unique list of non-PP module EDDB IDs
+ const modIds = ship.internal.concat(ship.bulkheads, ship.standard, ship.hardpoints).filter(slot => slot !== null && slot.m !== null && !slot.m.pp).map(slot => slot.m.eddbID).filter((v, i, a) => a.indexOf(v) === i);
+
+ // Open up the relevant URL
+ window.open('https://eddb.io/station?s=' + shipId + '&m=' + modIds.join(','));
+ }
+
/**
* Handle Key Down
* @param {Event} e Keyboard Event
@@ -342,6 +356,9 @@ export default class OutfittingPage extends Page {
+
From cbac650b9ec23b0b5ce6a5dd7aec82c64ddea059 Mon Sep 17 00:00:00 2001
From: Cmdr McDonald
Date: Mon, 13 Feb 2017 08:07:35 +0000
Subject: [PATCH 8/9] Added miner and shielded miner roles
---
ChangeLog.md | 1 +
src/app/components/StandardSlotSection.jsx | 12 +++
src/app/i18n/en.js | 2 +
src/app/shipyard/ShipRoles.js | 101 +++++++++++++++++++++
4 files changed, 116 insertions(+)
diff --git a/ChangeLog.md b/ChangeLog.md
index 88719997..9979ea3a 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -5,6 +5,7 @@
* Add 'Extreme' blueprint roll: best beneficial and worst detrimental outcome (in place of 'Average' roll)
* Display information about Microsoft browser issues when an import fails
* Add 'purchase this build' icon link to EDDB
+ * Add 'miner' and 'shielded miner' ship roles
#2.2.14
* Ensure that jitter is shown correctly when the result of a special effect
diff --git a/src/app/components/StandardSlotSection.jsx b/src/app/components/StandardSlotSection.jsx
index e319f524..23fe2b63 100644
--- a/src/app/components/StandardSlotSection.jsx
+++ b/src/app/components/StandardSlotSection.jsx
@@ -53,6 +53,16 @@ export default class StandardSlotSection extends SlotSection {
this._close();
}
+ /**
+ * Miner Build
+ * @param {Boolean} shielded True if shield generator should be included
+ */
+ _optimizeMiner(shielded) {
+ ShipRoles.miner(this.props.ship, shielded);
+ this.props.onChange();
+ this._close();
+ }
+
/**
* Explorer role
* @param {Boolean} planetary True if Planetary Vehicle Hangar (PVH) should be included
@@ -209,6 +219,8 @@ export default class StandardSlotSection extends SlotSection {
{translate('Shielded Trader')}
{translate('Explorer')}
{translate('Planetary Explorer')}
+
{translate('Miner')}
+
{translate('Shielded Miner')}
;
}
diff --git a/src/app/i18n/en.js b/src/app/i18n/en.js
index ce9d4436..a296c55f 100644
--- a/src/app/i18n/en.js
+++ b/src/app/i18n/en.js
@@ -228,6 +228,8 @@ To remove a module from a slot right-click on the module.
To move a module from one slot to another drag it. If you instead want to copy the module drag it whilst holding down the 'Alt' key.
+Clicking on the headings for each set of modules gives you the ability to either select an overall role for your ship (when clicking the core internal header) or a specific module with which you want to fill all applicable slots (when clicking the other headers).
+
Power Management
The power management panel provides information about power usage and priorities. It allows you to enable and disable individual modules, as well as set power priorities for each module.
diff --git a/src/app/shipyard/ShipRoles.js b/src/app/shipyard/ShipRoles.js
index 0ebbf0d7..79b3ee9e 100644
--- a/src/app/shipyard/ShipRoles.js
+++ b/src/app/shipyard/ShipRoles.js
@@ -126,3 +126,104 @@ export function explorer(ship, planetary) {
ship.useLightestStandard(standardOpts);
}
+
+/**
+ * Miner Role
+ * @param {Ship} ship Ship instance
+ * @param {Boolean} shielded True if shield generator should be included
+ */
+export function miner(ship, shielded) {
+ let standardOpts = { ppRating: 'A' },
+ miningLaserCount = 2,
+ usedSlots = [],
+ sg = ship.getAvailableModules().lightestShieldGenerator(ship.hullMass);
+
+ // Cargo hatch should be enabled
+ ship.setSlotEnabled(ship.cargoHatch, true);
+
+ // 4A or largest possible refinery
+ const refineryOrder = [4, 5, 6, 7, 8, 3, 2, 1];
+ const refineryInternals = ship.internal.filter(a => usedSlots.indexOf(a) == -1)
+ .filter(a => (!a.eligible) || a.eligible.rf)
+ .sort((a,b) => refineryOrder.indexOf(a.maxClass) - refineryOrder.indexOf(b.maxClass));
+ for (let i = 0; i < refineryInternals.length; i++) {
+ if (canMount(ship, refineryInternals[i], 'rf')) {
+ ship.use(refineryInternals[i], ModuleUtils.findInternal('rf', refineryInternals[i].maxClass, 'A'));
+ usedSlots.push(refineryInternals[i]);
+ break;
+ }
+ }
+
+ // Prospector limpet controller - 3A if possible
+ const prospectorOrder = [3, 4, 5, 6, 7, 8, 2, 1];
+ const prospectorInternals = ship.internal.filter(a => usedSlots.indexOf(a) == -1)
+ .filter(a => (!a.eligible) || a.eligible.pc)
+ .sort((a,b) => prospectorOrder.indexOf(a.maxClass) - prospectorOrder.indexOf(b.maxClass));
+ for (let i = 0; i < prospectorInternals.length; i++) {
+ if (canMount(ship, prospectorInternals[i], 'pc')) {
+ // Prospector only has odd classes
+ const prospectorClass = prospectorInternals[i].maxClass % 2 === 0 ? prospectorInternals[i].maxClass - 1 : prospectorInternals[i].maxClass;
+ ship.use(prospectorInternals[i], ModuleUtils.findInternal('pc', prospectorClass, 'A'));
+ usedSlots.push(prospectorInternals[i]);
+ break;
+ }
+ }
+
+ // Shield generator if required
+ if (shielded) {
+ const shieldOrder = [1, 2, 3, 4, 5, 6, 7, 8];
+ const shieldInternals = ship.internal.filter(a => usedSlots.indexOf(a) == -1)
+ .filter(a => (!a.eligible) || a.eligible.pc)
+ .filter(a => a.maxClass >= sg.class)
+ .sort((a,b) => shieldOrder.indexOf(a.maxClass) - shieldOrder.indexOf(b.maxClass));
+ for (let i = 0; i < shieldInternals.length; i++) {
+ if (canMount(ship, shieldInternals[i], 'sg')) {
+ ship.use(shieldInternals[i], sg);
+ usedSlots.push(shieldInternals[i]);
+ break;
+ }
+ }
+ }
+
+ // Collector limpet controller if there are enough internals left
+ let collectorLimpetsRequired = Math.max(ship.internal.filter(a => (!a.eligible) || a.eligible.cr).length - 6, 0);
+ if (collectorLimpetsRequired > 0) {
+ const collectorOrder = [1, 2, 3, 4, 5, 6, 7, 8];
+ const collectorInternals = ship.internal.filter(a => usedSlots.indexOf(a) == -1)
+ .filter(a => (!a.eligible) || a.eligible.cc)
+ .sort((a,b) => collectorOrder.indexOf(a.maxClass) - collectorOrder.indexOf(b.maxClass));
+ for (let i = 0; i < collectorInternals.length && collectorLimpetsRequired > 0; i++) {
+ if (canMount(ship, collectorInternals[i], 'cc')) {
+ // Collector only has odd classes
+ const collectorClass = collectorInternals[i].maxClass % 2 === 0 ? collectorInternals[i].maxClass - 1 : collectorInternals[i].maxClass;
+ ship.use(collectorInternals[i], ModuleUtils.findInternal('cc', collectorClass, 'A'));
+ usedSlots.push(collectorInternals[i]);
+ collectorLimpetsRequired -= collectorInternals[i].m.maximum;
+ }
+ }
+ }
+
+ // Dual mining lasers of highest possible class; remove anything else
+ const miningLaserOrder = [2, 3, 4, 1, 0];
+ const miningLaserHardpoints = ship.hardpoints.concat().sort(function(a,b) {
+ return miningLaserOrder.indexOf(a.maxClass) - miningLaserOrder.indexOf(b.maxClass);
+ });
+ for (let s of miningLaserHardpoints) {
+ if (s.maxClass >= 1 && miningLaserCount) {
+ ship.use(s, ModuleUtils.hardpoints(s.maxClass >= 2 ? '2m' : '2l'));
+ miningLaserCount--;
+ } else {
+ ship.use(s, null);
+ }
+ }
+
+ // Fill the empty internals with cargo racks
+ for (let i = ship.internal.length; i--;) {
+ let slot = ship.internal[i];
+ if (usedSlots.indexOf(slot) == -1 && canMount(ship, slot, 'cr')) {
+ ship.use(slot, ModuleUtils.findInternal('cr', slot.maxClass, 'E'));
+ }
+ }
+
+ ship.useLightestStandard(standardOpts);
+}
From 15a14dc2802f3fd9bd6b69bed9c5181205aab84a Mon Sep 17 00:00:00 2001
From: Cmdr McDonald
Date: Mon, 13 Feb 2017 19:50:47 +0000
Subject: [PATCH 9/9] Package version
---
ChangeLog.md | 4 ++++
package.json | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog.md b/ChangeLog.md
index 9979ea3a..c1ae7c71 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -6,6 +6,10 @@
* Display information about Microsoft browser issues when an import fails
* Add 'purchase this build' icon link to EDDB
* Add 'miner' and 'shielded miner' ship roles
+ * Use coriolis-data 2.2.15:
+ * Fix location of initial cargo rack for Vulture
+ * Fix broken regeneration rate for 6B shield generators
+ * Tidy up breach damage values
#2.2.14
* Ensure that jitter is shown correctly when the result of a special effect
diff --git a/package.json b/package.json
index 47a523c9..5c876bef 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coriolis_shipyard",
- "version": "2.2.15b",
+ "version": "2.2.15",
"repository": {
"type": "git",
"url": "https://github.com/EDCD/coriolis"