Files
warframe-center/gather/src/items/Item.js
2022-03-14 01:41:52 +03:00

21 lines
427 B
JavaScript

const Part = require('./Part')
function capitalize (string) {
return string.charAt(0).toUpperCase() + string.slice(1)
}
module.exports = class Item {
constructor (name) {
this.name = name
this.fullName = capitalize(name) + ' Prime'
this.set = new Part(name, 'set')
this.parts = []
this.addPart('blueprint')
}
addPart (part, amount) {
this.parts.push(new Part(this.name, part, amount))
}
}