This commit is contained in:
Cmdr McDonald
2016-11-02 10:47:10 +00:00
parent b3c82ac2de
commit 35538f971a
7 changed files with 4 additions and 13 deletions

View File

@@ -99,7 +99,7 @@ export default class InternalSlotSection extends SlotSection {
let slots = [];
let { currentMenu, ship } = this.props;
let { originSlot, targetSlot } = this.state;
let { internal, fuelCapacity, ladenMass } = ship;
let { internal, fuelCapacity } = ship;
let availableModules = ship.getAvailableModules();
for (let i = 0, l = internal.length; i < l; i++) {

View File

@@ -7,8 +7,6 @@ import { MountFixed, MountGimballed, MountTurret } from './SvgIcons';
import { Modifications } from 'coriolis-data/dist';
import Modification from './Modification';
const PRESS_THRESHOLD = 500; // mouse/touch down threshold
/**
* Modifications menu
*/
@@ -37,8 +35,6 @@ export default class ModificationsMenu extends TranslatedComponent {
* @return {Object} list: Array of React Components
*/
_initState(props, context) {
let translate = context.language.translate;
let formats = context.language.formats;
let { m, onChange, ship } = props;
let list = [];

View File

@@ -79,11 +79,9 @@ export default class Slot extends TranslatedComponent {
*/
render() {
let language = this.context.language;
let { termtip, tooltip } = this.context;
let translate = language.translate;
let { ship, m, dropClass, dragOver, onOpen, onChange, selected, eligible, onSelect, warning, shipMass, availableModules } = this.props;
let { ship, m, dropClass, dragOver, onOpen, onChange, selected, eligible, onSelect, warning, availableModules } = this.props;
let slotDetails, menu;
let validMods = m == null ? [] : (Modifications.validity[m.grp] || []);
if (!selected) {
// If not selected then sure that modifications flag is unset

View File

@@ -41,7 +41,7 @@ export default class StandardSlot extends TranslatedComponent {
render() {
let { termtip, tooltip } = this.context;
let { translate, formats, units } = this.context.language;
let { modules, slot, selected, warning, onSelect, onChange, ladenMass, ship } = this.props;
let { modules, slot, selected, warning, onSelect, onChange, ship } = this.props;
let m = slot.m;
let classRating = m.class + m.rating;
let menu;

View File

@@ -86,12 +86,10 @@ export default class StandardSlotSection extends SlotSection {
* @return {Array} Array of Slots
*/
_getSlots() {
let { translate, units, formats } = this.context.language;
let { ship, currentMenu } = this.props;
let slots = new Array(8);
let open = this._openMenu;
let select = this._selectModule;
let selBulkhead = this._selectBulkhead;
let st = ship.standard;
let avail = ship.getAvailableModules().standard;
let bh = ship.bulkheads;

View File

@@ -151,7 +151,6 @@ export default class Module {
*/
getHeatPerSecond() {
// Modifier for hps is thermload
return this._getModifiedValue('hps');
let result = 0;
if (this['hps']) {
result = this['hps'];

View File

@@ -888,7 +888,7 @@ export default class Ship {
*/
updateJumpStats() {
let fsd = this.standard[2].m; // Frame Shift Drive;
let { unladenMass, ladenMass, fuelCapacity } = this;
let { unladenMass, fuelCapacity } = this;
this.unladenRange = this.calcUnladenRange(); // Includes fuel weight for jump
this.fullTankRange = Calc.jumpRange(unladenMass + fuelCapacity, fsd); // Full Tank
this.ladenRange = this.calcLadenRange(); // Includes full tank and caro