Misc. bugfix (flip id color, itemtypes double declare)

This commit is contained in:
b 2021-03-15 23:09:28 -07:00
parent bc8255303e
commit f2afa3dffb
2 changed files with 5 additions and 5 deletions

View file

@ -694,7 +694,7 @@ function displayExpandedItem(item, parent_id){
style = "negative";
}
//let flipPosNeg = ["spRaw1","spRaw2","spRaw3","spRaw4","spPct1","spPct2","spPct3","spPct4"];
if(reversedIDs.filter(e => e !== "atkTier").includes(id)){
if(reversedIDs.includes(id)){
style === "positive" ? style = "negative" : style = "positive";
}
if (fix_id) {
@ -721,9 +721,9 @@ function displayExpandedItem(item, parent_id){
row.appendChild(desc_elem);
if (item.get("maxRolls").get(id) > 0) {
style = "positive";
style = reversedIDs.includes(id) ? "negative" : "positive";
} else if (item.get("maxRolls").get(id) < 0 ) {
style = "negative";
style = reversedIDs.includes(id) ? "positive" : "negative";
}
let max_elem = document.createElement('td');
max_elem.classList.add('right');
@ -2192,4 +2192,4 @@ function displayAdditionalInfo(item, elemID) {
parent_elem.appendChild(warning_elem);
return;
}
}

View file

@ -115,7 +115,7 @@ for (let x in special_mappings) {
itemFilters.appendChild(el);
}
let itemTypes = [ "helmet", "chestplate", "leggings", "boots", "ring", "bracelet", "necklace", "wand", "spear", "bow", "dagger", "relik" ];
//let itemTypes = [ "helmet", "chestplate", "leggings", "boots", "ring", "bracelet", "necklace", "wand", "spear", "bow", "dagger", "relik" ];
let itemCategories = [ "armor", "accessory", "weapon" ];
function applyQuery(items, query) {