inital engineerless import working

This commit is contained in:
willyb321
2018-03-23 08:51:48 +11:00
parent 5e1237390b
commit a996b8135a
5 changed files with 77 additions and 88 deletions

View File

@@ -73,13 +73,10 @@ export default class OutfittingPage extends Page {
let buildName = params.bn;
let data = Ships[shipId]; // Retrieve the basic ship properties, slots and defaults
let savedCode = Persist.getBuild(shipId, buildName);
if (!data) {
return { error: { message: 'Ship not found: ' + shipId } };
}
let ship = new Ship(shipId, data.properties, data.slots); // Create a new Ship instance
if (code) {
ship.buildFrom(code); // Populate modules from serialized 'code' URL param
} else {