From 82c546093669a5ad14b8d748082e84eb786e4fd6 Mon Sep 17 00:00:00 2001 From: kchang Date: Tue, 28 Jul 2015 23:21:46 -0700 Subject: [PATCH 1/6] Shortcut to A-rated common components and shield generator --- app/js/controllers/controller-outfit.js | 26 +++++++++++++++++++++++++ app/views/page-outfit.html | 3 +++ 2 files changed, 29 insertions(+) diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index d7c0e865..e2b6c142 100755 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -174,6 +174,32 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' } }; + /** + * Strip ship to A-class and A-class shield generator. + */ + $scope.aRatedBuild = function() { + ship.buildWith(data.defaults); // Reset build to default -- lazy hack to find shield slot + var sgSlot = 0; + var sgId = 0; + ship.internal.forEach(function(slot) { + // TODO: equip biggest A-rated shield in highest slot instead + if (slot.c && (slot.c.grp == 'sg')) { + sgSlot = ship.internal.indexOf(slot); + // Dirty hack using char decrement to get to A rated shield from default E + sgId = slot.c.id.charAt(0) + String.fromCharCode(slot.c.id.charCodeAt(1) - 4); + } + }); + for (var i = 0, l = ship.common.length - 1; i < l; i++) { // All except Fuel Tank + var id = ship.common[i].maxClass + 'A'; + ship.use(ship.common[i], id, Components.common(i, id)); + } + ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); }); + ship.internal.forEach(function(slot) { ship.use(slot, null, null); }); + ship.use(ship.internal[sgSlot], sgId, Components.internal(sgId)); + ship.useBulkhead(0); + updateState(Serializer.fromShip(ship)); + }; + /** * Strip ship to D-class and no other components. */ diff --git a/app/views/page-outfit.html b/app/views/page-outfit.html index faf4f282..adda08d1 100644 --- a/app/views/page-outfit.html +++ b/app/views/page-outfit.html @@ -16,6 +16,9 @@ + From 95adca5cdea60d7fe16658b8d522f9ad9a07b549 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Thu, 30 Jul 2015 18:54:57 -0700 Subject: [PATCH 2/6] Incremented all shield cell bank counts -- "Munitions" tab shows actual cell counts --- .../components/internal/shield_cell_bank.json | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/data/components/internal/shield_cell_bank.json b/data/components/internal/shield_cell_bank.json index d728ce9d..c4883385 100755 --- a/data/components/internal/shield_cell_bank.json +++ b/data/components/internal/shield_cell_bank.json @@ -1,44 +1,44 @@ { "Shield Cell Bank": [ - { "id": "65", "grp": "scb", "class": 8, "rating": "E", "cost": 697584, "mass": 160, "power": 1.44, "cells": 5, "rechargeRating": "C", "recharge": 0 }, - { "id": "64", "grp": "scb", "class": 8, "rating": "D", "cost": 1743961, "mass": 64, "power": 1.92, "cells": 3, "rechargeRating": "C", "recharge": 0 }, - { "id": "63", "grp": "scb", "class": 8, "rating": "C", "cost": 4359903, "mass": 160, "power": 2.4, "cells": 4, "rechargeRating": "B", "recharge": 0 }, - { "id": "62", "grp": "scb", "class": 8, "rating": "B", "cost": 10899756, "mass": 256, "power": 2.88, "cells": 5, "rechargeRating": "A", "recharge": 0 }, - { "id": "61", "grp": "scb", "class": 8, "rating": "A", "cost": 27249391, "mass": 160, "power": 3.36, "cells": 4, "rechargeRating": "A", "recharge": 0 }, - { "id": "60", "grp": "scb", "class": 7, "rating": "E", "cost": 249137, "mass": 80, "power": 1.24, "cells": 5, "rechargeRating": "D", "recharge": 97 }, - { "id": "5v", "grp": "scb", "class": 7, "rating": "D", "cost": 622843, "mass": 32, "power": 1.66, "cells": 3, "rechargeRating": "C", "recharge": 130 }, - { "id": "5u", "grp": "scb", "class": 7, "rating": "C", "cost": 1557108, "mass": 80, "power": 2.07, "cells": 4, "rechargeRating": "B", "recharge": 163 }, - { "id": "5t", "grp": "scb", "class": 7, "rating": "B", "cost": 3892770, "mass": 128, "power": 2.48, "cells": 5, "rechargeRating": "B", "recharge": 197 }, - { "id": "5s", "grp": "scb", "class": 7, "rating": "A", "cost": 9731925, "mass": 80, "power": 2.9, "cells": 4, "rechargeRating": "A", "recharge": 230 }, - { "id": "5r", "grp": "scb", "class": 6, "rating": "E", "cost": 88978, "mass": 40, "power": 1.06, "cells": 5, "rechargeRating": "D", "recharge": 92 }, - { "id": "5q", "grp": "scb", "class": 6, "rating": "D", "cost": 222444, "mass": 16, "power": 1.42, "cells": 3, "rechargeRating": "C", "recharge": 120 }, - { "id": "5p", "grp": "scb", "class": 6, "rating": "C", "cost": 556110, "mass": 40, "power": 1.77, "cells": 4, "rechargeRating": "C", "recharge": 148 }, - { "id": "5o", "grp": "scb", "class": 6, "rating": "B", "cost": 1390275, "mass": 64, "power": 2.12, "cells": 5, "rechargeRating": "B", "recharge": 176 }, - { "id": "5n", "grp": "scb", "class": 6, "rating": "A", "cost": 3475688, "mass": 40, "power": 2.48, "cells": 4, "rechargeRating": "A", "recharge": 204 }, - { "id": "5m", "grp": "scb", "class": 5, "rating": "E", "cost": 31778, "mass": 20, "power": 0.9, "cells": 4, "rechargeRating": "D", "recharge": 82 }, - { "id": "5l", "grp": "scb", "class": 5, "rating": "D", "cost": 79444, "mass": 8, "power": 1.2, "cells": 2, "rechargeRating": "C", "recharge": 109 }, - { "id": "5k", "grp": "scb", "class": 5, "rating": "C", "cost": 198611, "mass": 20, "power": 1.5, "cells": 3, "rechargeRating": "C", "recharge": 135 }, - { "id": "5j", "grp": "scb", "class": 5, "rating": "B", "cost": 496527, "mass": 32, "power": 1.8, "cells": 4, "rechargeRating": "B", "recharge": 162 }, - { "id": "5i", "grp": "scb", "class": 5, "rating": "A", "cost": 1241317, "mass": 20, "power": 2.1, "cells": 3, "rechargeRating": "B", "recharge": 189 }, - { "id": "5h", "grp": "scb", "class": 4, "rating": "E", "cost": 11349, "mass": 10, "power": 0.74, "cells": 4, "rechargeRating": "D", "recharge": 72 }, - { "id": "5g", "grp": "scb", "class": 4, "rating": "D", "cost": 28373, "mass": 4, "power": 0.98, "cells": 2, "rechargeRating": "D", "recharge": 94 }, - { "id": "5f", "grp": "scb", "class": 4, "rating": "C", "cost": 70932, "mass": 10, "power": 1.23, "cells": 3, "rechargeRating": "C", "recharge": 117 }, - { "id": "5e", "grp": "scb", "class": 4, "rating": "B", "cost": 177331, "mass": 16, "power": 1.48, "cells": 4, "rechargeRating": "C", "recharge": 140 }, - { "id": "5d", "grp": "scb", "class": 4, "rating": "A", "cost": 443328, "mass": 10, "power": 1.72, "cells": 3, "rechargeRating": "B", "recharge": 163 }, - { "id": "5c", "grp": "scb", "class": 3, "rating": "E", "cost": 4053, "mass": 5, "power": 0.61, "cells": 4, "rechargeRating": "D", "recharge": 61 }, - { "id": "5b", "grp": "scb", "class": 3, "rating": "D", "cost": 10133, "mass": 2, "power": 0.82, "cells": 2, "rechargeRating": "D", "recharge": 80 }, - { "id": "5a", "grp": "scb", "class": 3, "rating": "C", "cost": 25333, "mass": 5, "power": 1.02, "cells": 3, "rechargeRating": "D", "recharge": 100 }, - { "id": "59", "grp": "scb", "class": 3, "rating": "B", "cost": 63333, "mass": 8, "power": 1.22, "cells": 4, "rechargeRating": "C", "recharge": 119 }, - { "id": "58", "grp": "scb", "class": 3, "rating": "A", "cost": 158331, "mass": 5, "power": 1.43, "cells": 3, "rechargeRating": "C", "recharge": 138 }, - { "id": "57", "grp": "scb", "class": 2, "rating": "E", "cost": 1448, "mass": 2.5, "power": 0.5, "cells": 4, "rechargeRating": "E", "recharge": 46 }, - { "id": "56", "grp": "scb", "class": 2, "rating": "D", "cost": 3619, "mass": 1, "power": 0.67, "cells": 2, "rechargeRating": "D", "recharge": 61 }, - { "id": "55", "grp": "scb", "class": 2, "rating": "C", "cost": 9048, "mass": 2.5, "power": 0.84, "cells": 3, "rechargeRating": "D", "recharge": 77 }, - { "id": "54", "grp": "scb", "class": 2, "rating": "B", "cost": 22619, "mass": 4, "power": 1.01, "cells": 4, "rechargeRating": "D", "recharge": 92 }, - { "id": "53", "grp": "scb", "class": 2, "rating": "A", "cost": 56547, "mass": 2.5, "power": 1.18, "cells": 3, "rechargeRating": "C", "recharge": 107 }, - { "id": "52", "grp": "scb", "class": 1, "rating": "E", "cost": 517, "mass": 1.3, "power": 0.41, "cells": 3, "rechargeRating": "E", "recharge": 31 }, - { "id": "51", "grp": "scb", "class": 1, "rating": "D", "cost": 1293, "mass": 0.5, "power": 0.55, "cells": 1, "rechargeRating": "E", "recharge": 41 }, - { "id": "50", "grp": "scb", "class": 1, "rating": "C", "cost": 3231, "mass": 1.3, "power": 0.69, "cells": 2, "rechargeRating": "D", "recharge": 51 }, - { "id": "4v", "grp": "scb", "class": 1, "rating": "B", "cost": 8078, "mass": 2, "power": 0.83, "cells": 3, "rechargeRating": "D", "recharge": 61 }, - { "id": "4u", "grp": "scb", "class": 1, "rating": "A", "cost": 20195, "mass": 1.3, "power": 0.97, "cells": 2, "rechargeRating": "D", "recharge": 72 } + { "id": "65", "grp": "scb", "class": 8, "rating": "E", "cost": 697584, "mass": 160, "power": 1.44, "cells": 6, "rechargeRating": "C", "recharge": 0 }, + { "id": "64", "grp": "scb", "class": 8, "rating": "D", "cost": 1743961, "mass": 64, "power": 1.92, "cells": 4, "rechargeRating": "C", "recharge": 0 }, + { "id": "63", "grp": "scb", "class": 8, "rating": "C", "cost": 4359903, "mass": 160, "power": 2.4, "cells": 5, "rechargeRating": "B", "recharge": 0 }, + { "id": "62", "grp": "scb", "class": 8, "rating": "B", "cost": 10899756, "mass": 256, "power": 2.88, "cells": 6, "rechargeRating": "A", "recharge": 0 }, + { "id": "61", "grp": "scb", "class": 8, "rating": "A", "cost": 27249391, "mass": 160, "power": 3.36, "cells": 5, "rechargeRating": "A", "recharge": 0 }, + { "id": "60", "grp": "scb", "class": 7, "rating": "E", "cost": 249137, "mass": 80, "power": 1.24, "cells": 6, "rechargeRating": "D", "recharge": 97 }, + { "id": "5v", "grp": "scb", "class": 7, "rating": "D", "cost": 622843, "mass": 32, "power": 1.66, "cells": 4, "rechargeRating": "C", "recharge": 130 }, + { "id": "5u", "grp": "scb", "class": 7, "rating": "C", "cost": 1557108, "mass": 80, "power": 2.07, "cells": 5, "rechargeRating": "B", "recharge": 163 }, + { "id": "5t", "grp": "scb", "class": 7, "rating": "B", "cost": 3892770, "mass": 128, "power": 2.48, "cells": 6, "rechargeRating": "B", "recharge": 197 }, + { "id": "5s", "grp": "scb", "class": 7, "rating": "A", "cost": 9731925, "mass": 80, "power": 2.9, "cells": 5, "rechargeRating": "A", "recharge": 230 }, + { "id": "5r", "grp": "scb", "class": 6, "rating": "E", "cost": 88978, "mass": 40, "power": 1.06, "cells": 6, "rechargeRating": "D", "recharge": 92 }, + { "id": "5q", "grp": "scb", "class": 6, "rating": "D", "cost": 222444, "mass": 16, "power": 1.42, "cells": 4, "rechargeRating": "C", "recharge": 120 }, + { "id": "5p", "grp": "scb", "class": 6, "rating": "C", "cost": 556110, "mass": 40, "power": 1.77, "cells": 5, "rechargeRating": "C", "recharge": 148 }, + { "id": "5o", "grp": "scb", "class": 6, "rating": "B", "cost": 1390275, "mass": 64, "power": 2.12, "cells": 6, "rechargeRating": "B", "recharge": 176 }, + { "id": "5n", "grp": "scb", "class": 6, "rating": "A", "cost": 3475688, "mass": 40, "power": 2.48, "cells": 5, "rechargeRating": "A", "recharge": 204 }, + { "id": "5m", "grp": "scb", "class": 5, "rating": "E", "cost": 31778, "mass": 20, "power": 0.9, "cells": 5, "rechargeRating": "D", "recharge": 82 }, + { "id": "5l", "grp": "scb", "class": 5, "rating": "D", "cost": 79444, "mass": 8, "power": 1.2, "cells": 3, "rechargeRating": "C", "recharge": 109 }, + { "id": "5k", "grp": "scb", "class": 5, "rating": "C", "cost": 198611, "mass": 20, "power": 1.5, "cells": 4, "rechargeRating": "C", "recharge": 135 }, + { "id": "5j", "grp": "scb", "class": 5, "rating": "B", "cost": 496527, "mass": 32, "power": 1.8, "cells": 5, "rechargeRating": "B", "recharge": 162 }, + { "id": "5i", "grp": "scb", "class": 5, "rating": "A", "cost": 1241317, "mass": 20, "power": 2.1, "cells": 4, "rechargeRating": "B", "recharge": 189 }, + { "id": "5h", "grp": "scb", "class": 4, "rating": "E", "cost": 11349, "mass": 10, "power": 0.74, "cells": 5, "rechargeRating": "D", "recharge": 72 }, + { "id": "5g", "grp": "scb", "class": 4, "rating": "D", "cost": 28373, "mass": 4, "power": 0.98, "cells": 3, "rechargeRating": "D", "recharge": 94 }, + { "id": "5f", "grp": "scb", "class": 4, "rating": "C", "cost": 70932, "mass": 10, "power": 1.23, "cells": 4, "rechargeRating": "C", "recharge": 117 }, + { "id": "5e", "grp": "scb", "class": 4, "rating": "B", "cost": 177331, "mass": 16, "power": 1.48, "cells": 5, "rechargeRating": "C", "recharge": 140 }, + { "id": "5d", "grp": "scb", "class": 4, "rating": "A", "cost": 443328, "mass": 10, "power": 1.72, "cells": 4, "rechargeRating": "B", "recharge": 163 }, + { "id": "5c", "grp": "scb", "class": 3, "rating": "E", "cost": 4053, "mass": 5, "power": 0.61, "cells": 5, "rechargeRating": "D", "recharge": 61 }, + { "id": "5b", "grp": "scb", "class": 3, "rating": "D", "cost": 10133, "mass": 2, "power": 0.82, "cells": 3, "rechargeRating": "D", "recharge": 80 }, + { "id": "5a", "grp": "scb", "class": 3, "rating": "C", "cost": 25333, "mass": 5, "power": 1.02, "cells": 4, "rechargeRating": "D", "recharge": 100 }, + { "id": "59", "grp": "scb", "class": 3, "rating": "B", "cost": 63333, "mass": 8, "power": 1.22, "cells": 5, "rechargeRating": "C", "recharge": 119 }, + { "id": "58", "grp": "scb", "class": 3, "rating": "A", "cost": 158331, "mass": 5, "power": 1.43, "cells": 4, "rechargeRating": "C", "recharge": 138 }, + { "id": "57", "grp": "scb", "class": 2, "rating": "E", "cost": 1448, "mass": 2.5, "power": 0.5, "cells": 5, "rechargeRating": "E", "recharge": 46 }, + { "id": "56", "grp": "scb", "class": 2, "rating": "D", "cost": 3619, "mass": 1, "power": 0.67, "cells": 3, "rechargeRating": "D", "recharge": 61 }, + { "id": "55", "grp": "scb", "class": 2, "rating": "C", "cost": 9048, "mass": 2.5, "power": 0.84, "cells": 4, "rechargeRating": "D", "recharge": 77 }, + { "id": "54", "grp": "scb", "class": 2, "rating": "B", "cost": 22619, "mass": 4, "power": 1.01, "cells": 5, "rechargeRating": "D", "recharge": 92 }, + { "id": "53", "grp": "scb", "class": 2, "rating": "A", "cost": 56547, "mass": 2.5, "power": 1.18, "cells": 4, "rechargeRating": "C", "recharge": 107 }, + { "id": "52", "grp": "scb", "class": 1, "rating": "E", "cost": 517, "mass": 1.3, "power": 0.41, "cells": 4, "rechargeRating": "E", "recharge": 31 }, + { "id": "51", "grp": "scb", "class": 1, "rating": "D", "cost": 1293, "mass": 0.5, "power": 0.55, "cells": 2, "rechargeRating": "E", "recharge": 41 }, + { "id": "50", "grp": "scb", "class": 1, "rating": "C", "cost": 3231, "mass": 1.3, "power": 0.69, "cells": 3, "rechargeRating": "D", "recharge": 51 }, + { "id": "4v", "grp": "scb", "class": 1, "rating": "B", "cost": 8078, "mass": 2, "power": 0.83, "cells": 4, "rechargeRating": "D", "recharge": 61 }, + { "id": "4u", "grp": "scb", "class": 1, "rating": "A", "cost": 20195, "mass": 1.3, "power": 0.97, "cells": 3, "rechargeRating": "D", "recharge": 72 } ] -} \ No newline at end of file +} From 15616d112f069fdde5ed4fef244a4df818ecefc2 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Thu, 30 Jul 2015 19:04:52 -0700 Subject: [PATCH 3/6] Add per-slot total SCB capacity in MJ --- app/views/_slot-internal.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/_slot-internal.html b/app/views/_slot-internal.html index bd0d609c..97065a75 100755 --- a/app/views/_slot-internal.html +++ b/app/views/_slot-internal.html @@ -10,7 +10,7 @@
Rate: {{c.c.rate}} Kg/s   Refuel Time: {{$r.fTime(fuel * 1000 / c.c.rate)}}
Ammo: {{c.c.ammo}}
Cells: {{c.c.cells}}
-
Recharge: {{c.c.recharge}} MJ
+
Recharge: {{c.c.recharge}} MJ   Total: {{c.c.cells * c.c.recharge}} MJ
Repair: {{c.c.repair}}
Range {{c.c.range}} km
Time: {{$r.fTime(c.c.time)}}
@@ -19,4 +19,4 @@
LS
Range: {{c.c.rangeRating}}
+{{c.c.armouradd}} Armour
- \ No newline at end of file + From 69de209abaa55631ee22ac95536e5d55d23036a5 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Thu, 30 Jul 2015 19:50:08 -0700 Subject: [PATCH 4/6] A-rated uses largest eligible shield slot; dirty hacks rewritten --- app/js/controllers/controller-outfit.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index e2b6c142..558aa23b 100755 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -175,28 +175,23 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' }; /** - * Strip ship to A-class and A-class shield generator. + * Strip ship to A-class and biggest A-class shield generator with military bulkheads */ $scope.aRatedBuild = function() { - ship.buildWith(data.defaults); // Reset build to default -- lazy hack to find shield slot - var sgSlot = 0; - var sgId = 0; - ship.internal.forEach(function(slot) { - // TODO: equip biggest A-rated shield in highest slot instead - if (slot.c && (slot.c.grp == 'sg')) { - sgSlot = ship.internal.indexOf(slot); - // Dirty hack using char decrement to get to A rated shield from default E - sgId = slot.c.id.charAt(0) + String.fromCharCode(slot.c.id.charCodeAt(1) - 4); - } - }); for (var i = 0, l = ship.common.length - 1; i < l; i++) { // All except Fuel Tank var id = ship.common[i].maxClass + 'A'; ship.use(ship.common[i], id, Components.common(i, id)); } ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); }); ship.internal.forEach(function(slot) { ship.use(slot, null, null); }); - ship.use(ship.internal[sgSlot], sgId, Components.internal(sgId)); - ship.useBulkhead(0); + ship.internal.some(function(slot) { + if ('undefined' == typeof slot.eligible) { // Assuming largest slot can hold an eligible shield + var id = Components.findInternalId('Shield Generator', slot.maxClass, 'A'); + ship.use(slot, id, Components.internal(id)); + return true; + } + }); + ship.useBulkhead(2); updateState(Serializer.fromShip(ship)); }; From d278a7c1fd4d71e8c67dbdbcfc54b8a5790eb295 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Thu, 30 Jul 2015 20:14:46 -0700 Subject: [PATCH 5/6] Correcting CI errors --- app/js/controllers/controller-outfit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index 558aa23b..05f7f0df 100755 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -185,8 +185,8 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); }); ship.internal.forEach(function(slot) { ship.use(slot, null, null); }); ship.internal.some(function(slot) { - if ('undefined' == typeof slot.eligible) { // Assuming largest slot can hold an eligible shield - var id = Components.findInternalId('Shield Generator', slot.maxClass, 'A'); + if (typeof slot.eligible === "undefined") { // Assuming largest slot can hold an eligible shield + id = Components.findInternalId('Shield Generator', slot.maxClass, 'A'); ship.use(slot, id, Components.internal(id)); return true; } From 80da41c866e544252f97e6e2e3476eff3c018924 Mon Sep 17 00:00:00 2001 From: Kevin Chang Date: Thu, 30 Jul 2015 20:18:33 -0700 Subject: [PATCH 6/6] Another fix to lint errors --- app/js/controllers/controller-outfit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index 05f7f0df..71f6401e 100755 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -185,7 +185,7 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); }); ship.internal.forEach(function(slot) { ship.use(slot, null, null); }); ship.internal.some(function(slot) { - if (typeof slot.eligible === "undefined") { // Assuming largest slot can hold an eligible shield + if (typeof slot.eligible === 'undefined') { // Assuming largest slot can hold an eligible shield id = Components.findInternalId('Shield Generator', slot.maxClass, 'A'); ship.use(slot, id, Components.internal(id)); return true;