From 9b7b3ea287770dbd82e9f6a1bd232dc19d9a952a Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 18 Feb 2022 13:34:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D0=BB=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BC=D0=B5=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=B2=20json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- items/Archwings.js | 11 +++++++++++ items/Companion.js | 11 +++++++++++ items/index.js | 39 ++++++++++++++++++--------------------- items/items.json | 22 ++++++++++++++++++++++ 5 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 items/Archwings.js create mode 100644 items/Companion.js create mode 100644 items/items.json diff --git a/index.js b/index.js index 24eec27..5ff4346 100644 --- a/index.js +++ b/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) diff --git a/items/Archwings.js b/items/Archwings.js new file mode 100644 index 0000000..6ec8e9f --- /dev/null +++ b/items/Archwings.js @@ -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') + } +} diff --git a/items/Companion.js b/items/Companion.js new file mode 100644 index 0000000..fa4708b --- /dev/null +++ b/items/Companion.js @@ -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') + } +} diff --git a/items/index.js b/items/index.js index 97940d2..fde1ffe 100644 --- a/items/index.js +++ b/items/index.js @@ -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 diff --git a/items/items.json b/items/items.json new file mode 100644 index 0000000..1c4a6a4 --- /dev/null +++ b/items/items.json @@ -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"] +}