mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 08:43:02 +00:00
Merge branch 'feature/ordering' into develop
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
* Fix crash when removing the special effect from a module
|
* Fix crash when removing the special effect from a module
|
||||||
* Ensure comparisons with saved stock ships work correctly
|
* Ensure comparisons with saved stock ships work correctly
|
||||||
* Add 'Racer' role
|
* Add 'Racer' role
|
||||||
|
* Tidy up shipyard page; remove units from data columns and re-order for legibility
|
||||||
|
|
||||||
#2.3.3
|
#2.3.3
|
||||||
* Remove unused blueprint when hitting reset
|
* Remove unused blueprint when hitting reset
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
const TestUtils = {
|
const TestUtils = {
|
||||||
createContextProvider: function(context) {
|
createContextProvider: function(context) {
|
||||||
var _contextTypes = {};
|
var _contextTypes = {};
|
||||||
|
|
||||||
Object.keys(context).forEach(function(key) {
|
Object.keys(context).forEach(function(key) {
|
||||||
_contextTypes[key] = React.PropTypes.any;
|
_contextTypes[key] = PropTypes.any;
|
||||||
});
|
});
|
||||||
|
|
||||||
return React.createClass({
|
return React.createClass({
|
||||||
|
|||||||
@@ -97,10 +97,11 @@
|
|||||||
"fbemitter": "^2.0.0",
|
"fbemitter": "^2.0.0",
|
||||||
"lodash": "^4.15.0",
|
"lodash": "^4.15.0",
|
||||||
"lz-string": "^1.4.4",
|
"lz-string": "^1.4.4",
|
||||||
"react": "^15.0.1",
|
"prop-types": "^15.5.8",
|
||||||
"react-dom": "^15.0.1",
|
"react": "^15.5.4",
|
||||||
|
"react-dom": "^15.5.4",
|
||||||
"react-number-editor": "Athanasius/react-number-editor.git#miggy",
|
"react-number-editor": "Athanasius/react-number-editor.git#miggy",
|
||||||
"recharts": "^0.21.2",
|
"recharts": "^0.22.3",
|
||||||
"superagent": "^1.4.0"
|
"superagent": "^1.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import Router from './Router';
|
import Router from './Router';
|
||||||
import { EventEmitter } from 'fbemitter';
|
import { EventEmitter } from 'fbemitter';
|
||||||
import { getLanguage } from './i18n/Language';
|
import { getLanguage } from './i18n/Language';
|
||||||
@@ -27,18 +28,18 @@ const zlib = require('zlib');
|
|||||||
export default class Coriolis extends React.Component {
|
export default class Coriolis extends React.Component {
|
||||||
|
|
||||||
static childContextTypes = {
|
static childContextTypes = {
|
||||||
closeMenu: React.PropTypes.func.isRequired,
|
closeMenu: PropTypes.func.isRequired,
|
||||||
hideModal: React.PropTypes.func.isRequired,
|
hideModal: PropTypes.func.isRequired,
|
||||||
language: React.PropTypes.object.isRequired,
|
language: PropTypes.object.isRequired,
|
||||||
noTouch: React.PropTypes.bool.isRequired,
|
noTouch: PropTypes.bool.isRequired,
|
||||||
onCommand: React.PropTypes.func.isRequired,
|
onCommand: PropTypes.func.isRequired,
|
||||||
onWindowResize: React.PropTypes.func.isRequired,
|
onWindowResize: PropTypes.func.isRequired,
|
||||||
openMenu: React.PropTypes.func.isRequired,
|
openMenu: PropTypes.func.isRequired,
|
||||||
route: React.PropTypes.object.isRequired,
|
route: PropTypes.object.isRequired,
|
||||||
showModal: React.PropTypes.func.isRequired,
|
showModal: PropTypes.func.isRequired,
|
||||||
sizeRatio: React.PropTypes.number.isRequired,
|
sizeRatio: PropTypes.number.isRequired,
|
||||||
termtip: React.PropTypes.func.isRequired,
|
termtip: PropTypes.func.isRequired,
|
||||||
tooltip: React.PropTypes.func.isRequired
|
tooltip: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import * as ModuleUtils from '../shipyard/ModuleUtils';
|
import * as ModuleUtils from '../shipyard/ModuleUtils';
|
||||||
import { findDOMNode } from 'react-dom';
|
import { findDOMNode } from 'react-dom';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -83,12 +84,12 @@ const CATEGORIES = {
|
|||||||
export default class AvailableModulesMenu extends TranslatedComponent {
|
export default class AvailableModulesMenu extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
modules: React.PropTypes.oneOfType([React.PropTypes.object, React.PropTypes.array]).isRequired,
|
modules: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
|
||||||
onSelect: React.PropTypes.func.isRequired,
|
onSelect: PropTypes.func.isRequired,
|
||||||
diffDetails: React.PropTypes.func,
|
diffDetails: PropTypes.func,
|
||||||
m: React.PropTypes.object,
|
m: PropTypes.object,
|
||||||
shipMass: React.PropTypes.number,
|
shipMass: PropTypes.number,
|
||||||
warning: React.PropTypes.func
|
warning: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
|
|
||||||
@@ -45,16 +46,16 @@ export default class BarChart extends TranslatedComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
colors: React.PropTypes.array,
|
colors: PropTypes.array,
|
||||||
data: React.PropTypes.array.isRequired,
|
data: PropTypes.array.isRequired,
|
||||||
desc: React.PropTypes.bool,
|
desc: PropTypes.bool,
|
||||||
format: React.PropTypes.string.isRequired,
|
format: PropTypes.string.isRequired,
|
||||||
labels: React.PropTypes.array,
|
labels: PropTypes.array,
|
||||||
predicate: React.PropTypes.string,
|
predicate: PropTypes.string,
|
||||||
properties: React.PropTypes.array,
|
properties: PropTypes.array,
|
||||||
title: React.PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
unit: React.PropTypes.string.isRequired,
|
unit: PropTypes.string.isRequired,
|
||||||
width: React.PropTypes.number.isRequired
|
width: PropTypes.number.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import { nameComparator } from '../utils/SlotFunctions';
|
import { nameComparator } from '../utils/SlotFunctions';
|
||||||
@@ -14,10 +15,10 @@ import Module from '../shipyard/Module';
|
|||||||
*/
|
*/
|
||||||
export default class Boost extends TranslatedComponent {
|
export default class Boost extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
marker: React.PropTypes.string.isRequired,
|
marker: PropTypes.string.isRequired,
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
boost: React.PropTypes.bool.isRequired,
|
boost: PropTypes.bool.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import Slider from '../components/Slider';
|
import Slider from '../components/Slider';
|
||||||
@@ -9,9 +10,9 @@ import Slider from '../components/Slider';
|
|||||||
*/
|
*/
|
||||||
export default class Cargo extends TranslatedComponent {
|
export default class Cargo extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
cargo: React.PropTypes.number.isRequired,
|
cargo: PropTypes.number.isRequired,
|
||||||
cargoCapacity: React.PropTypes.number.isRequired,
|
cargoCapacity: PropTypes.number.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import Link from './Link';
|
import Link from './Link';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
@@ -11,11 +12,11 @@ import { outfitURL } from '../utils/UrlGenerators';
|
|||||||
export default class ComparisonTable extends TranslatedComponent {
|
export default class ComparisonTable extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
facets: React.PropTypes.array.isRequired,
|
facets: PropTypes.array.isRequired,
|
||||||
builds: React.PropTypes.array.isRequired,
|
builds: PropTypes.array.isRequired,
|
||||||
onSort: React.PropTypes.func.isRequired,
|
onSort: PropTypes.func.isRequired,
|
||||||
predicate: React.PropTypes.string.isRequired, // Used only to test again prop changes for shouldRender
|
predicate: PropTypes.string.isRequired, // Used only to test again prop changes for shouldRender
|
||||||
desc: React.PropTypes.oneOfType([React.PropTypes.bool.isRequired, React.PropTypes.number.isRequired]), // Used only to test again prop changes for shouldRender
|
desc: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.number.isRequired]), // Used only to test again prop changes for shouldRender
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import Persist from '../stores/Persist';
|
import Persist from '../stores/Persist';
|
||||||
@@ -14,9 +15,9 @@ import { ShoppingIcon } from '../components/SvgIcons';
|
|||||||
export default class CostSection extends TranslatedComponent {
|
export default class CostSection extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
code: React.PropTypes.string.isRequired,
|
code: PropTypes.string.isRequired,
|
||||||
buildName: React.PropTypes.string
|
buildName: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import * as Calc from '../shipyard/Calculations';
|
import * as Calc from '../shipyard/Calculations';
|
||||||
import PieChart from './PieChart';
|
import PieChart from './PieChart';
|
||||||
@@ -14,12 +15,12 @@ import VerticalBarChart from './VerticalBarChart';
|
|||||||
*/
|
*/
|
||||||
export default class Defence extends TranslatedComponent {
|
export default class Defence extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
marker: React.PropTypes.string.isRequired,
|
marker: PropTypes.string.isRequired,
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
opponent: React.PropTypes.object.isRequired,
|
opponent: PropTypes.object.isRequired,
|
||||||
engagementrange: React.PropTypes.number.isRequired,
|
engagementrange: PropTypes.number.isRequired,
|
||||||
sys: React.PropTypes.number.isRequired,
|
sys: PropTypes.number.isRequired,
|
||||||
opponentWep: React.PropTypes.number.isRequired
|
opponentWep: PropTypes.number.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import Slider from '../components/Slider';
|
import Slider from '../components/Slider';
|
||||||
@@ -9,9 +10,9 @@ import Slider from '../components/Slider';
|
|||||||
*/
|
*/
|
||||||
export default class EngagementRange extends TranslatedComponent {
|
export default class EngagementRange extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
engagementRange: React.PropTypes.number.isRequired,
|
engagementRange: PropTypes.number.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import { nameComparator } from '../utils/SlotFunctions';
|
import { nameComparator } from '../utils/SlotFunctions';
|
||||||
@@ -13,12 +14,12 @@ import * as Calc from '../shipyard/Calculations';
|
|||||||
*/
|
*/
|
||||||
export default class EngineProfile extends TranslatedComponent {
|
export default class EngineProfile extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
cargo: React.PropTypes.number.isRequired,
|
cargo: PropTypes.number.isRequired,
|
||||||
fuel: React.PropTypes.number.isRequired,
|
fuel: PropTypes.number.isRequired,
|
||||||
eng: React.PropTypes.number.isRequired,
|
eng: PropTypes.number.isRequired,
|
||||||
boost: React.PropTypes.bool.isRequired,
|
boost: PropTypes.bool.isRequired,
|
||||||
marker: React.PropTypes.string.isRequired
|
marker: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import { nameComparator } from '../utils/SlotFunctions';
|
import { nameComparator } from '../utils/SlotFunctions';
|
||||||
@@ -13,10 +14,10 @@ import * as Calc from '../shipyard/Calculations';
|
|||||||
*/
|
*/
|
||||||
export default class FSDProfile extends TranslatedComponent {
|
export default class FSDProfile extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
cargo: React.PropTypes.number.isRequired,
|
cargo: PropTypes.number.isRequired,
|
||||||
fuel: React.PropTypes.number.isRequired,
|
fuel: PropTypes.number.isRequired,
|
||||||
marker: React.PropTypes.string.isRequired
|
marker: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import Slider from '../components/Slider';
|
import Slider from '../components/Slider';
|
||||||
@@ -9,9 +10,9 @@ import Slider from '../components/Slider';
|
|||||||
*/
|
*/
|
||||||
export default class Fuel extends TranslatedComponent {
|
export default class Fuel extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
fuel: React.PropTypes.number.isRequired,
|
fuel: PropTypes.number.isRequired,
|
||||||
fuelCapacity: React.PropTypes.number.isRequired,
|
fuelCapacity: PropTypes.number.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import { nameComparator } from '../utils/SlotFunctions';
|
import { nameComparator } from '../utils/SlotFunctions';
|
||||||
@@ -13,8 +14,8 @@ import * as Calc from '../shipyard/Calculations';
|
|||||||
*/
|
*/
|
||||||
export default class JumpRange extends TranslatedComponent {
|
export default class JumpRange extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
code: React.PropTypes.string.isRequired
|
code: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import Measure from 'react-measure';
|
import Measure from 'react-measure';
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -20,21 +21,21 @@ export default class LineChart extends TranslatedComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
func: React.PropTypes.func.isRequired,
|
func: PropTypes.func.isRequired,
|
||||||
xLabel: React.PropTypes.string.isRequired,
|
xLabel: PropTypes.string.isRequired,
|
||||||
xMin: React.PropTypes.number,
|
xMin: PropTypes.number,
|
||||||
xMax: React.PropTypes.number.isRequired,
|
xMax: PropTypes.number.isRequired,
|
||||||
xUnit: React.PropTypes.string.isRequired,
|
xUnit: PropTypes.string.isRequired,
|
||||||
xMark: React.PropTypes.number,
|
xMark: PropTypes.number,
|
||||||
yLabel: React.PropTypes.string.isRequired,
|
yLabel: PropTypes.string.isRequired,
|
||||||
yMin: React.PropTypes.number,
|
yMin: PropTypes.number,
|
||||||
yMax: React.PropTypes.number.isRequired,
|
yMax: PropTypes.number.isRequired,
|
||||||
yUnit: React.PropTypes.string,
|
yUnit: PropTypes.string,
|
||||||
series: React.PropTypes.array,
|
series: PropTypes.array,
|
||||||
colors: React.PropTypes.array,
|
colors: PropTypes.array,
|
||||||
points: React.PropTypes.number,
|
points: PropTypes.number,
|
||||||
aspect: React.PropTypes.number,
|
aspect: PropTypes.number,
|
||||||
code: React.PropTypes.string,
|
code: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import Router from '../Router';
|
import Router from '../Router';
|
||||||
import { shallowEqual } from '../utils/UtilityFunctions';
|
import { shallowEqual } from '../utils/UtilityFunctions';
|
||||||
|
|
||||||
@@ -8,9 +9,9 @@ import { shallowEqual } from '../utils/UtilityFunctions';
|
|||||||
export default class Link extends React.Component {
|
export default class Link extends React.Component {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
children: React.PropTypes.any,
|
children: PropTypes.any,
|
||||||
href: React.PropTypes.string.isRequired,
|
href: PropTypes.string.isRequired,
|
||||||
onClick: React.PropTypes.func
|
onClick: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import Persist from '../stores/Persist';
|
import Persist from '../stores/Persist';
|
||||||
@@ -22,8 +23,8 @@ function buildComparator(a, b) {
|
|||||||
export default class ModalCompare extends TranslatedComponent {
|
export default class ModalCompare extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onSelect: React.PropTypes.func.isRequired,
|
onSelect: PropTypes.func.isRequired,
|
||||||
builds: React.PropTypes.array
|
builds: PropTypes.array
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { findDOMNode } from 'react-dom';
|
import { findDOMNode } from 'react-dom';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
|
|
||||||
@@ -8,9 +9,9 @@ import TranslatedComponent from './TranslatedComponent';
|
|||||||
export default class ModalExport extends TranslatedComponent {
|
export default class ModalExport extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
title: React.PropTypes.string,
|
title: PropTypes.string,
|
||||||
generator: React.PropTypes.func,
|
generator: PropTypes.func,
|
||||||
data: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.object, React.PropTypes.array])
|
data: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array])
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* eslint react/no-danger: 0 */
|
/* eslint react/no-danger: 0 */
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { findDOMNode } from 'react-dom';
|
import { findDOMNode } from 'react-dom';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -9,7 +10,7 @@ import TranslatedComponent from './TranslatedComponent';
|
|||||||
export default class ModalHelp extends TranslatedComponent {
|
export default class ModalHelp extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
title: React.PropTypes.string
|
title: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { findDOMNode } from 'react-dom';
|
import { findDOMNode } from 'react-dom';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -86,7 +87,7 @@ export default class ModalImport extends TranslatedComponent {
|
|||||||
|
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
builds: React.PropTypes.object, // Optional: Import object
|
builds: PropTypes.object, // Optional: Import object
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import ShortenUrl from '../utils/ShortenUrl';
|
import ShortenUrl from '../utils/ShortenUrl';
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ import ShortenUrl from '../utils/ShortenUrl';
|
|||||||
export default class ModalPermalink extends TranslatedComponent {
|
export default class ModalPermalink extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
url: React.PropTypes.string.isRequired
|
url: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import NumberEditor from 'react-number-editor';
|
import NumberEditor from 'react-number-editor';
|
||||||
@@ -9,11 +10,11 @@ import NumberEditor from 'react-number-editor';
|
|||||||
export default class Modification extends TranslatedComponent {
|
export default class Modification extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
m: React.PropTypes.object.isRequired,
|
m: PropTypes.object.isRequired,
|
||||||
name: React.PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
value: React.PropTypes.number.isRequired,
|
value: PropTypes.number.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { isEmpty, stopCtxPropagation } from '../utils/UtilityFunctions';
|
import { isEmpty, stopCtxPropagation } from '../utils/UtilityFunctions';
|
||||||
@@ -13,10 +14,10 @@ import { getBlueprint, blueprintTooltip, setWorst, setBest, setExtreme, setRando
|
|||||||
export default class ModificationsMenu extends TranslatedComponent {
|
export default class ModificationsMenu extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
m: React.PropTypes.object.isRequired,
|
m: PropTypes.object.isRequired,
|
||||||
marker: React.PropTypes.string.isRequired,
|
marker: PropTypes.string.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6,12 +7,12 @@ import TranslatedComponent from './TranslatedComponent';
|
|||||||
*/
|
*/
|
||||||
export default class Movement extends TranslatedComponent {
|
export default class Movement extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
marker: React.PropTypes.string.isRequired,
|
marker: PropTypes.string.isRequired,
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
boost: React.PropTypes.bool.isRequired,
|
boost: PropTypes.bool.isRequired,
|
||||||
eng: React.PropTypes.number.isRequired,
|
eng: PropTypes.number.isRequired,
|
||||||
fuel: React.PropTypes.number.isRequired,
|
fuel: PropTypes.number.isRequired,
|
||||||
cargo: React.PropTypes.number.isRequired
|
cargo: PropTypes.number.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import * as Calc from '../shipyard/Calculations';
|
import * as Calc from '../shipyard/Calculations';
|
||||||
import PieChart from './PieChart';
|
import PieChart from './PieChart';
|
||||||
@@ -51,12 +52,12 @@ export function weaponComparator(translate, propComparator, desc) {
|
|||||||
*/
|
*/
|
||||||
export default class Offence extends TranslatedComponent {
|
export default class Offence extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
marker: React.PropTypes.string.isRequired,
|
marker: PropTypes.string.isRequired,
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
opponent: React.PropTypes.object.isRequired,
|
opponent: PropTypes.object.isRequired,
|
||||||
engagementrange: React.PropTypes.number.isRequired,
|
engagementrange: PropTypes.number.isRequired,
|
||||||
wep: React.PropTypes.number.isRequired,
|
wep: PropTypes.number.isRequired,
|
||||||
opponentSys: React.PropTypes.number.isRequired
|
opponentSys: PropTypes.number.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import Ship from '../shipyard/Ship';
|
import Ship from '../shipyard/Ship';
|
||||||
@@ -19,22 +20,22 @@ import WeaponDamageChart from './WeaponDamageChart';
|
|||||||
export default class OutfittingSubpages extends TranslatedComponent {
|
export default class OutfittingSubpages extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
code: React.PropTypes.string.isRequired,
|
code: PropTypes.string.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
buildName: React.PropTypes.string,
|
buildName: PropTypes.string,
|
||||||
sys: React.PropTypes.number.isRequired,
|
sys: PropTypes.number.isRequired,
|
||||||
eng: React.PropTypes.number.isRequired,
|
eng: PropTypes.number.isRequired,
|
||||||
wep: React.PropTypes.number.isRequired,
|
wep: PropTypes.number.isRequired,
|
||||||
cargo: React.PropTypes.number.isRequired,
|
cargo: PropTypes.number.isRequired,
|
||||||
fuel: React.PropTypes.number.isRequired,
|
fuel: PropTypes.number.isRequired,
|
||||||
boost: React.PropTypes.bool.isRequired,
|
boost: PropTypes.bool.isRequired,
|
||||||
engagementRange: React.PropTypes.number.isRequired,
|
engagementRange: PropTypes.number.isRequired,
|
||||||
opponent: React.PropTypes.object.isRequired,
|
opponent: PropTypes.object.isRequired,
|
||||||
opponentBuild: React.PropTypes.string,
|
opponentBuild: PropTypes.string,
|
||||||
opponentSys: React.PropTypes.number.isRequired,
|
opponentSys: PropTypes.number.isRequired,
|
||||||
opponentEng: React.PropTypes.number.isRequired,
|
opponentEng: PropTypes.number.isRequired,
|
||||||
opponentWep: React.PropTypes.number.isRequired,
|
opponentWep: PropTypes.number.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import Measure from 'react-measure';
|
import Measure from 'react-measure';
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
|
|
||||||
@@ -11,7 +12,7 @@ const LABEL_COLOUR = '#000000';
|
|||||||
export default class PieChart extends Component {
|
export default class PieChart extends Component {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
data : React.PropTypes.array.isRequired
|
data : PropTypes.array.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import { nameComparator } from '../utils/SlotFunctions';
|
import { nameComparator } from '../utils/SlotFunctions';
|
||||||
@@ -14,10 +15,10 @@ import Module from '../shipyard/Module';
|
|||||||
*/
|
*/
|
||||||
export default class Pips extends TranslatedComponent {
|
export default class Pips extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
sys: React.PropTypes.number.isRequired,
|
sys: PropTypes.number.isRequired,
|
||||||
eng: React.PropTypes.number.isRequired,
|
eng: PropTypes.number.isRequired,
|
||||||
wep: React.PropTypes.number.isRequired,
|
wep: PropTypes.number.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -33,10 +34,10 @@ function bandText(val, index, wattScale) {
|
|||||||
export default class PowerBands extends TranslatedComponent {
|
export default class PowerBands extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
bands: React.PropTypes.array.isRequired,
|
bands: PropTypes.array.isRequired,
|
||||||
available: React.PropTypes.number.isRequired,
|
available: PropTypes.number.isRequired,
|
||||||
width: React.PropTypes.number.isRequired,
|
width: PropTypes.number.isRequired,
|
||||||
code: React.PropTypes.string,
|
code: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { findDOMNode } from 'react-dom';
|
import { findDOMNode } from 'react-dom';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -18,9 +19,9 @@ const POWER = [
|
|||||||
*/
|
*/
|
||||||
export default class PowerManagement extends TranslatedComponent {
|
export default class PowerManagement extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
code: React.PropTypes.string.isRequired,
|
code: PropTypes.string.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired
|
onChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import Ship from '../shipyard/Ship';
|
import Ship from '../shipyard/Ship';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
@@ -12,9 +13,9 @@ import cn from 'classnames';
|
|||||||
*/
|
*/
|
||||||
export default class ShipPicker extends TranslatedComponent {
|
export default class ShipPicker extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
ship: React.PropTypes.string.isRequired,
|
ship: PropTypes.string.isRequired,
|
||||||
build: React.PropTypes.string
|
build: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { Warning } from './SvgIcons';
|
import { Warning } from './SvgIcons';
|
||||||
@@ -10,10 +11,10 @@ import * as Calc from '../shipyard/Calculations';
|
|||||||
export default class ShipSummaryTable extends TranslatedComponent {
|
export default class ShipSummaryTable extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
cargo: React.PropTypes.number.isRequired,
|
cargo: PropTypes.number.isRequired,
|
||||||
fuel: React.PropTypes.number.isRequired,
|
fuel: PropTypes.number.isRequired,
|
||||||
marker: React.PropTypes.string.isRequired,
|
marker: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { findDOMNode } from 'react-dom';
|
import { findDOMNode } from 'react-dom';
|
||||||
|
|
||||||
const MARGIN_LR = 8; // Left/ Right margin
|
const MARGIN_LR = 8; // Left/ Right margin
|
||||||
@@ -16,14 +17,14 @@ export default class Slider extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
axis: React.PropTypes.bool,
|
axis: PropTypes.bool,
|
||||||
axisUnit: React.PropTypes.string,
|
axisUnit: PropTypes.string,
|
||||||
max: React.PropTypes.number,
|
max: PropTypes.number,
|
||||||
min: React.PropTypes.number,
|
min: PropTypes.number,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
onResize: React.PropTypes.func,
|
onResize: PropTypes.func,
|
||||||
percent: React.PropTypes.number.isRequired,
|
percent: PropTypes.number.isRequired,
|
||||||
scale: React.PropTypes.number
|
scale: PropTypes.number
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import AvailableModulesMenu from './AvailableModulesMenu';
|
import AvailableModulesMenu from './AvailableModulesMenu';
|
||||||
@@ -13,18 +14,18 @@ import { stopCtxPropagation } from '../utils/UtilityFunctions';
|
|||||||
export default class Slot extends TranslatedComponent {
|
export default class Slot extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
availableModules: React.PropTypes.func.isRequired,
|
availableModules: PropTypes.func.isRequired,
|
||||||
onSelect: React.PropTypes.func.isRequired,
|
onSelect: PropTypes.func.isRequired,
|
||||||
onOpen: React.PropTypes.func.isRequired,
|
onOpen: PropTypes.func.isRequired,
|
||||||
maxClass: React.PropTypes.number.isRequired,
|
maxClass: PropTypes.number.isRequired,
|
||||||
selected: React.PropTypes.bool,
|
selected: PropTypes.bool,
|
||||||
m: React.PropTypes.object,
|
m: PropTypes.object,
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
eligible: React.PropTypes.object,
|
eligible: PropTypes.object,
|
||||||
warning: React.PropTypes.func,
|
warning: PropTypes.func,
|
||||||
drag: React.PropTypes.func,
|
drag: PropTypes.func,
|
||||||
drop: React.PropTypes.func,
|
drop: PropTypes.func,
|
||||||
dropClass: React.PropTypes.string
|
dropClass: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { wrapCtxMenu } from '../utils/UtilityFunctions';
|
import { wrapCtxMenu } from '../utils/UtilityFunctions';
|
||||||
import { canMount } from '../utils/SlotFunctions';
|
import { canMount } from '../utils/SlotFunctions';
|
||||||
@@ -11,10 +12,10 @@ import cn from 'classnames';
|
|||||||
export default class SlotSection extends TranslatedComponent {
|
export default class SlotSection extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
code: React.PropTypes.string.isRequired,
|
code: PropTypes.string.isRequired,
|
||||||
togglePwr: React.PropTypes.func
|
togglePwr: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import Persist from '../stores/Persist';
|
import Persist from '../stores/Persist';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
@@ -17,14 +18,14 @@ import { blueprintTooltip } from '../utils/BlueprintFunctions';
|
|||||||
export default class StandardSlot extends TranslatedComponent {
|
export default class StandardSlot extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
slot: React.PropTypes.object,
|
slot: PropTypes.object,
|
||||||
modules: React.PropTypes.array.isRequired,
|
modules: PropTypes.array.isRequired,
|
||||||
onSelect: React.PropTypes.func.isRequired,
|
onSelect: PropTypes.func.isRequired,
|
||||||
onOpen: React.PropTypes.func.isRequired,
|
onOpen: PropTypes.func.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
selected: React.PropTypes.bool,
|
selected: PropTypes.bool,
|
||||||
warning: React.PropTypes.func,
|
warning: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
import { shallowEqual } from '../utils/UtilityFunctions';
|
import { shallowEqual } from '../utils/UtilityFunctions';
|
||||||
|
|
||||||
@@ -8,8 +9,8 @@ import { shallowEqual } from '../utils/UtilityFunctions';
|
|||||||
class SvgIcon extends React.Component {
|
class SvgIcon extends React.Component {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
className: React.PropTypes.any,
|
className: PropTypes.any,
|
||||||
style: React.PropTypes.object
|
style: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,8 +8,8 @@ import TranslatedComponent from './TranslatedComponent';
|
|||||||
export default class Tooltip extends TranslatedComponent {
|
export default class Tooltip extends TranslatedComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
rect: React.PropTypes.object.isRequired,
|
rect: PropTypes.object.isRequired,
|
||||||
options: React.PropTypes.object
|
options: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import { shallowEqual } from '../utils/UtilityFunctions';
|
import { shallowEqual } from '../utils/UtilityFunctions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,15 +8,15 @@ import { shallowEqual } from '../utils/UtilityFunctions';
|
|||||||
export default class TranslatedComponent extends React.Component {
|
export default class TranslatedComponent extends React.Component {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
language: React.PropTypes.object.isRequired,
|
language: PropTypes.object.isRequired,
|
||||||
sizeRatio: React.PropTypes.number.isRequired,
|
sizeRatio: PropTypes.number.isRequired,
|
||||||
openMenu: React.PropTypes.func.isRequired,
|
openMenu: PropTypes.func.isRequired,
|
||||||
closeMenu: React.PropTypes.func.isRequired,
|
closeMenu: PropTypes.func.isRequired,
|
||||||
showModal: React.PropTypes.func.isRequired,
|
showModal: PropTypes.func.isRequired,
|
||||||
hideModal: React.PropTypes.func.isRequired,
|
hideModal: PropTypes.func.isRequired,
|
||||||
tooltip: React.PropTypes.func.isRequired,
|
tooltip: PropTypes.func.isRequired,
|
||||||
termtip: React.PropTypes.func.isRequired,
|
termtip: PropTypes.func.isRequired,
|
||||||
onWindowResize: React.PropTypes.func.isRequired
|
onWindowResize: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -87,13 +87,13 @@ export default class VerticalBarChart extends TranslatedComponent {
|
|||||||
/**
|
/**
|
||||||
* A label that displays the value within the bar of the chart
|
* A label that displays the value within the bar of the chart
|
||||||
*/
|
*/
|
||||||
const ValueLabel = React.createClass({
|
class ValueLabel extends React.Component {
|
||||||
propTypes: {
|
static propTypes = {
|
||||||
x: PropTypes.number,
|
x: PropTypes.number,
|
||||||
y: PropTypes.number,
|
y: PropTypes.number,
|
||||||
payload: PropTypes.object,
|
payload: PropTypes.object,
|
||||||
value: PropTypes.number
|
value: PropTypes.number
|
||||||
},
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { x, y, payload, value } = this.props;
|
const { x, y, payload, value } = this.props;
|
||||||
@@ -104,4 +104,4 @@ const ValueLabel = React.createClass({
|
|||||||
<text x={x} y={y} fill="#000000" textAnchor="middle" dy={20} style={{ fontSize: em }}>{value}</text>
|
<text x={x} y={y} fill="#000000" textAnchor="middle" dy={20} style={{ fontSize: em }}>{value}</text>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import TranslatedComponent from './TranslatedComponent';
|
import TranslatedComponent from './TranslatedComponent';
|
||||||
import { Ships } from 'coriolis-data/dist';
|
import { Ships } from 'coriolis-data/dist';
|
||||||
import { nameComparator } from '../utils/SlotFunctions';
|
import { nameComparator } from '../utils/SlotFunctions';
|
||||||
@@ -15,12 +16,12 @@ const DAMAGE_DEALT_COLORS = ['#FFFFFF', '#FF0000', '#00FF00', '#7777FF', '#FFFF0
|
|||||||
*/
|
*/
|
||||||
export default class WeaponDamageChart extends TranslatedComponent {
|
export default class WeaponDamageChart extends TranslatedComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
ship: React.PropTypes.object.isRequired,
|
ship: PropTypes.object.isRequired,
|
||||||
opponent: React.PropTypes.object.isRequired,
|
opponent: PropTypes.object.isRequired,
|
||||||
hull: React.PropTypes.bool.isRequired,
|
hull: PropTypes.bool.isRequired,
|
||||||
engagementRange: React.PropTypes.number.isRequired,
|
engagementRange: PropTypes.number.isRequired,
|
||||||
opponentSys: React.PropTypes.number.isRequired,
|
opponentSys: PropTypes.number.isRequired,
|
||||||
marker: React.PropTypes.string.isRequired
|
marker: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unexpected Error page / block
|
* Unexpected Error page / block
|
||||||
@@ -6,12 +7,12 @@ import React from 'react';
|
|||||||
export default class ErrorDetails extends React.Component {
|
export default class ErrorDetails extends React.Component {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
route: React.PropTypes.object.isRequired,
|
route: PropTypes.object.isRequired,
|
||||||
language: React.PropTypes.object.isRequired
|
language: PropTypes.object.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
error: React.PropTypes.object.isRequired
|
error: PropTypes.object.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import ErrorDetails from './ErrorDetails';
|
import ErrorDetails from './ErrorDetails';
|
||||||
import { shallowEqual } from '../utils/UtilityFunctions';
|
import { shallowEqual } from '../utils/UtilityFunctions';
|
||||||
|
|
||||||
@@ -8,22 +9,22 @@ import { shallowEqual } from '../utils/UtilityFunctions';
|
|||||||
export default class Page extends React.Component {
|
export default class Page extends React.Component {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
closeMenu: React.PropTypes.func.isRequired,
|
closeMenu: PropTypes.func.isRequired,
|
||||||
hideModal: React.PropTypes.func.isRequired,
|
hideModal: PropTypes.func.isRequired,
|
||||||
language: React.PropTypes.object.isRequired,
|
language: PropTypes.object.isRequired,
|
||||||
noTouch: React.PropTypes.bool.isRequired,
|
noTouch: PropTypes.bool.isRequired,
|
||||||
onCommand: React.PropTypes.func.isRequired,
|
onCommand: PropTypes.func.isRequired,
|
||||||
onWindowResize: React.PropTypes.func.isRequired,
|
onWindowResize: PropTypes.func.isRequired,
|
||||||
openMenu: React.PropTypes.func.isRequired,
|
openMenu: PropTypes.func.isRequired,
|
||||||
route: React.PropTypes.object.isRequired,
|
route: PropTypes.object.isRequired,
|
||||||
showModal: React.PropTypes.func.isRequired,
|
showModal: PropTypes.func.isRequired,
|
||||||
sizeRatio: React.PropTypes.number.isRequired,
|
sizeRatio: PropTypes.number.isRequired,
|
||||||
termtip: React.PropTypes.func.isRequired,
|
termtip: PropTypes.func.isRequired,
|
||||||
tooltip: React.PropTypes.func.isRequired
|
tooltip: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
currentMenu: React.PropTypes.any
|
currentMenu: PropTypes.any
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,7 +54,18 @@ function shipSummary(shipId, shipData) {
|
|||||||
summary.retailCost = ship.totalCost; // Record Stock/Default/retail cost
|
summary.retailCost = ship.totalCost; // Record Stock/Default/retail cost
|
||||||
ship.optimizeMass({ pd: '1D' }); // Optimize Mass with 1D PD for maximum possible jump range
|
ship.optimizeMass({ pd: '1D' }); // Optimize Mass with 1D PD for maximum possible jump range
|
||||||
summary.maxJumpRange = ship.unladenRange; // Record Jump Range
|
summary.maxJumpRange = ship.unladenRange; // Record Jump Range
|
||||||
ship.optimizeMass({ th: ship.standard[1].maxClass + 'A', fsd: '2D', ft: '1C' }); // Optmize mass with Max Thrusters
|
|
||||||
|
// Best thrusters
|
||||||
|
let th;
|
||||||
|
if (ship.standard[1].maxClass === 3) {
|
||||||
|
th = 'tz';
|
||||||
|
} else if (ship.standard[1].maxClass === 2) {
|
||||||
|
th = 'u0';
|
||||||
|
} else {
|
||||||
|
th = ship.standard[1].maxClass + 'A';
|
||||||
|
}
|
||||||
|
|
||||||
|
ship.optimizeMass({ th: th, fsd: '2D', ft: '1C' }); // Optmize mass with Max Thrusters
|
||||||
summary.topSpeed = ship.topSpeed;
|
summary.topSpeed = ship.topSpeed;
|
||||||
summary.topBoost = ship.topBoost;
|
summary.topBoost = ship.topBoost;
|
||||||
summary.baseArmour = ship.armour;
|
summary.baseArmour = ship.armour;
|
||||||
@@ -139,19 +150,22 @@ export default class ShipyardPage extends Page {
|
|||||||
className={cn({ highlighted: noTouch && this.state.shipId === s.id })}
|
className={cn({ highlighted: noTouch && this.state.shipId === s.id })}
|
||||||
onMouseEnter={noTouch && this._highlightShip.bind(this, s.id)}
|
onMouseEnter={noTouch && this._highlightShip.bind(this, s.id)}
|
||||||
>
|
>
|
||||||
<td className='le'>{s.manufacturer}</td>
|
<td className='ri'>{s.manufacturer}</td>
|
||||||
<td className='cap'>{translate(SizeMap[s.class])}</td>
|
<td className='ri'>{fInt(s.retailCost)}</td>
|
||||||
|
<td className='ri cap'>{translate(SizeMap[s.class])}</td>
|
||||||
|
<td className='ri'>{fInt(s.crew)}</td>
|
||||||
|
<td className='ri'>{s.masslock}</td>
|
||||||
<td className='ri'>{fInt(s.agility)}</td>
|
<td className='ri'>{fInt(s.agility)}</td>
|
||||||
<td className='ri'>{fInt(s.hardness)}</td>
|
<td className='ri'>{fInt(s.hardness)}</td>
|
||||||
<td className='ri'>{fInt(s.crew)}</td>
|
<td className='ri'>{fInt(s.hullMass)}</td>
|
||||||
<td className='ri'>{fInt(s.speed)}{u['m/s']}</td>
|
<td className='ri'>{fInt(s.speed)}</td>
|
||||||
<td className='ri'>{fInt(s.boost)}{u['m/s']}</td>
|
<td className='ri'>{fInt(s.boost)}</td>
|
||||||
<td className='ri'>{fInt(s.baseArmour)}</td>
|
<td className='ri'>{fInt(s.baseArmour)}</td>
|
||||||
<td className='ri'>{fInt(s.baseShieldStrength)}{u.MJ}</td>
|
<td className='ri'>{fInt(s.baseShieldStrength)}</td>
|
||||||
<td className='ri'>{fInt(s.topSpeed)}{u['m/s']}</td>
|
<td className='ri'>{fInt(s.topSpeed)}</td>
|
||||||
<td className='ri'>{fInt(s.topBoost)}{u['m/s']}</td>
|
<td className='ri'>{fInt(s.topBoost)}</td>
|
||||||
<td className='ri'>{fRound(s.maxJumpRange)}{u.LY}</td>
|
<td className='ri'>{fRound(s.maxJumpRange)}</td>
|
||||||
<td className='ri'>{fInt(s.maxCargo)}{u.T}</td>
|
<td className='ri'>{fInt(s.maxCargo)}</td>
|
||||||
<td className='cn'>{s.standard[0]}</td>
|
<td className='cn'>{s.standard[0]}</td>
|
||||||
<td className='cn'>{s.standard[1]}</td>
|
<td className='cn'>{s.standard[1]}</td>
|
||||||
<td className='cn'>{s.standard[2]}</td>
|
<td className='cn'>{s.standard[2]}</td>
|
||||||
@@ -171,9 +185,6 @@ export default class ShipyardPage extends Page {
|
|||||||
<td className={cn({ disabled: !s.int[5] })}>{s.int[5]}</td>
|
<td className={cn({ disabled: !s.int[5] })}>{s.int[5]}</td>
|
||||||
<td className={cn({ disabled: !s.int[6] })}>{s.int[6]}</td>
|
<td className={cn({ disabled: !s.int[6] })}>{s.int[6]}</td>
|
||||||
<td className={cn({ disabled: !s.int[7] })}>{s.int[7]}</td>
|
<td className={cn({ disabled: !s.int[7] })}>{s.int[7]}</td>
|
||||||
<td className='ri'>{fInt(s.hullMass)}{u.T}</td>
|
|
||||||
<td>{s.masslock}</td>
|
|
||||||
<td className='ri'>{fInt(s.retailCost)}{u.CR}</td>
|
|
||||||
</tr>;
|
</tr>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,7 +247,7 @@ export default class ShipyardPage extends Page {
|
|||||||
let detailRows = new Array(shipSummaries.length);
|
let detailRows = new Array(shipSummaries.length);
|
||||||
|
|
||||||
for (let s of shipSummaries) {
|
for (let s of shipSummaries) {
|
||||||
detailRows[i] = this._shipRowElement(s, translate, units, fInt, fRound);
|
detailRows[i] = this._shipRowElement(s, translate, units, fInt, formats.f1);
|
||||||
shipRows[i] = (
|
shipRows[i] = (
|
||||||
<tr
|
<tr
|
||||||
key={i}
|
key={i}
|
||||||
@@ -256,7 +267,7 @@ export default class ShipyardPage extends Page {
|
|||||||
<table style={{ width: '12em', position: 'absolute', zIndex: 1 }}>
|
<table style={{ width: '12em', position: 'absolute', zIndex: 1 }}>
|
||||||
<thead>
|
<thead>
|
||||||
<tr className='main'>
|
<tr className='main'>
|
||||||
<th style={{ height: '2.6em', padding: '2px 0.4em 1px' }} className='sortable le rgt' onClick={sortShips('name')}>{translate('ship')}</th>
|
<th style={{ height: '4.1em', padding: '2px 0.4em 1px' }} className='sortable le rgt' onClick={sortShips('name')}>{translate('ship')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody onMouseLeave={this._highlightShip.bind(this, null)}>
|
<tbody onMouseLeave={this._highlightShip.bind(this, null)}>
|
||||||
@@ -267,21 +278,23 @@ export default class ShipyardPage extends Page {
|
|||||||
<table style={{ marginLeft: 'calc(12em - 1px)', zIndex: 0 }}>
|
<table style={{ marginLeft: 'calc(12em - 1px)', zIndex: 0 }}>
|
||||||
<thead>
|
<thead>
|
||||||
<tr className='main'>
|
<tr className='main'>
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('manufacturer')}>{translate('manufacturer')}</th>
|
<th rowSpan={3} className='sortable' onClick={sortShips('manufacturer')}>{translate('manufacturer')}</th>
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('class')}>{translate('size')}</th>
|
<th> </th>
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('agility')}>{translate('agility')}</th>
|
<th rowSpan={3} className='sortable' onClick={sortShips('class')}>{translate('size')}</th>
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('hardness')}>{translate('hardness')}</th>
|
<th rowSpan={3} className='sortable' onClick={sortShips('crew')}>{translate('crew')}</th>
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('crew')}>{translate('crew')}</th>
|
<th rowSpan={3} className='sortable' onMouseEnter={termtip.bind(null, 'mass lock factor')} onMouseLeave={hide} onClick={sortShips('masslock')} >{translate('MLF')}</th>
|
||||||
|
<th rowSpan={3} className='sortable' onClick={sortShips('agility')}>{translate('agility')}</th>
|
||||||
|
<th rowSpan={3} className='sortable' onMouseEnter={termtip.bind(null, 'hardness')} onMouseLeave={hide} onClick={sortShips('hardness')}>{translate('hrd')}</th>
|
||||||
|
<th> </th>
|
||||||
<th colSpan={4}>{translate('base')}</th>
|
<th colSpan={4}>{translate('base')}</th>
|
||||||
<th colSpan={4}>{translate('max')}</th>
|
<th colSpan={4}>{translate('max')}</th>
|
||||||
<th colSpan={6}>{translate('core module classes')}</th>
|
<th className='lft' colSpan={6}></th>
|
||||||
<th colSpan={5} className='sortable' onClick={sortShips('hpCount')}>{translate('hardpoints')}</th>
|
<th className='lft' colSpan={5}></th>
|
||||||
<th colSpan={8} className='sortable' onClick={sortShips('intCount')}>{translate('internal compartments')}</th>
|
<th className='lft' colSpan={8}></th>
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('hullMass')}>{translate('hull')}</th>
|
|
||||||
<th rowSpan={2} className='sortable' onMouseEnter={termtip.bind(null, 'mass lock factor')} onMouseLeave={hide} onClick={sortShips('masslock')} >{translate('MLF')}</th>
|
|
||||||
<th rowSpan={2} className='sortable' onClick={sortShips('retailCost')}>{translate('cost')}</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th className='sortable lft' onClick={sortShips('retailCost')}>{translate('cost')}</th>
|
||||||
|
<th className='sortable lft' onClick={sortShips('hullMass')}>{translate('hull')}</th>
|
||||||
<th className='sortable lft' onClick={sortShips('speed')}>{translate('speed')}</th>
|
<th className='sortable lft' onClick={sortShips('speed')}>{translate('speed')}</th>
|
||||||
<th className='sortable' onClick={sortShips('boost')}>{translate('boost')}</th>
|
<th className='sortable' onClick={sortShips('boost')}>{translate('boost')}</th>
|
||||||
<th className='sortable' onClick={sortShips('baseArmour')}>{translate('armour')}</th>
|
<th className='sortable' onClick={sortShips('baseArmour')}>{translate('armour')}</th>
|
||||||
@@ -292,6 +305,21 @@ export default class ShipyardPage extends Page {
|
|||||||
<th className='sortable' onClick={sortShips('maxJumpRange')}>{translate('jump')}</th>
|
<th className='sortable' onClick={sortShips('maxJumpRange')}>{translate('jump')}</th>
|
||||||
<th className='sortable' onClick={sortShips('maxCargo')}>{translate('cargo')}</th>
|
<th className='sortable' onClick={sortShips('maxCargo')}>{translate('cargo')}</th>
|
||||||
|
|
||||||
|
<th className='lft' colSpan={6}>{translate('core module classes')}</th>
|
||||||
|
<th colSpan={5} className='sortable lft' onClick={sortShips('hpCount')}>{translate('hardpoints')}</th>
|
||||||
|
<th colSpan={8} className='sortable lft' onClick={sortShips('intCount')}>{translate('internal compartments')}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th className='sortable lft' onClick={sortShips('retailCost')}>{units.CR}</th>
|
||||||
|
<th className='sortable lft' onClick={sortShips('hullMass')}>{units.T}</th>
|
||||||
|
<th className='sortable lft' onClick={sortShips('speed')}>{units['m/s']}</th>
|
||||||
|
<th className='sortable' onClick={sortShips('boost')}>{units['m/s']}</th>
|
||||||
|
<th> </th>
|
||||||
|
<th className='sortable' onClick={sortShips('baseShieldStrength')}>{units.MJ}</th>
|
||||||
|
<th className='sortable lft' onClick={sortShips('topSpeed')}>{units['m/s']}</th>
|
||||||
|
<th className='sortable' onClick={sortShips('topBoost')}>{units['m/s']}</th>
|
||||||
|
<th className='sortable' onClick={sortShips('maxJumpRange')}>{units.LY}</th>
|
||||||
|
<th className='sortable' onClick={sortShips('maxCargo')}>{units.T}</th>
|
||||||
<th className='sortable lft' onMouseEnter={termtip.bind(null, 'power plant')} onMouseLeave={hide} onClick={sortShips('standard', 0)}>{'pp'}</th>
|
<th className='sortable lft' onMouseEnter={termtip.bind(null, 'power plant')} onMouseLeave={hide} onClick={sortShips('standard', 0)}>{'pp'}</th>
|
||||||
<th className='sortable' onMouseEnter={termtip.bind(null, 'thrusters')} onMouseLeave={hide} onClick={sortShips('standard', 1)}>{'th'}</th>
|
<th className='sortable' onMouseEnter={termtip.bind(null, 'thrusters')} onMouseLeave={hide} onClick={sortShips('standard', 1)}>{'th'}</th>
|
||||||
<th className='sortable' onMouseEnter={termtip.bind(null, 'frame shift drive')} onMouseLeave={hide} onClick={sortShips('standard', 2)}>{'fsd'}</th>
|
<th className='sortable' onMouseEnter={termtip.bind(null, 'frame shift drive')} onMouseLeave={hide} onClick={sortShips('standard', 2)}>{'fsd'}</th>
|
||||||
|
|||||||
Reference in New Issue
Block a user