16 lines
271 B
JavaScript
16 lines
271 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) {
|
|
this.parts.push(new Part(this.name, part))
|
|
}
|
|
}
|