mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 14:33:22 +00:00
Some more attempts
This commit is contained in:
17
package-lock.json
generated
17
package-lock.json
generated
@@ -1983,6 +1983,11 @@
|
||||
"integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
|
||||
"dev": true
|
||||
},
|
||||
"clamp": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz",
|
||||
"integrity": "sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ="
|
||||
},
|
||||
"clap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz",
|
||||
@@ -10179,6 +10184,11 @@
|
||||
"object-assign": "4.1.1"
|
||||
}
|
||||
},
|
||||
"react-clickdrag": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/react-clickdrag/-/react-clickdrag-3.0.2.tgz",
|
||||
"integrity": "sha1-VN9fPfbWlcVOmXigglP4PedhG9I="
|
||||
},
|
||||
"react-dom": {
|
||||
"version": "15.6.2",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.2.tgz",
|
||||
@@ -10201,6 +10211,13 @@
|
||||
"resize-observer-polyfill": "1.4.2"
|
||||
}
|
||||
},
|
||||
"react-number-editor": {
|
||||
"version": "github:Athanasius/react-number-editor#b6ff7b549425c87afca34dccdaa5e4cc59f9fd30",
|
||||
"requires": {
|
||||
"clamp": "1.0.1",
|
||||
"react-clickdrag": "3.0.2"
|
||||
}
|
||||
},
|
||||
"react-resize-detector": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/react-resize-detector/-/react-resize-detector-0.4.1.tgz",
|
||||
|
||||
@@ -73,9 +73,10 @@ export default class OutfittingPage extends Page {
|
||||
let remoteID = params.remote;
|
||||
|
||||
if (remoteID) { // Remote instance, fetch data.
|
||||
Axios.get('https://orbis.zone/api/ships/' + remoteID + '/fdev')
|
||||
Axios.get('http://127.0.0.1:8081/api/ships/' + remoteID + '/fdev')
|
||||
.then((response) => {
|
||||
let remote = response.data;
|
||||
let buildName = params.bn;
|
||||
|
||||
let shipId = SHIP_FD_NAME_TO_CORIOLIS_NAME[remote.Ship];
|
||||
let data = Ships[shipId];
|
||||
@@ -94,6 +95,8 @@ export default class OutfittingPage extends Page {
|
||||
error: null,
|
||||
title: this._getTitle(buildName),
|
||||
costTab: Persist.getCostTab() || 'costs',
|
||||
buildName,
|
||||
newBuildName: buildName,
|
||||
shipId,
|
||||
ship,
|
||||
sys,
|
||||
@@ -108,10 +111,10 @@ export default class OutfittingPage extends Page {
|
||||
opponentEng,
|
||||
opponentWep,
|
||||
engagementRange
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch((err) => {
|
||||
return { error: { message: 'Issue communicating with remote server'}};
|
||||
this.state = { error: { message: 'Issue communicating with remote server'}};
|
||||
})
|
||||
} else {
|
||||
let shipId = params.ship;
|
||||
|
||||
@@ -785,6 +785,14 @@ export default class Ship {
|
||||
);
|
||||
};
|
||||
|
||||
buildFromLoadout(Modules) {
|
||||
let internal = this.internal,
|
||||
standard = this.standard,
|
||||
hps = this.hardpoints,
|
||||
cl = standard.length,
|
||||
i, l;
|
||||
}
|
||||
|
||||
/**
|
||||
* Empties all hardpoints and utility slots
|
||||
* @return {this} The current ship instance for chaining
|
||||
|
||||
Reference in New Issue
Block a user