mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
lint a tad
This commit is contained in:
@@ -38,7 +38,7 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert mats object to string
|
* Find all blueprints needed to make a build.
|
||||||
*/
|
*/
|
||||||
registerBPs() {
|
registerBPs() {
|
||||||
const ship = this.props.ship;
|
const ship = this.props.ship;
|
||||||
@@ -52,6 +52,9 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const g in module.m.blueprint.grades) {
|
for (const g in module.m.blueprint.grades) {
|
||||||
|
if (!module.m.blueprint.grades.hasOwnProperty(g)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (g > module.m.blueprint.grade) {
|
if (g > module.m.blueprint.grade) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -64,7 +67,7 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send all blueprints to ED Engineer
|
* Send all blueprints to ED Engineer
|
||||||
* @param {SyntheticEvent} event React event
|
* @param {Event} event React event
|
||||||
*/
|
*/
|
||||||
sendToEDEng(event) {
|
sendToEDEng(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -78,7 +81,7 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
.patch(`http://localhost:44405/${this.state.cmdrName}/shopping-list`)
|
.patch(`http://localhost:44405/${this.state.cmdrName}/shopping-list`)
|
||||||
.field('uuid', i.blueprint.uuid)
|
.field('uuid', i.blueprint.uuid)
|
||||||
.field('size', i.number)
|
.field('size', i.number)
|
||||||
.end((err, res) => {
|
.end(err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
if (err.message !== 'Bad Request') {
|
if (err.message !== 'Bad Request') {
|
||||||
@@ -109,10 +112,16 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const g in module.m.blueprint.grades) {
|
for (const g in module.m.blueprint.grades) {
|
||||||
|
if (!module.m.blueprint.grades.hasOwnProperty(g)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (g > module.m.blueprint.grade) {
|
if (g > module.m.blueprint.grade) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const i in module.m.blueprint.grades[g].components) {
|
for (const i in module.m.blueprint.grades[g].components) {
|
||||||
|
if (!module.m.blueprint.grades[g].components.hasOwnProperty(i)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (mats[i]) {
|
if (mats[i]) {
|
||||||
mats[i] += module.m.blueprint.grades[g].components[i] * this.state.matsPerGrade[g];
|
mats[i] += module.m.blueprint.grades[g].components[i] * this.state.matsPerGrade[g];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user