From 6a2e7d1785b6a7667d1d8526a758081246f2c4ce Mon Sep 17 00:00:00 2001 From: Gus <147gusto@gmail.com> Date: Wed, 29 Apr 2020 12:14:12 +1000 Subject: [PATCH] remove case sensitivity for item name, quality, unusual effect and skin --- lib/schema.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/schema.js b/lib/schema.js index c638887..fd1911c 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -59,7 +59,7 @@ class Schema { getItemByItemName (name) { for (let i = 0; i < this.raw.schema.items.length; i++) { const item = this.raw.schema.items[i]; - if (item.item_name === name) { + if (item.item_name.toLowerCase() === name.toLowerCase()) { return item; } } @@ -130,7 +130,7 @@ class Schema { continue; } - if (this.raw.schema.qualityNames[type] === name) { + if (this.raw.schema.qualityNames[type].toLowerCase() === name.toLowerCase()) { return this.raw.schema.qualities[type]; } } @@ -182,7 +182,7 @@ class Schema { for (let i = 0; i < this.raw.schema.attribute_controlled_attached_particles.length; i++) { const effect = this.raw.schema.attribute_controlled_attached_particles[i]; - if (effect.name === name) { + if (effect.name.toLowerCase() === name.toLowerCase()) { return effect.id; } } @@ -214,7 +214,7 @@ class Schema { continue; } - if (this.raw.schema.paintkits[id] === name) { + if (this.raw.schema.paintkits[id].toLowerCase() === name.toLowerCase()) { return parseInt(id); } }