Skip to content

[Bug] Arcanes are missing wiki data #876

@DopiGFX

Description

@DopiGFX

Describe the bug

An if statement is falsely preventing wiki data to get added to arcanes

NodeJS Version

lts

npm Version

lts

@wfcd/items Version

v1.1272.133

Access Method

github download

What happened?

This should be resolved AFTER #875 to prevent more issues!

This function is missing the correct category to let arcanes through:

addAdditionalWikiaData(item, category, wikiaData) {
if (!['weapons', 'warframes', 'mods', 'upgrades', 'sentinels'].includes(category.toLowerCase())) return;

It prevents this part of the code adding the wiki data to arcanes:

switch (category.toLowerCase()) {
case 'sentinels':
case 'warframes':
this.addWarframeWikiaData(item, wikiaItem);
break;
case 'weapons':
this.addWeaponWikiaData(item, wikiaItem);
break;
case 'upgrades':
this.addModWikiaData(item, wikiaItem);
break;
case 'arcanes':
this.addArcaneWikiaData(item, wikiaItem);
break;
default:
break;
}

Also is the transformer missing the "rarity" property from the wiki:

newArcane = {
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_'))}`,
transmutable: Transmutable,
introduced: Introduced,
type: Type,
thumbnail: imageUrls?.[Image],

And following this one too:
addArcaneWikiaData(item, wikiaItem) {
item.wikiaThumbnail = wikiaItem.thumbnail;
item.wikiaUrl = wikiaItem.url;
item.transmutable = wikiaItem.transmutable;
item.type = wikiaItem.type;
if (!wikiaItem.thumbnail) warnings.missingWikiThumb.push(item.name);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Scope: Out of ScopeNot provided by DE's APISeverity4: InconvenientThe defect does not affect functionality or critical data. It is merely an inconvenience.Type: Bughelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions