warframe-worldstate-parser
Version:
An Open parser for Warframe's Worldstate in Javascript
327 lines (326 loc) • 7.33 kB
JavaScript
import { cdn, wfCdn } from "./ImgCdn.mjs";
import { auras, nightmare, resources } from "./RewardData.mjs";
//#region lib/supporting/RewardTypes.ts
/**
* All possible RewardTypes
* @type {Array.<RewardType>}
*/
var RewardTypes_default = [
{
name: "vauban",
description: "Vauban parts",
test: (s) => /^vauban(?!.*helmet)/i.test(s),
thumbnail: wfCdn("vauban.png"),
color: 6052435
},
{
name: "vandal",
description: "Vandal Weapon Parts",
test: (s) => /vandal/i.test(s),
thumbnail: wfCdn("dera-vandal.png"),
color: 6052435
},
{
name: "wraith",
description: "Wraith Weapon Parts",
test: (s) => /wraith/i.test(s),
thumbnail: wfCdn("furax-wraith.png"),
color: 6052435
},
{
name: "skin",
description: "Weapon skins",
test: (s) => /skin/i.test(s),
thumbnail: "https://raw.githubusercontent.com/wfcd/warframe-worldstate-parser/master/resources/weapon_skin_thumb.png",
color: 5196851
},
{
name: "helmet",
description: "Alternative helmets",
test: (s) => /helmet/i.test(s),
thumbnail: "https://raw.githubusercontent.com/wfcd/warframe-worldstate-parser/master/resources/alt_helmet_thumb.png",
color: 5666423
},
{
name: "nitain",
description: "Nitain extract",
test: (s) => /nitain/i.test(s),
thumbnail: wfCdn("nitain-extract.png"),
color: 11447716
},
{
name: "mutalist",
description: "Mutalist Alad V coordinates",
test: (s) => /mutalist/i.test(s),
thumbnail: wfCdn("mutalist-alad-v-nav-coordinate.png"),
color: 158519
},
{
name: "weapon",
description: "Weapons",
test: (s) => /dagger|sword|glaive/i.test(s),
thumbnail: wfCdn("blueprint"),
color: 10723479
},
{
name: "fieldron",
description: "Fieldron",
test: (s) => /fieldron/i.test(s),
thumbnail: wfCdn("fieldron.png"),
color: 5068118
},
{
name: "detonite",
description: "Detonite Injector",
test: (s) => /detonite/i.test(s),
thumbnail: wfCdn("detonite-injector.png"),
color: 5068118
},
{
name: "mutagen",
description: "Mutagen Mass",
test: (s) => /mutagen/i.test(s),
thumbnail: wfCdn("mutagen-mass.png"),
color: 5068118
},
{
name: "clantech",
description: "Clantech resources",
test: (s) => /fieldron|detonite|mutagen/i.test(s),
thumbnail: "https://github.com/wfcd/warframe-worldstate-parser/raw/master/resources/clantech_thmb.png",
color: 5068118
},
{
name: "aura",
description: "Auras",
test: (s) => auras.includes(s),
thumbnail: "https://github.com/wfcd/warframe-worldstate-parser/raw/master/resources/aura_thumb.png",
color: 13170943
},
{
name: "neuralSensors",
description: "Neural Sensors",
test: (s) => /neural/i.test(s),
thumbnail: wfCdn("neural-sensors.png"),
color: 13170943
},
{
name: "neurodes",
description: "Neurodes",
test: (s) => /neurode/i.test(s),
thumbnail: wfCdn("neurodes.png"),
color: 13170943
},
{
name: "orokinCell",
description: "Orokin Cell",
test: (s) => /orokin\scell/i.test(s),
thumbnail: wfCdn("orokin-cell.png"),
color: 13170943
},
{
name: "alloyPlate",
description: "Alloy Plate",
test: (s) => /alloy\splate/i.test(s),
thumbnail: wfCdn("alloy-plate.png"),
color: 13170943
},
{
name: "circuits",
description: "Circuits",
test: (s) => /circuits/i.test(s),
thumbnail: wfCdn("circuits.png"),
color: 13170943
},
{
name: "controlModule",
description: "Control Module",
test: (s) => /control\smodule/i.test(s),
thumbnail: wfCdn("control-module.png"),
color: 13170943
},
{
name: "ferrite",
description: "Ferrite",
test: (s) => /ferrite/i.test(s),
thumbnail: wfCdn("ferrite.png"),
color: 13170943
},
{
name: "gallium",
description: "Gallium",
test: (s) => /gallium/i.test(s),
thumbnail: wfCdn("gallium.png"),
color: 10595770
},
{
name: "morphics",
description: "Morphics",
test: (s) => /morphics/i.test(s),
thumbnail: wfCdn("morphics.png"),
color: 13170943
},
{
name: "nanoSpores",
description: "Nano Spores",
test: (s) => /nano\sspores/i.test(s),
thumbnail: wfCdn("nano-spores.png"),
color: 5455670
},
{
name: "oxium",
description: "Oxium",
test: (s) => /oxium/i.test(s),
thumbnail: wfCdn("oxium.png"),
color: 9597243
},
{
name: "rubedo",
description: "Rubedo",
test: (s) => /rubedo/i.test(s),
thumbnail: wfCdn("rubedo.png"),
color: 13516342
},
{
name: "salvage",
description: "Salvage",
test: (s) => /salvage/i.test(s),
thumbnail: wfCdn("salvage.png"),
color: 9145997
},
{
name: "plastids",
description: "Plastids",
test: (s) => /plastids/i.test(s),
thumbnail: wfCdn("plastids.png"),
color: 13545096
},
{
name: "polymerBundle",
description: "Polymer Bundle",
test: (s) => /polymer\sbundle/i.test(s),
thumbnail: wfCdn("polymer-bundle.png"),
color: 7032228
},
{
name: "argonCrystal",
description: "Argon Crystal",
test: (s) => /argon\scrystal/i.test(s),
thumbnail: wfCdn("argon-crystal.png"),
color: 13170943
},
{
name: "cryotic",
description: "Cryotic",
test: (s) => /cryotic/i.test(s),
thumbnail: wfCdn("cryotic.png"),
color: 7905971
},
{
name: "tellurium",
description: "Tellurium",
test: (s) => /tellurium/i.test(s),
thumbnail: wfCdn("tellurium.png"),
color: 15150616
},
{
name: "resource",
description: "Resources",
test: (s) => resources.includes(s),
thumbnail: "https://i.imgur.com/Bq5TEPo.png",
color: 16772764
},
{
name: "nightmare",
description: "Nightmare mods",
test: (s) => nightmare.includes(s),
thumbnail: cdn("svg/nightmare.svg"),
color: 11677228
},
{
name: "endo",
description: "Endo",
test: (s) => /^\d+x?\sendo/i.test(s),
thumbnail: wfCdn("endo.png"),
color: 12755532
},
{
name: "reactor",
description: "Orokin Reactors",
test: (s) => /reactor/i.test(s),
thumbnail: wfCdn("orokin-reactor.png"),
color: 14140285
},
{
name: "catalyst",
description: "Orokin Catalyst",
test: (s) => /catalyst/i.test(s),
thumbnail: wfCdn("orokin-catalyst.png"),
color: 6855389
},
{
name: "potato",
description: "Orokin Catalysts/Reactors",
test: (s) => /catalyst|reactor/i.test(s),
thumbnail: wfCdn("orokin-catalyst.png"),
color: 6855389
},
{
name: "forma",
description: "Forma",
test: (s) => /forma/i.test(s),
thumbnail: wfCdn("forma.png"),
color: 11638087
},
{
name: "exilus",
description: "Exilus",
test: (s) => /exilus/i.test(s),
thumbnail: wfCdn("exilus-adapter.png"),
color: 8925997
},
{
name: "synthula",
description: "Synthula",
test: (s) => /synthula/i.test(s),
thumbnail: wfCdn("synthula.png"),
color: 10461599
},
{
name: "kavatGene",
description: "Kavat Genetic Code",
test: (s) => /Kavat Ge/i.test(s),
thumbnail: wfCdn("kavat-genetic-code.png"),
color: 7776429
},
{
name: "kubrowEgg",
description: "Kubrow Egg",
test: (s) => /kubrow\segg/i.test(s),
thumbnail: wfCdn("kubrow-egg"),
color: 10851199
},
{
name: "traces",
description: "Void Traces",
test: (s) => /trace/i.test(s),
thumbnail: wfCdn("void-traces.png"),
color: 6923485
},
{
name: "riven",
description: "Riven Mod",
test: (s) => /riven/i.test(s),
thumbnail: wfCdn("rifle-riven-mod.png"),
color: 10585021
},
{
name: "other",
description: "Other",
test: () => true,
thumbnail: "",
color: 5198940
}
];
//#endregion
export { RewardTypes_default as default };