Skip to content

Commit

Permalink
Simplified Logic as it no longer needs all the special randomizer cod…
Browse files Browse the repository at this point in the history
…e, player data dump now properly notifies the overlay with the correct values.
  • Loading branch information
iamwyza committed Dec 8, 2017
1 parent cca6a10 commit b0bfd65
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 46 deletions.
2 changes: 2 additions & 0 deletions Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
For Page Width and Height, this should be the size, in pixels, that you normally capture HK with in OBS. Common values are 1920x1080 & 1080x720.
<br /> <br />
Next you'll be given the ability to move stuff around the page. The green border signifies the area that you'll be displaying in OBS. Icons can be moved from container to container or reordered within the container. Icons moved into the Red/Disabled container will be hidden even if you pick them up.
<br /> <br />
For more information go to: <a href="https://github.com/iamwyza/HollowKnightRandomizerTracker">https://github.com/iamwyza/HollowKnightRandomizerTracker</a>
</p>
<ul style="list-style-type:none">
<li><label for="setupPageWidth">Page Width:</label><input type="text" id="setupPageWidth" value="1920" /></li>
Expand Down
52 changes: 7 additions & 45 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ $( document ).ready(function() {
googleApikey = localKey;

var profileId = getParameterByName("profile");


var regexReplaceUrl = new RegExp(/^(file:\/\/.*Index.html)/);

var makeNew = getParameterByName("makeNew");

var regexReplaceUrl = new RegExp(/^(file:\/\/.*Index.html)/);



Expand Down Expand Up @@ -88,7 +89,7 @@ $( document ).ready(function() {

console.log(profileId);

if (profileId != undefined){
if (profileId != undefined && makeNew == null){
if (isEditing) {
init(function() {
wsprofile.send("load|" + profileId);
Expand Down Expand Up @@ -837,40 +838,11 @@ $( document ).ready(function() {
value = minData.value;
break;
}

switch (name) {
case "fireballLevel1":
case "fireballLevel2":
data["fireballLevel"]++;
break;
case "quakeLevel1":
case "quakeLevel2":
data["quakeLevel"]++;
break;
case "screamLevel1":
case "screamLevel2":
data["screamLevel"]++;
break;
case "trinket1":
case "trinket2":
case "trinket3":
case "trinket4":
send("relics");
return;
default:
data[name] = value;
break;
}

data[name] = value;
}

}else{
if(lastCommand == "relics") {
console.log(minData);
$.each(minData, function(i, e) {
data[i] = e;
});
}else if (minData != undefined){
if (minData != undefined){
data = minData;
}
}
Expand Down Expand Up @@ -1028,10 +1000,6 @@ $( document ).ready(function() {
else
$('#dreamNailUpgraded').removeClass("selected").parent().hide();
}



//updateUrlConfig();
}

function updateVisible() {
Expand All @@ -1044,17 +1012,11 @@ $( document ).ready(function() {
function updateUrlConfig() {
console.log("Updating url string");

//config = LZString.compressToEncodedURIComponent(JSON.stringify(map));

//urlParams["config"] = config;
urlParams["profile"] = profileId;
window.history.pushState(profileId, "", "Index.html?" + $.param(urlParams) );

if (map != undefined && wsprofile.readyState === wsprofile.OPEN)
wsprofile.send("save|" + profileId + "|" + btoa(JSON.stringify(map, null, 2).replace("==", "%3D%3D")));

//if (config.length > 1900)
// alert("Developer Warning, config length is > 1900. If you see this message let the developer know.");
}

function setSelected(has, id) {
Expand Down
1 change: 0 additions & 1 deletion version.txt

This file was deleted.

0 comments on commit b0bfd65

Please sign in to comment.