Part class
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
const Part = require('./Part')
|
||||
|
||||
module.exports = class Item {
|
||||
constructor (name) {
|
||||
this.name = name
|
||||
this.url = `${this.name}_prime_set`
|
||||
this.set = new Part(name, 'set')
|
||||
|
||||
this.parts = []
|
||||
this.addPart('blueprint')
|
||||
}
|
||||
|
||||
addPart (part) {
|
||||
this.parts.push({ part, url: `${this.name}_prime_${part}` })
|
||||
this.parts.push(new Part(this.name, part))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user