emergency update
i don't like unilaterally editing people's mods but the move away from viewKey fatally broke the mod
This commit is contained in:
parent
b08c91662e
commit
2d136cc310
|
|
@ -15,41 +15,40 @@ window.addEventListener("load", ()=>{
|
|||
});
|
||||
function updateStatsNew() {
|
||||
var statsDiv = document.getElementById("stats");
|
||||
var stats = "<span id='stat-pos' class='stat'>x" + mousePos.x + ",y" + mousePos.y + "</span>";
|
||||
stats += "<span id='stat-pixels' class='stat'>Pxls:" + currentPixels.length + "</span>";
|
||||
stats += "<span id='stat-tps' class='stat'>" + tps + " set tps</span>";
|
||||
stats += "<span id='stat-realtps' class='stat'>" + realTps + "tps</span>";
|
||||
stats += "<span id='stat-ticks' class='stat'>" + pixelTicks + "</span>";
|
||||
if (typeof pixelMap == 'undefined') {
|
||||
return;
|
||||
}
|
||||
if (pixelMap[mousePos.x] != undefined) {
|
||||
var stats = "<span id='stat-pos' class='stat'>x"+mousePos.x+",y"+mousePos.y+"</span>";
|
||||
stats += "<span id='stat-pixels' class='stat"+ (currentPixels.length >= maxPixelCount ? " redText" : "") +"'>Pxls:" + currentPixels.length+"</span>";
|
||||
stats += "<span id='stat-tps' class='stat'>" + tps+"tps</span>";
|
||||
stats += "<span id='stat-realtps' class='stat'>" + realTps + "tps</span>";
|
||||
stats += "<span id='stat-ticks' class='stat'>" + pixelTicks+"</span>";
|
||||
if ((typeof pixelMap).length === 9) { return; }
|
||||
if (pixelMap[mousePos.x] !== undefined) {
|
||||
var currentPixel = pixelMap[mousePos.x][mousePos.y];
|
||||
if (currentPixel != undefined) {
|
||||
stats += "<span id='stat-element' class='stat'>Elem:" + (elements[currentPixel.element].name || currentPixel.element).toString().toUpperCase() + "</span>";
|
||||
stats += "<span id='stat-temperature' class='stat'>Temp:" + formatTemp(currentPixel.temp) + "</span>";
|
||||
if (currentPixel !== undefined) {
|
||||
stats += "<span id='stat-element' class='stat'>Elem:"+(elements[currentPixel.element].name || currentPixel.element).toUpperCase()+"</span>";
|
||||
stats += "<span id='stat-temperature' class='stat'>Temp:"+formatTemp(currentPixel.temp)+"</span>";
|
||||
if (currentPixel.charge) {
|
||||
stats += "<span id='stat-charge' class='stat'>C" + currentPixel.charge + "</span>";
|
||||
stats += "<span id='stat-charge' class='stat'>C"+parseFloat(currentPixel.charge)+"</span>";
|
||||
}
|
||||
if (currentPixel.burning) {
|
||||
stats += "<span id='stat-burning' class='stat'>Burning</span>";
|
||||
}
|
||||
if (elements[currentPixel.element].hoverStat) {
|
||||
stats += "<span id='stat-hover' class='stat'>"+elements[currentPixel.element].hoverStat(currentPixel).toString().replaceAll("<","<")+"</span>";
|
||||
}
|
||||
else if (currentPixel.clone) {
|
||||
stats += "<span id='stat-clone' class='stat'>"+currentPixel.clone.toString().toUpperCase().replaceAll("<","<")+"</span>";
|
||||
}
|
||||
else if (currentPixel.con && currentPixel.con.element) {
|
||||
stats += "<span id='stat-clone' class='stat'>"+currentPixel.con.element.toString().toUpperCase().replaceAll("<","<")+"</span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (shiftDown) {
|
||||
if (shiftDown == 1) {
|
||||
stats += "<span id='stat-shift' class='stat'>[↑ ]</span>";
|
||||
} else if (shiftDown == 2) {
|
||||
stats += "<span id='stat-shift' class='stat'>[A ]</span>";
|
||||
} else if (shiftDown == 3) {
|
||||
stats += "<span id='stat-shift' class='stat'>[ ↑]</span>";
|
||||
} else if (shiftDown == 4) {
|
||||
stats += "<span id='stat-shift' class='stat'>[ A]</span>";
|
||||
}
|
||||
stats += "<span id='stat-shift' class='stat'>"+shiftDownTypes[shiftDown]+"</span>";
|
||||
}
|
||||
// If the view is not null, show the view in all caps
|
||||
if (view != null) {
|
||||
stats += "<span id='stat-view' class='stat'>" + viewKey[view].toString().toUpperCase() + "</span>";
|
||||
if (view !== null) {
|
||||
stats += "<span id='stat-view' class='stat'>"+(viewInfo[view] ? viewInfo[view].name : view)+"</span>";
|
||||
}
|
||||
statsDiv.innerHTML = stats;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue