Rename init functions

This commit is contained in:
b 2021-04-02 15:07:15 -07:00
parent dbcba4ff18
commit 64550a81fe
8 changed files with 20 additions and 26 deletions

View file

@ -108,7 +108,7 @@ function populateItemList(type) {
* Populate dropdowns, add listeners, etc.
*/
function init() {
console.log("builder.js init");
for (const armorType of armorTypes) {
populateItemList(armorType);

View file

@ -33,7 +33,7 @@ function setTitle() {
function init() {
function init_crafter() {
//no ing
console.log("all ingredients");
@ -344,4 +344,4 @@ function resetFields() {
calculateCraft();
}
load_ing_init(init);
load_ing_init(init_crafter);

View file

@ -37,7 +37,7 @@ let neg_range = [1.3,0.7];
let roll_range_ids = ["neg_roll_range-choice-min","neg_roll_range-choice-max","pos_roll_range-choice-min","pos_roll_range-choice-max"];
function init() {
function init_customizer() {
try {
populateFields();
@ -694,5 +694,8 @@ function resetBaseValues() {
}
}
load_init(init);
load_ing_init(init);
function _init_customizer() {
load_ing_init(init_customizer);
}
load_init(_init_customizer);

15
item.js
View file

@ -19,18 +19,9 @@ function setTitle() {
setTitle();
/*
* END testing section
*/
let item;
function init() {
function init_itempage() {
//console.log(item_url_tag);
//displayExpandedItem(expandItem(itemMap.get(item_url_tag).statMap, []), "item-view");
@ -53,5 +44,5 @@ function init() {
load_init(init);
//load_ing_init(init);
load_init(init_itempage);
//load_ing_init(init);

View file

@ -189,8 +189,8 @@ function doItemSearch() {
displayItems(items_copy);
}
function init() {
function init_items() {
items_expanded = items.filter( (i) => !("remapID" in i) ).map( (i) => expandItem(i, []) );
}
load_init(init);
load_init(init_items);

View file

@ -54,7 +54,7 @@ function stringify(v) {
return typeof v === 'number' ? (Math.round(v * 100) / 100).toString() : v;
}
function init() {
function init_items2() {
const itemList = document.getElementById('item-list');
const itemListFooter = document.getElementById('item-list-footer');
@ -198,4 +198,4 @@ function init() {
searchFilterField.field.select();
}
load_init(init);
load_init(init_items2);

View file

@ -41,12 +41,12 @@ async function load_local(init_func) {
console.log("Successfully read local set db.");
//console.log(sets);
init_maps();
console.log(init_func);
init_func();
}
}
}
await get_tx.complete;
db.close();
init_func();
}
/*

4
map.js
View file

@ -60,7 +60,7 @@ const resourceColors = new Map([
/** Thanks to kristofbolyai's github page for showing me how to do all of this.
*
*/
function init(){ //async just in case we need async stuff
function init_map(){ //async just in case we need async stuff
map_elem = document.getElementById("mapdiv");
let coordx_elem = document.getElementById("coord-x");
let coordz_elem = document.getElementById("coord-z");
@ -581,5 +581,5 @@ function eraseTerritoryStats() {
}
load_map_init(init);
load_map_init(init_map);