16 lines
287 B
JavaScript
16 lines
287 B
JavaScript
const Part = require('./Part')
|
|
|
|
module.exports = class Item {
|
|
constructor (name) {
|
|
this.name = name
|
|
this.set = new Part(name, 'set')
|
|
|
|
this.parts = []
|
|
this.addPart('blueprint')
|
|
}
|
|
|
|
addPart (part, amount) {
|
|
this.parts.push(new Part(this.name, part, amount))
|
|
}
|
|
}
|