screeps/bodypartbuilder.js
2016-09-15 00:30:24 -05:00

4 lines
168 B
JavaScript

bodyParts.forEach(function (bodyPart) {
var part = typeof bodyPart === 'string' ? bodyPart : bodyPart.type;
cost += BODYPART_COST[part];
});