Hotfix pip parsing in control code

This commit is contained in:
felixlinker
2018-12-05 20:31:46 +00:00
parent bbba048129
commit 194db07057

View File

@@ -224,9 +224,12 @@ export default class OutfittingPage extends Page {
const control = LZString.decompressFromBase64(
Utils.fromUrlSafe(parts[4])
).split('/');
sys = parseFloat(control[0]) || sys;
eng = parseFloat(control[1]) || eng;
wep = parseFloat(control[2]) || wep;
sys = parseFloat(control[0]);
eng = parseFloat(control[1]);
wep = parseFloat(control[2]);
if (sys + eng + wep > 6) {
sys = eng = wep = 2;
}
boost = control[3] == 1 ? true : false;
fuel = parseFloat(control[4]) || fuel;
cargo = parseInt(control[5]) || cargo;