From ab1d73a6eab00f71f340ea976ae373bdcacd2bb0 Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Thu, 16 Feb 2017 22:43:06 +0000 Subject: [PATCH 1/3] Add crew --- ChangeLog.md | 3 +++ __tests__/fixtures/anaconda-test-detailed-export-v4.json | 3 ++- src/app/components/ShipSummaryTable.jsx | 2 ++ src/app/pages/ShipyardPage.jsx | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index bc978526..4b9639bf 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,6 @@ +#2.2.17 + * Add crew to shipyard and outfitting page information + #2.2.16 * Fix 'Extreme' blueprint roll where some incorrect ranges were chosen * Use coriolis-data 2.2.16: diff --git a/__tests__/fixtures/anaconda-test-detailed-export-v4.json b/__tests__/fixtures/anaconda-test-detailed-export-v4.json index fc1f83ee..404ab0f1 100644 --- a/__tests__/fixtures/anaconda-test-detailed-export-v4.json +++ b/__tests__/fixtures/anaconda-test-detailed-export-v4.json @@ -320,6 +320,7 @@ "shieldExplRes": 0.5, "shieldKinRes": 0.4, "shieldThermRes": -0.2, - "timeToDrain": 7.04 + "timeToDrain": 7.04, + "crew": 3 } } diff --git a/src/app/components/ShipSummaryTable.jsx b/src/app/components/ShipSummaryTable.jsx index 0c0202fb..cf627f3e 100644 --- a/src/app/components/ShipSummaryTable.jsx +++ b/src/app/components/ShipSummaryTable.jsx @@ -52,6 +52,7 @@ export default class ShipSummaryTable extends TranslatedComponent { {translate('fuel')} {translate('jump range')} {translate('fastest range')} + {translate('crew')} {translate('MLF')} @@ -88,6 +89,7 @@ export default class ShipSummaryTable extends TranslatedComponent { {int(ship.maxJumpCount)} {f2(ship.unladenFastestRange)} {u.LY} {f2(ship.ladenFastestRange)} {u.LY} + {ship.crew} {ship.masslock} diff --git a/src/app/pages/ShipyardPage.jsx b/src/app/pages/ShipyardPage.jsx index 4496d40d..277ac5b3 100644 --- a/src/app/pages/ShipyardPage.jsx +++ b/src/app/pages/ShipyardPage.jsx @@ -143,6 +143,7 @@ export default class ShipyardPage extends Page { {translate(SizeMap[s.class])} {fInt(s.agility)} {fInt(s.hardness)} + {fInt(s.crew)} {fInt(s.speed)}{u['m/s']} {fInt(s.boost)}{u['m/s']} {fInt(s.baseArmour)} @@ -270,6 +271,7 @@ export default class ShipyardPage extends Page { {translate('size')} {translate('agility')} {translate('hardness')} + {translate('crew')} {translate('base')} {translate('max')} {translate('core module classes')} From 8b9aae342bd3a01d8ff6849743170778f59f6e92 Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Sat, 18 Feb 2017 09:07:18 +0000 Subject: [PATCH 2/3] Fix incorrect terminology for shield metrics. Fixes #5 --- ChangeLog.md | 3 +++ src/app/components/InternalSlot.jsx | 4 ++-- src/app/components/Modification.jsx | 2 +- src/app/i18n/Language.jsx | 4 ++-- src/app/i18n/en.js | 8 ++++++++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index bc978526..9eb1b810 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,6 @@ +#2.2.17 + * Use in-game terminology for shield generator optmul and optmass items + #2.2.16 * Fix 'Extreme' blueprint roll where some incorrect ranges were chosen * Use coriolis-data 2.2.16: diff --git a/src/app/components/InternalSlot.jsx b/src/app/components/InternalSlot.jsx index be88fceb..fd38701e 100644 --- a/src/app/components/InternalSlot.jsx +++ b/src/app/components/InternalSlot.jsx @@ -39,8 +39,8 @@ export default class InternalSlot extends Slot {
{formats.round(mass)}{u.T}
- { m.getOptMass() ?
{translate('optimal mass')}: {formats.int(m.getOptMass())}{u.T}
: null } - { m.getMaxMass() ?
{translate('max mass')}: {formats.int(m.getMaxMass())}{u.T}
: null } + { m.getOptMass() ?
{translate('optmass', m.grp)}: {formats.int(m.getOptMass())}{u.T}
: null } + { m.getMaxMass() ?
{translate('maxmass', m.grp)}: {formats.int(m.getMaxMass())}{u.T}
: null } { m.bins ?
{m.bins} {translate('bins')}
: null } { m.bays ?
{translate('bays')}: {m.bays}
: null } { m.rebuildsperbay ?
{translate('rebuildsperbay')}: {m.rebuildsperbay}
: null } diff --git a/src/app/components/Modification.jsx b/src/app/components/Modification.jsx index 357a2df7..9b7a53b9 100644 --- a/src/app/components/Modification.jsx +++ b/src/app/components/Modification.jsx @@ -81,7 +81,7 @@ export default class Modification extends TranslatedComponent { return (
-
{translate(name)}{symbol}
+
{translate(name, m.grp)}{symbol}
); diff --git a/src/app/i18n/Language.jsx b/src/app/i18n/Language.jsx index 4fbac2e4..57d26b67 100644 --- a/src/app/i18n/Language.jsx +++ b/src/app/i18n/Language.jsx @@ -34,9 +34,9 @@ export function getLanguage(langCode) { let gen = d3Locale.numberFormat('n'); if(lang === EN) { - translate = (t) => { return currentTerms[t] || t; }; + translate = (t, x) => { return currentTerms[t + '_' + x] || currentTerms[t] || t; }; } else { - translate = (t) => { return currentTerms[t] || fallbackTerms[t] || t; }; + translate = (t, x) => { return currentTerms[t + '_' + x] || currentTerms[t] || fallbackTerms[t + '_' + x] || fallbackTerms[t] || t; }; } return { diff --git a/src/app/i18n/en.js b/src/app/i18n/en.js index a296c55f..dc04c526 100644 --- a/src/app/i18n/en.js +++ b/src/app/i18n/en.js @@ -189,6 +189,14 @@ export const terms = { wepcap: 'Weapons capacity', weprate: 'Weapons recharge rate', + // Shield generators use a different terminology + minmass_sg: 'Minimum hull mass', + optmass_sg: 'Optimal hull mass', + maxmass_sg: 'Maximum hull mass', + minmul_sg: 'Minimum strength', + optmul_sg: 'Optimal strength', + maxmul_sg: 'Minimum strength', + // Help text HELP_TEXT: `

Introduction

From e42a0d1210bd7083ee8a65c1be449b3b1459a7ea Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Sat, 18 Feb 2017 10:00:07 +0000 Subject: [PATCH 3/3] Bump --- ChangeLog.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index aa21e0f3..8bef735b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,11 @@ #2.2.17 * Use in-game terminology for shield generator optmul and optmass items * Add crew to shipyard and outfitting page information + * Use coriolis-data 2.2.17: + * Add mass as potential SCB modification + * Fix mining laser statistics + * Remove non-existent grade 4 and 5 wake scanner modifications + * Add number of crew for each ship #2.2.16 * Fix 'Extreme' blueprint roll where some incorrect ranges were chosen diff --git a/package.json b/package.json index 3db4ab44..67ab2a88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coriolis_shipyard", - "version": "2.2.16", + "version": "2.2.17", "repository": { "type": "git", "url": "https://github.com/EDCD/coriolis"