Lint tidy-ups

This commit is contained in:
Cmdr McDonald
2016-11-09 16:40:22 +00:00
parent 38eaebefc0
commit f13a987388
3 changed files with 13 additions and 5 deletions

View File

@@ -419,8 +419,8 @@ export default class CostSection extends TranslatedComponent {
let retroSlotGroup = retrofitShip[g]; let retroSlotGroup = retrofitShip[g];
let slotGroup = ship[g]; let slotGroup = ship[g];
for (i = 0, l = slotGroup.length; i < l; i++) { for (i = 0, l = slotGroup.length; i < l; i++) {
const modId = slotGroup[i].m ? slotGroup[i].m.eddbID : null; const modId = slotGroup[i].m ? slotGroup[i].m.eddbID : null;
const retroModId = retroSlotGroup[i].m ? retroSlotGroup[i].m.eddbID : null; const retroModId = retroSlotGroup[i].m ? retroSlotGroup[i].m.eddbID : null;
if (modId != retroModId) { if (modId != retroModId) {
item = { netCost: 0, retroItem: retroSlotGroup[i] }; item = { netCost: 0, retroItem: retroSlotGroup[i] };
if (slotGroup[i].m) { if (slotGroup[i].m) {

View File

@@ -115,7 +115,7 @@ export default class StandardSlotSection extends SlotSection {
selected={currentMenu == st[0]} selected={currentMenu == st[0]}
onChange={this.props.onChange} onChange={this.props.onChange}
ship={ship} ship={ship}
warning={m => m instanceof Module ? m.getPowerGeneration() < ship.powerRetracted : m.pgen< ship.powerRetracted} warning={m => m instanceof Module ? m.getPowerGeneration() < ship.powerRetracted : m.pgen < ship.powerRetracted}
/>; />;
slots[2] = <StandardSlot slots[2] = <StandardSlot

View File

@@ -423,14 +423,16 @@ export default class Ship {
this.updateJumpStats(); this.updateJumpStats();
} else if (name == 'optmass') { } else if (name == 'optmass') {
m.setModValue(name, value); m.setModValue(name, value);
// Could be for either thrusters or FSD // Could be for any of thrusters, FSD or shield
this.updateTopSpeed(); this.updateTopSpeed();
this.updateJumpStats(); this.updateJumpStats();
this.updateShield();
} else if (name == 'optmul') { } else if (name == 'optmul') {
m.setModValue(name, value); m.setModValue(name, value);
// Could be for either thrusters or FSD // Could be for any of thrusters, FSD or shield
this.updateTopSpeed(); this.updateTopSpeed();
this.updateJumpStats(); this.updateJumpStats();
this.updateShield();
} else if (name == 'shieldboost') { } else if (name == 'shieldboost') {
m.setModValue(name, value); m.setModValue(name, value);
this.updateShield(); this.updateShield();
@@ -838,6 +840,8 @@ export default class Ship {
} }
} }
this.totalDps = totalDps; this.totalDps = totalDps;
return this;
} }
/** /**
@@ -854,6 +858,8 @@ export default class Ship {
} }
} }
this.totalHps = totalHps; this.totalHps = totalHps;
return this;
} }
/** /**
@@ -870,6 +876,8 @@ export default class Ship {
} }
} }
this.totalEps = totalEps; this.totalEps = totalEps;
return this;
} }
/** /**