Minify index.html, remove dead code (rip wynnatlas mini) in builder.js, move some encode/decode specific stuff to build_encode_decode.js
This commit is contained in:
parent
1763afc0cf
commit
c1ab8fe8ae
6 changed files with 1415 additions and 1473 deletions
1408
builder/index.html
1408
builder/index.html
File diff suppressed because one or more lines are too long
1399
builder/index_full.html
Normal file
1399
builder/index_full.html
Normal file
File diff suppressed because it is too large
Load diff
|
@ -7,8 +7,6 @@ const url_tag = location.hash.slice(1);
|
|||
|
||||
const BUILD_VERSION = "7.0.19";
|
||||
|
||||
let player_build;
|
||||
|
||||
|
||||
// THIS IS SUPER DANGEROUS, WE SHOULD NOT BE KEEPING THIS IN SO MANY PLACES
|
||||
let editable_item_fields = [ "sdPct", "sdRaw", "mdPct", "mdRaw", "poison",
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
let player_build;
|
||||
let build_powders;
|
||||
|
||||
function getItemNameFromID(id) { return idMap.get(id); }
|
||||
function getTomeNameFromID(id) { return tomeIDMap.get(id); }
|
||||
|
||||
function parsePowdering(powder_info) {
|
||||
// TODO: Make this run in linear instead of quadratic time... ew
|
||||
let powdering = [];
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
let build_powders;
|
||||
|
||||
function getItemNameFromID(id) {
|
||||
if (redirectMap.has(id)) {
|
||||
return getItemNameFromID(redirectMap.get(id));
|
||||
}
|
||||
return idMap.get(id);
|
||||
}
|
||||
|
||||
function getTomeNameFromID(id) {
|
||||
if (tomeRedirectMap.has(id)) {
|
||||
return getTomeNameFromID(tomeRedirectMap.get(id));
|
||||
}
|
||||
return tomeIDMap.get(id);
|
||||
}
|
||||
|
||||
function populateBuildList() {
|
||||
const buildList = document.getElementById("build-choice");
|
||||
|
@ -148,7 +133,6 @@ function toggle_tab(tab) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function toggle_boost_tab(tab) {
|
||||
for (const i of skp_order) {
|
||||
document.querySelector("#"+i+"-boost").style.display = "none";
|
||||
|
@ -156,13 +140,10 @@ function toggle_boost_tab(tab) {
|
|||
}
|
||||
document.querySelector("#"+tab+"-boost").style.display = "";
|
||||
document.getElementById(tab + "-boost-tab").classList.add("selected-btn");
|
||||
|
||||
}
|
||||
|
||||
let tabs = ['overall-stats', 'offensive-stats', 'defensive-stats'];
|
||||
function show_tab(tab) {
|
||||
//console.log(itemFilters)
|
||||
|
||||
//hide all tabs, then show the tab of the div clicked and highlight the correct button
|
||||
for (const i in tabs) {
|
||||
document.querySelector("#" + tabs[i]).style.display = "none";
|
||||
|
@ -319,51 +300,6 @@ function init_autocomplete() {
|
|||
}));
|
||||
}
|
||||
|
||||
let filter_loc = ["filter1", "filter2", "filter3", "filter4"];
|
||||
for (const i of filter_loc) {
|
||||
dropdowns.set(i+"-choice", new autoComplete({
|
||||
data: {
|
||||
src: sq2ItemFilters,
|
||||
},
|
||||
selector: "#"+i+"-choice",
|
||||
wrapper: false,
|
||||
resultsList: {
|
||||
tabSelect: true,
|
||||
noResults: true,
|
||||
class: "search-box dark-7 rounded-bottom px-2 fw-bold dark-shadow-sm",
|
||||
element: (list, data) => {
|
||||
// dynamic result loc
|
||||
console.log(i);
|
||||
list.style.zIndex = "100";
|
||||
let position = document.getElementById(i+"-dropdown").getBoundingClientRect();
|
||||
window_pos = document.getElementById("search-container").getBoundingClientRect();
|
||||
list.style.top = position.bottom - window_pos.top + 5 +"px";
|
||||
list.style.left = position.x - window_pos.x +"px";
|
||||
list.style.width = position.width+"px";
|
||||
|
||||
if (!data.results.length) {
|
||||
message = document.createElement('li');
|
||||
message.classList.add('scaled-font');
|
||||
message.textContent = "No filters found!";
|
||||
list.prepend(message);
|
||||
}
|
||||
},
|
||||
},
|
||||
resultItem: {
|
||||
class: "scaled-font search-item",
|
||||
selected: "dark-5",
|
||||
},
|
||||
events: {
|
||||
input: {
|
||||
selection: (event) => {
|
||||
if (event.detail.selection.value) {
|
||||
event.target.value = event.detail.selection.value;
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
function collapse_element(elmnt) {
|
||||
|
@ -393,6 +329,7 @@ function init() {
|
|||
for (const eq of equipment_keys) {
|
||||
document.querySelector("#"+eq+"-tooltip").addEventListener("click", () => collapse_element('#'+eq+'-tooltip'));
|
||||
}
|
||||
// Armor Specials
|
||||
for (let i = 0; i < 5; ++i) {
|
||||
const powder_special = powderSpecialStats[i];
|
||||
const elem_name = damageClasses[i+1]; // skip neutral
|
||||
|
|
|
@ -192,7 +192,13 @@ class ItemInputNode extends InputNode {
|
|||
|
||||
for (const [i, x] of zip2(equipment_inputs, replace_items)) { setValue(i, x); }
|
||||
|
||||
for (const node of item_nodes) { calcSchedule(node, 10); }
|
||||
for (const node of item_nodes) {
|
||||
if (node !== this) {
|
||||
// save a tiny bit of compute
|
||||
calcSchedule(node, 10);
|
||||
}
|
||||
}
|
||||
// Needed to push the weapon node's updates forward
|
||||
return this.compute_func(input_map);
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue