From abdeb5d434ba5c3d32c8b542a7b36951a0c1e8da Mon Sep 17 00:00:00 2001 From: mingjun97 Date: Mon, 9 May 2022 21:52:30 -0700 Subject: [PATCH] Fix bugs in reliquary --- scripts/cheat/reli.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/cheat/reli.js b/scripts/cheat/reli.js index edf515f..722a0e3 100644 --- a/scripts/cheat/reli.js +++ b/scripts/cheat/reli.js @@ -77,7 +77,6 @@ function genReli() { o.innerText = "Set: " + reli.name; filter.appendChild(o); }) - updateQualityList(); document.getElementById("reli-set").oninput = updateQualityList; document.getElementById("reli-quality").oninput = ()=>{ updateReliList(); updateReliId(document.getElementById("reli-select").value);}; document.getElementById("reli-select").oninput = (e) => { @@ -95,6 +94,12 @@ function genReli() { document.getElementById("reli-id").setvalue(e.target.attributes['reli-id'].nodeValue, e.target.attributes['reli-quality'].nodeValue); setTimeout(() => { document.getElementById("search-box").style.height = "3em"; + var color = "quality-" + {0: "white", 1: "green", 2: "blue", 3: "purple", 4:"orange", 5: "unknown"}[e.target.attributes['reli-quality'].nodeValue - 1]; + var content = ` + + ${e.target.attributes['reli-name'].nodeValue} + `; + document.getElementById("name-list").innerHTML = content; }, 10); updateQualityList(); } @@ -139,6 +144,8 @@ function genReli() { }) sendCommand(`giveart ${reliId} ${mainPropId} ${affix} ${parseInt(level)+1}`.replace(" ", " ")); } + document.getElementById("by-set").onchange(); + updateQualityList(); } // ----------------------------------------------------------------