diff --git a/src/app/Coriolis.jsx b/src/app/Coriolis.jsx index 9408afbd..5d676b5e 100644 --- a/src/app/Coriolis.jsx +++ b/src/app/Coriolis.jsx @@ -11,7 +11,6 @@ import ModalHelp from './components/ModalHelp'; import ModalImport from './components/ModalImport'; import ModalPermalink from './components/ModalPermalink'; import * as CompanionApiUtils from './utils/CompanionApiUtils'; -import { outfitURL } from './utils/UrlGenerators'; import AboutPage from './pages/AboutPage'; import NotFoundPage from './pages/NotFoundPage'; diff --git a/src/app/components/ComparisonTable.jsx b/src/app/components/ComparisonTable.jsx index f93064d3..e8819d3c 100644 --- a/src/app/components/ComparisonTable.jsx +++ b/src/app/components/ComparisonTable.jsx @@ -3,7 +3,6 @@ import TranslatedComponent from './TranslatedComponent'; import Link from './Link'; import cn from 'classnames'; import { outfitURL } from '../utils/UrlGenerators'; -import { SizeMap } from '../shipyard/Constants'; /** diff --git a/src/app/components/Modification.jsx b/src/app/components/Modification.jsx index 9b7a53b9..15cf5a44 100644 --- a/src/app/components/Modification.jsx +++ b/src/app/components/Modification.jsx @@ -1,5 +1,4 @@ import React from 'react'; -import { findDOMNode } from 'react-dom'; import TranslatedComponent from './TranslatedComponent'; import cn from 'classnames'; import NumberEditor from 'react-number-editor'; diff --git a/src/app/components/ModificationsMenu.jsx b/src/app/components/ModificationsMenu.jsx index 9bef6235..76e088ad 100644 --- a/src/app/components/ModificationsMenu.jsx +++ b/src/app/components/ModificationsMenu.jsx @@ -1,10 +1,8 @@ import React from 'react'; import * as _ from 'lodash'; -import { findDOMNode } from 'react-dom'; import TranslatedComponent from './TranslatedComponent'; import { isEmpty, stopCtxPropagation } from '../utils/UtilityFunctions'; import cn from 'classnames'; -import { MountFixed, MountGimballed, MountTurret } from './SvgIcons'; import { Modifications } from 'coriolis-data/dist'; import Modification from './Modification'; @@ -44,8 +42,8 @@ export default class ModificationsMenu extends TranslatedComponent { * @return {Object} list: Array of React Components */ _initState(props, context) { - let { m, onChange, ship } = props; - const { language, tooltip, termtip } = context; + let { m } = props; + const { language } = context; const translate = language.translate; // Set up the blueprints @@ -267,7 +265,6 @@ export default class ModificationsMenu extends TranslatedComponent { } let specialLabel; - let haveSpecial = false; if (m.blueprint && m.blueprint.special) { specialLabel = m.blueprint.special.name; } else { diff --git a/src/app/components/MovementSummary.jsx b/src/app/components/MovementSummary.jsx index 4b6f25df..adc3974e 100644 --- a/src/app/components/MovementSummary.jsx +++ b/src/app/components/MovementSummary.jsx @@ -26,7 +26,6 @@ export default class MovementSummary extends TranslatedComponent { let ship = this.props.ship; let { language, tooltip, termtip } = this.context; let { formats, translate, units } = language; - let hide = tooltip.bind(null, null); let boostMultiplier = ship.topBoost / ship.topSpeed; return ( diff --git a/src/app/components/PowerBands.jsx b/src/app/components/PowerBands.jsx index 0eff67bb..d8dd8a5e 100644 --- a/src/app/components/PowerBands.jsx +++ b/src/app/components/PowerBands.jsx @@ -186,9 +186,9 @@ export default class PowerBands extends TranslatedComponent { let { wattScale, pctScale, context, props, state } = this; let { translate, formats } = context.language; - let { f2, pct1, rPct, r2 } = formats; // wattFmt, pctFmt, pctAxis, wattAxis - let { available, bands, width } = props; - let { innerWidth, maxPwr, ret, dep } = state; + let { f2, pct1 } = formats; // wattFmt, pctFmt + let { available, bands } = props; + let { innerWidth, ret, dep } = state; let pwrWarningClass = cn('threshold', { exceeded: bands[0].retractedSum * 2 >= available }); let deployed = []; let retracted = []; diff --git a/src/app/components/ShipSelector.jsx b/src/app/components/ShipSelector.jsx index 75a6ee92..34f11786 100644 --- a/src/app/components/ShipSelector.jsx +++ b/src/app/components/ShipSelector.jsx @@ -29,7 +29,6 @@ export default class ShipSelector extends TranslatedComponent { */ _getShipsMenu() { const _selectShip = this._selectShip; - const _openMenu = this._openMenu; let shipList = []; diff --git a/src/app/components/ShipSummaryTable.jsx b/src/app/components/ShipSummaryTable.jsx index cf627f3e..651f9a9f 100644 --- a/src/app/components/ShipSummaryTable.jsx +++ b/src/app/components/ShipSummaryTable.jsx @@ -1,7 +1,6 @@ import React from 'react'; import TranslatedComponent from './TranslatedComponent'; import cn from 'classnames'; -import { SizeMap } from '../shipyard/Constants'; import { Warning } from './SvgIcons'; /** @@ -23,7 +22,7 @@ export default class ShipSummaryTable extends TranslatedComponent { let translate = language.translate; let u = language.units; let formats = language.formats; - let { time, int, round, f1, f2, pct } = formats; + let { time, int, round, f1, f2 } = formats; let sgClassNames = cn({ warning: ship.findInternalByGroup('sg') && !ship.shield, muted: !ship.findInternalByGroup('sg') }); let sgRecover = '-'; let sgRecharge = '-'; diff --git a/src/app/components/Slot.jsx b/src/app/components/Slot.jsx index b1c66ba1..9959a16f 100644 --- a/src/app/components/Slot.jsx +++ b/src/app/components/Slot.jsx @@ -3,8 +3,6 @@ import TranslatedComponent from './TranslatedComponent'; import cn from 'classnames'; import AvailableModulesMenu from './AvailableModulesMenu'; import ModificationsMenu from './ModificationsMenu'; -import { Modifications } from 'coriolis-data/dist'; -import { ListModifications } from './SvgIcons'; import { diffDetails } from '../utils/SlotFunctions'; import { wrapCtxMenu } from '../utils/UtilityFunctions'; import { stopCtxPropagation } from '../utils/UtilityFunctions'; diff --git a/src/app/components/StandardSlot.jsx b/src/app/components/StandardSlot.jsx index f0e372fc..28d9d16c 100644 --- a/src/app/components/StandardSlot.jsx +++ b/src/app/components/StandardSlot.jsx @@ -2,7 +2,6 @@ import React from 'react'; import cn from 'classnames'; import Persist from '../stores/Persist'; import TranslatedComponent from './TranslatedComponent'; -import { jumpRange } from '../shipyard/Calculations'; import { diffDetails } from '../utils/SlotFunctions'; import AvailableModulesMenu from './AvailableModulesMenu'; import ModificationsMenu from './ModificationsMenu'; diff --git a/src/app/components/StandardSlotSection.jsx b/src/app/components/StandardSlotSection.jsx index 23fe2b63..54cdf08e 100644 --- a/src/app/components/StandardSlotSection.jsx +++ b/src/app/components/StandardSlotSection.jsx @@ -3,7 +3,6 @@ import cn from 'classnames'; import SlotSection from './SlotSection'; import StandardSlot from './StandardSlot'; import Module from '../shipyard/Module'; -import { diffDetails } from '../utils/SlotFunctions'; import * as ShipRoles from '../shipyard/ShipRoles'; import { stopCtxPropagation } from '../utils/UtilityFunctions'; diff --git a/src/app/shipyard/Module.js b/src/app/shipyard/Module.js index 7f357f51..92f21771 100755 --- a/src/app/shipyard/Module.js +++ b/src/app/shipyard/Module.js @@ -1,5 +1,4 @@ import * as ModuleUtils from './ModuleUtils'; -import * as _ from 'lodash'; import { Modifications } from 'coriolis-data/dist'; /** diff --git a/src/app/shipyard/Serializer.js b/src/app/shipyard/Serializer.js index c71122f0..566d5c30 100644 --- a/src/app/shipyard/Serializer.js +++ b/src/app/shipyard/Serializer.js @@ -1,15 +1,10 @@ import { ModuleGroupToName, MountMap, BulkheadNames } from './Constants'; import { Ships } from 'coriolis-data/dist'; import Ship from './Ship'; -import * as ModuleUtils from './ModuleUtils'; import * as Utils from '../utils/UtilityFunctions'; import LZString from 'lz-string'; import { outfitURL } from '../utils/UrlGenerators'; -const STANDARD = ['powerPlant', 'thrusters', 'frameShiftDrive', 'lifeSupport', 'powerDistributor', 'sensors', 'fuelTank']; - -const STANDARD_GROUPS = { 'powerPlant': 'pp', 'thrusters': 't', 'frameShiftDrive': 'fsd', 'lifeSupport': 'ls', 'powerDistributor': 'pd', 'sensors': 's', 'fuelTank': 'ft' }; - /** * Generates ship-loadout JSON Schema standard object * @param {Object} standard model diff --git a/src/app/shipyard/Ship.js b/src/app/shipyard/Ship.js index 216ddade..e369f259 100755 --- a/src/app/shipyard/Ship.js +++ b/src/app/shipyard/Ship.js @@ -835,7 +835,6 @@ export default class Ship { */ setSlotPriority(slot, newPriority) { if (newPriority >= 0 && newPriority < this.priorityBands.length) { - let oldPriority = slot.priority; slot.priority = newPriority; this.updatePowerPrioritesString(); @@ -1437,7 +1436,6 @@ export default class Ship { let bulkheadMods = new Array(); let bulkheadBlueprint = null; - let bulkheadBlueprintGrade = null; if (this.bulkheads.m && this.bulkheads.m.mods) { for (let modKey in this.bulkheads.m.mods) { // Filter out invalid modifications diff --git a/src/app/utils/CompanionApiUtils.js b/src/app/utils/CompanionApiUtils.js index c55e334a..461886cb 100644 --- a/src/app/utils/CompanionApiUtils.js +++ b/src/app/utils/CompanionApiUtils.js @@ -243,7 +243,6 @@ export function shipFromJson(json) { let internalSlotNum = 1; let militarySlotNum = 1; for (let i in shipTemplate.slots.internal) { - const internalClassNum = isNaN(shipTemplate.slots.internal[i]) ? shipTemplate.slots.internal[i].class : shipTemplate.slots.internal[i]; const isMilitary = isNaN(shipTemplate.slots.internal[i]) ? shipTemplate.slots.internal[i].name == 'Military' : false; // The internal slot might be a standard or a military slot. Military slots have a different naming system