Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build/parser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,9 @@ class Parser {
if (item.category === 'Archwing') wikiCategory = 'archwings';
if (category === 'Sentinels') wikiCategory = 'companions';

const wikiaItem = wikiaData[wikiCategory].filter((i) => i).find((i) => i.name === item.name);
const wikiaItem = wikiaData[wikiCategory].filter((i) => i).find((i) => i.uniqueName === item.uniqueName);
if (!wikiaItem) return;
item.wikiAvailable = true;

switch (category.toLowerCase()) {
case 'sentinels':
Expand Down
3 changes: 2 additions & 1 deletion build/wikia/transformers/transformArcanes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ export default async (oldArcane, imageUrls) => {
}

try {
const { Image, Name, Transmutable, Introduced, Type } = oldArcane;
const { Image, Name, Transmutable, Introduced, Type, InternalName } = oldArcane;

newArcane = {
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_'))}`,
transmutable: Transmutable,
introduced: Introduced,
Expand Down
4 changes: 3 additions & 1 deletion build/wikia/transformers/transformCompanion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ export default async (oldCompanion, imageUrls) => {
}

try {
const { Image, Mastery, Polarities, Stamina, Introduced, Vaulted, VaultDate, EstimatedVaultDate } = oldCompanion;
const { Image, Mastery, Polarities, Stamina, Introduced, Vaulted, VaultDate, EstimatedVaultDate, InternalName } =
oldCompanion;
const { Name } = oldCompanion;

newCompanion = {
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_').replace('_Prime', '/Prime'))}`,
mr: Mastery || 0,
polarities: Polarities,
Expand Down
3 changes: 2 additions & 1 deletion build/wikia/transformers/transformMod.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ export default async (oldMod, imageUrls) => {
}

try {
const { Image, Name, Transmutable, Introduced } = oldMod;
const { Image, Name, Transmutable, Introduced, InternalName } = oldMod;

newMod = {
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_'))}`,
transmutable: Transmutable,
introduced: Introduced,
Expand Down
4 changes: 3 additions & 1 deletion build/wikia/transformers/transformWarframe.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ export default async (oldFrame, imageUrls, blueprints) => {
}

try {
const { AuraPolarity, Conclave, Image, Mastery, Polarities, Sprint, Introduced, Sex, Vaulted } = oldFrame;
const { AuraPolarity, Conclave, Image, Mastery, Polarities, Sprint, Introduced, Sex, Vaulted, InternalName } =
oldFrame;
const { Name } = oldFrame;

newFrame = {
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_').replace('_Prime', '/Prime'))}`,
auraPolarity: AuraPolarity,
conclave: Conclave,
Expand Down
2 changes: 2 additions & 0 deletions build/wikia/transformers/transformWeapon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,13 @@ export default (oldWeapon, imageUrls, blueprints) => {
Attack9,
Attack10,
Attacks,
InternalName,
} = oldWeapon;

newWeapon = {
regex: `^${Name.toLowerCase().replace(/\s/g, '\\s')}$`,
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_'))}`,
mr: Mastery || 0,
type: Class || Type,
Expand Down
3 changes: 2 additions & 1 deletion build/wikia/transformers/transformerArchwing.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ export default async (oldWings, imageUrls) => {
}

try {
const { Image, Mastery, Polarities, Sprint, Introduced, Vaulted } = oldWings;
const { Image, Mastery, Polarities, Sprint, Introduced, Vaulted, InternalName } = oldWings;
const { Name } = oldWings;

newWings = {
name: Name,
uniqueName: InternalName,
url: `https://wiki.warframe.com/w/${encodeURIComponent(Name.replace(/\s/g, '_').replace('_Prime', '/Prime'))}`,
mr: Mastery || 0,
polarities: Polarities,
Expand Down
5 changes: 2 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ declare module 'warframe-items' {
wikiaUrl?: string;
tags?: Tag[];
introduced?: Update;
wikiAvailable?: boolean;
}
interface Droppable {
rarity?: Rarity;
Expand Down Expand Up @@ -397,7 +398,7 @@ declare module 'warframe-items' {
interface ModularPetPart extends MinimalItem, Droppable, Attackable, Equippable {
category: 'Pets';
}
interface Component extends MinimalItem {
interface Component extends MinimalItem, WikiaItem {
itemCount: number;
imageName: string;
tradable: boolean;
Expand Down Expand Up @@ -436,8 +437,6 @@ declare module 'warframe-items' {
tags?: Tag[];
type?: Type;
vaulted?: boolean;
wikiaThumbnail?: string;
wikiaUrl?: string;
disposition?: Disposition;
ducats?: number;
channeling?: number;
Expand Down
Loading
Loading