-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmain.js
More file actions
87 lines (84 loc) · 3.49 KB
/
Copy pathmain.js
File metadata and controls
87 lines (84 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
function Update() {
saveStuff(); //save current settings for next use of tracker
changeThemes();
checkCircleInfo(); //updates the numbers in the circles next to dungeon names
itemHighlights(); //add or remove transparency if player has or does not have items, respectively
dungeonHighlights(); //highlight medallions if player has them and highlight dungeon text if player still needs to beat it
if (document.getElementById("shiftChecks").value == "YES") areaBreaks(); //add or remove line breaks for areas based on whether any checks in that area are currently being displayed
updateSummaryText()
updateProbabilities() // update the probabilities for items based on checks of that type left vs checks remaining
}
function fastUpdate() {
if(toFocus != null) {
toFocus.focus();
toFocus = null;
}
timerStuff(); //implements a timer to use as an alternative to stuff like livesplit
processInputs(); //handles hinted, peeked and picked up things
if (document.activeElement == document.getElementById("markMedallions")) {
stoneMedallionInput();
}
if (document.activeElement == document.getElementById("mark_ER_Dungeons")) {
updateDungeonER();
}
if (document.activeElement == document.getElementById("hintInput")) {
alternateHintInput();
}
if (document.activeElement.id.startsWith("woth") || document.activeElement.id.startsWith("barren") || document.activeElement.id.startsWith("path")) {
wothAndBarrenProcessing();
}
if (document.activeElement === document.body) {
highlightNextCheck(Locations[0]);
}
if (document.activeElement === document.getElementById("inputPresets")) {
inputPresets();
}
}
function midUpdate() {
var i = 0;
var previousInLogicChecks = Player.logically_accessible;
var previousInLogicSkulls = Logic.gold_skulltulas;
var flag = false;
while (i < 100000) {
refreshLogicForStuff(); //puts something in or out of logic based on whether its location is in or out of logic
logicShortcuts(); //combines multiple pieces of logic into one variable
locationLogic(); //updates logic and accessibility for all locations
updateDungeonER();
gsArrayBuilder(); //just moves gs logic into an array
if (i >=1 && Player.logically_accessible > previousInLogicChecks || Logic.gold_skulltulas > previousInLogicSkulls) {
i += 1;
previousInLogicChecks = Player.logically_accessible;
previousInLogicSkulls = Logic.gold_skulltulas;
flag = false;
}
else if (!flag) {
flag = true;
}
else {
i = 100000;
}
}
stoneMedallionInput();
wothAndBarrenProcessing(); //do various things based on woth and barrens;
alternateHintInput(); //implements inputting hints into the note box;
setInLogicMaxForDungeons(); //ensures that dungeons will never add more to the in logic counter than the amount of items they contain
updateLogicInfo(); //updates colors and counts for checks, woths and the skull, remaining, in-logic counters
updateSpawnInputs(); //child and adult spawn input
refreshLinSo();
updateWothBorders(); // highlight woth checks if option enabled;
updateUsefulAreaItems();
dungeonHeaderVisibility();
Update();
}
function slowUpdate() {
updateInputs(); //implements custom inputs
if (!nerfed) {
WotHItems = [];
for (i=0; i < Items.length; i++) {
ChecksLockedBy[Items[i]] = checksLockedByItem(Items[i]);
}
for (i=0; i < Items.length; i++) {
if (Location[Items[i]] != null ) {ChecksPutInLogicBy[Items[i]] = checksPutInLogicByItem(Items[i]);}
}
}
}