Переместил названия предметов в json
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
2
index.js
2
index.js
@@ -12,7 +12,7 @@ async function initPuppeteer (page) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const browser = await puppeteer.launch({ executablePath: 'chromium-browser' })
|
const browser = await puppeteer.launch()
|
||||||
const page = await browser.newPage()
|
const page = await browser.newPage()
|
||||||
await initPuppeteer(page)
|
await initPuppeteer(page)
|
||||||
|
|
||||||
|
|||||||
11
items/Archwings.js
Normal file
11
items/Archwings.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
const Item = require('./Item')
|
||||||
|
|
||||||
|
module.exports = class Archwings extends Item {
|
||||||
|
constructor (name) {
|
||||||
|
super(name)
|
||||||
|
|
||||||
|
this.addPart('harness')
|
||||||
|
this.addPart('wings')
|
||||||
|
this.addPart('systems')
|
||||||
|
}
|
||||||
|
}
|
||||||
11
items/Companion.js
Normal file
11
items/Companion.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
const Item = require('./Item')
|
||||||
|
|
||||||
|
module.exports = class Companion extends Item {
|
||||||
|
constructor (name) {
|
||||||
|
super(name)
|
||||||
|
|
||||||
|
this.addPart('carapace')
|
||||||
|
this.addPart('cerebrum')
|
||||||
|
this.addPart('systems')
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,29 +1,26 @@
|
|||||||
|
const items = require('./items.json')
|
||||||
const Warframe = require('./Warframe')
|
const Warframe = require('./Warframe')
|
||||||
const Primary = require('./Primary')
|
// const Primary = require('./Primary')
|
||||||
// const Secondary = require('./Secondary')
|
// const Secondary = require('./Secondary')
|
||||||
|
const Companion = require('./Companion')
|
||||||
|
const Archwings = require('./Archwings')
|
||||||
|
|
||||||
const warframes = [
|
const result = []
|
||||||
'ash', 'atlas', 'banshee', 'chroma', 'ember',
|
|
||||||
'equinox', 'frost', 'gara', 'harrow', 'hydroid',
|
|
||||||
'inaros', 'ivara', 'limbo', 'loki', 'mag',
|
|
||||||
'mesa', 'mirage', 'nekros', 'nezha', 'nidus',
|
|
||||||
'nova', 'nyx', 'oberon', 'octavia', 'rhino',
|
|
||||||
'saryn', 'titania', 'trinity', 'valkyr', 'vauban',
|
|
||||||
'volt', 'wukong', 'zephyr'
|
|
||||||
]
|
|
||||||
|
|
||||||
const primaries = [
|
items.warframes.forEach((name) => {
|
||||||
'astilla', 'baza', 'boar', 'boltor', 'braton'
|
result.push(new Warframe(name))
|
||||||
]
|
|
||||||
|
|
||||||
const items = []
|
|
||||||
|
|
||||||
warframes.forEach((name) => {
|
|
||||||
items.push(new Warframe(name))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
primaries.forEach((name) => {
|
// items.primaries.forEach((name) => {
|
||||||
items.push(new Primary(name))
|
// result.push(new Primary(name))
|
||||||
|
// })
|
||||||
|
|
||||||
|
items.companions.forEach((name) => {
|
||||||
|
result.push(new Companion(name))
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = items
|
items.archwings.forEach((name) => {
|
||||||
|
result.push(new Archwings(name))
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = result
|
||||||
|
|||||||
22
items/items.json
Normal file
22
items/items.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"warframes": [
|
||||||
|
"ash", "atlas", "banshee", "chroma", "ember",
|
||||||
|
"equinox", "frost", "gara", "harrow", "hydroid",
|
||||||
|
"inaros", "ivara", "limbo", "loki", "mag",
|
||||||
|
"mesa", "mirage", "nekros", "nezha", "nidus",
|
||||||
|
"nova", "nyx", "oberon", "octavia", "rhino",
|
||||||
|
"saryn", "titania", "trinity", "valkyr", "vauban",
|
||||||
|
"volt", "wukong", "zephyr"
|
||||||
|
],
|
||||||
|
"primaries": [
|
||||||
|
"astilla", "baza", "boar", "boltor", "braton",
|
||||||
|
"burston", "corinth", "larton", "panthera",
|
||||||
|
"rubico", "scourge", "soma", "stradavar",
|
||||||
|
"strun", "sybaris", "tenora", "tiberon", "tigris",
|
||||||
|
"vectis", "zhuge"
|
||||||
|
],
|
||||||
|
"companions": [
|
||||||
|
"carrier", "dethcube", "helios", "wyrm"
|
||||||
|
],
|
||||||
|
"archwings": ["odonata"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user