Переместил названия предметов в 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 () => {
|
||||
const browser = await puppeteer.launch({ executablePath: 'chromium-browser' })
|
||||
const browser = await puppeteer.launch()
|
||||
const page = await browser.newPage()
|
||||
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 Primary = require('./Primary')
|
||||
// const Primary = require('./Primary')
|
||||
// const Secondary = require('./Secondary')
|
||||
const Companion = require('./Companion')
|
||||
const Archwings = require('./Archwings')
|
||||
|
||||
const 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'
|
||||
]
|
||||
const result = []
|
||||
|
||||
const primaries = [
|
||||
'astilla', 'baza', 'boar', 'boltor', 'braton'
|
||||
]
|
||||
|
||||
const items = []
|
||||
|
||||
warframes.forEach((name) => {
|
||||
items.push(new Warframe(name))
|
||||
items.warframes.forEach((name) => {
|
||||
result.push(new Warframe(name))
|
||||
})
|
||||
|
||||
primaries.forEach((name) => {
|
||||
items.push(new Primary(name))
|
||||
// items.primaries.forEach((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