Bump db version, crafted display link, misc bugfix
This commit is contained in:
parent
4dbf51ce5c
commit
cc67ba5f98
5 changed files with 16 additions and 8 deletions
|
@ -1,9 +1,8 @@
|
|||
const url_base = location.href.split("#")[0];
|
||||
const url_tag = location.hash.slice(1);
|
||||
console.log(url_base);
|
||||
console.log(url_tag);
|
||||
|
||||
const BUILD_VERSION = "6.9.23";
|
||||
const BUILD_VERSION = "6.9.24";
|
||||
|
||||
function setTitle() {
|
||||
let text;
|
||||
|
|
2
craft.js
2
craft.js
|
@ -44,6 +44,7 @@ class Craft{
|
|||
this.atkSpd = attackSpeed;
|
||||
this.hash = hash;
|
||||
this.initCraftStats();
|
||||
this.statMap.set("hash", this.hash);
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,6 +66,7 @@ class Craft{
|
|||
setHash(hash) {
|
||||
this.hash = hash;
|
||||
this.statMap.set("displayName", "CR-" + this.hash);
|
||||
this.statMap.set("hash", this.hash);
|
||||
}
|
||||
/* Get all stats for this build. Stores in this.statMap.
|
||||
@pre The craft itself should be valid. No checking of validity of pieces is done here.
|
||||
|
|
14
display.js
14
display.js
|
@ -592,11 +592,16 @@ function displayExpandedItem(item, parent_id){
|
|||
if (item.get("tier") !== " ") {
|
||||
p_elem.classList.add(item.get("tier"));
|
||||
}
|
||||
if(item.get("tier") === "Crafted") {
|
||||
if(item.get("crafted")) {
|
||||
p_elem.remove();
|
||||
p_elem = document.createElement("a");
|
||||
p_elem.classList.add('itemp');
|
||||
p_elem.classList.add("smalltitle");
|
||||
p_elem.classList.remove("title");
|
||||
p_elem.classList.add(item.get("tier"));
|
||||
p_elem.href = url_base + "crafter.html#" + item.get("hash");
|
||||
p_elem.textContent = item.get(id);
|
||||
active_elem.appendChild(p_elem);
|
||||
}
|
||||
p_elem.append(document.createElement("br"));
|
||||
let img = document.createElement("img");
|
||||
img.src = "/media/items/generic-" + item.get("type") + ".png";
|
||||
img.alt = item.get("type");
|
||||
|
@ -607,7 +612,6 @@ function displayExpandedItem(item, parent_id){
|
|||
bckgrd.classList.add("itemp");
|
||||
active_elem.appendChild(bckgrd);
|
||||
bckgrd.appendChild(img);
|
||||
|
||||
} else if (skp_order.includes(id)) { //id = str, dex, int, def, or agi
|
||||
if ( item.get("tier") !== "Crafted" && active_elem.nodeName === "DIV") {
|
||||
p_elem.textContent = "";
|
||||
|
@ -748,7 +752,7 @@ function displayExpandedItem(item, parent_id){
|
|||
if(key === "Damage"){
|
||||
effect.textContent += elementIcons[skp_elements.indexOf(element)];
|
||||
}
|
||||
if (element === "w") {
|
||||
if (element === "w" && item.get("category") === "armor") {
|
||||
effect.textContent += " / Mana Used";
|
||||
}
|
||||
specialEffects.appendChild(effect);
|
||||
|
|
2
load.js
2
load.js
|
@ -1,4 +1,4 @@
|
|||
const DB_VERSION = 33;
|
||||
const DB_VERSION = 34;
|
||||
// @See https://github.com/mdn/learning-area/blob/master/javascript/apis/client-side-storage/indexeddb/video-store/index.js
|
||||
|
||||
let db;
|
||||
|
|
3
utils.js
3
utils.js
|
@ -1,3 +1,6 @@
|
|||
let getUrl = window.location;
|
||||
const url_base = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1];
|
||||
|
||||
let skp_order = ["str","dex","int","def","agi"];
|
||||
let skill = ["Strength", "Dexterity", "Intelligence", "Defense", "Agility"];
|
||||
let skp_elements = ["e","t","w","f","a"];
|
||||
|
|
Loading…
Reference in a new issue