mods hotfix
This commit is contained in:
parent
fd6525fc63
commit
c8bcfab323
|
|
@ -50,5 +50,22 @@ function drawPixels(forceTick=false) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elements[currentElement].maxSize < mouseSize) {
|
||||
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||
}
|
||||
else {
|
||||
var mouseOffset = Math.trunc(mouseSize/2);
|
||||
}
|
||||
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||
// Draw a square around the mouse
|
||||
ctx.strokeStyle = "white";
|
||||
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||
// draw one transparent pixel in the center
|
||||
if (settings.precision) {
|
||||
ctx.fillStyle = "rgba(255,255,255,0.5)";
|
||||
ctx.fillRect(mousePos.x*pixelSize,mousePos.y*pixelSize,pixelSize,pixelSize);
|
||||
}
|
||||
if ((!paused) || forceTick) {pixelTicks++};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4665,6 +4665,22 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
|||
}
|
||||
}
|
||||
}
|
||||
if (elements[currentElement].maxSize < mouseSize) {
|
||||
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||
}
|
||||
else {
|
||||
var mouseOffset = Math.trunc(mouseSize/2);
|
||||
}
|
||||
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||
// Draw a square around the mouse
|
||||
ctx.strokeStyle = "white";
|
||||
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||
// draw one transparent pixel in the center
|
||||
if (settings.precision) {
|
||||
ctx.fillStyle = "rgba(255,255,255,0.5)";
|
||||
ctx.fillRect(mousePos.x*pixelSize,mousePos.y*pixelSize,pixelSize,pixelSize);
|
||||
}
|
||||
if ((!paused) || forceTick) {pixelTicks++};
|
||||
|
||||
findColorPulseTimerSubTimer++;
|
||||
|
|
|
|||
|
|
@ -160,6 +160,23 @@ function drawPixels(forceTick=false) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elements[currentElement].maxSize < mouseSize) {
|
||||
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||
}
|
||||
else {
|
||||
var mouseOffset = Math.trunc(mouseSize/2);
|
||||
}
|
||||
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||
// Draw a square around the mouse
|
||||
ctx.strokeStyle = "white";
|
||||
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||
// draw one transparent pixel in the center
|
||||
if (settings.precision) {
|
||||
ctx.fillStyle = "rgba(255,255,255,0.5)";
|
||||
ctx.fillRect(mousePos.x*pixelSize,mousePos.y*pixelSize,pixelSize,pixelSize);
|
||||
}
|
||||
if ((!paused) || forceTick) {pixelTicks++};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,21 +49,7 @@ tick = function() {
|
|||
}
|
||||
}
|
||||
|
||||
if (currentElement == "pick" || currentElement == "lookup") {
|
||||
var mouseOffset = 0;
|
||||
}
|
||||
else if (elements[currentElement].maxSize < mouseSize) {
|
||||
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||
}
|
||||
else {
|
||||
var mouseOffset = Math.trunc(mouseSize/2);
|
||||
}
|
||||
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||
// Draw a rectangle around the mouse
|
||||
ctx.strokeStyle = "white";
|
||||
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||
updateStats();
|
||||
|
||||
//ticks ++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,23 @@ if(enabledMods.includes(libraryMod) && enabledMods.includes(libHookTickMod)) {
|
|||
if (ctx.globalAlpha < 1) {
|
||||
ctx.globalAlpha = 1;
|
||||
}
|
||||
|
||||
if (elements[currentElement].maxSize < mouseSize) {
|
||||
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||
}
|
||||
else {
|
||||
var mouseOffset = Math.trunc(mouseSize/2);
|
||||
}
|
||||
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||
// Draw a square around the mouse
|
||||
ctx.strokeStyle = "white";
|
||||
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||
// draw one transparent pixel in the center
|
||||
if (settings.precision) {
|
||||
ctx.fillStyle = "rgba(255,255,255,0.5)";
|
||||
ctx.fillRect(mousePos.x*pixelSize,mousePos.y*pixelSize,pixelSize,pixelSize);
|
||||
}
|
||||
if ((!paused) || forceTick) {pixelTicks++};
|
||||
}
|
||||
//I hate overwriting drawPixels
|
||||
|
|
|
|||
|
|
@ -146,6 +146,23 @@ drawPixels = function(forceTick=false) {
|
|||
if (ctx.globalAlpha < 1) {
|
||||
ctx.globalAlpha = 1;
|
||||
}
|
||||
|
||||
if (elements[currentElement].maxSize < mouseSize) {
|
||||
var mouseOffset = Math.trunc(elements[currentElement].maxSize/2);
|
||||
}
|
||||
else {
|
||||
var mouseOffset = Math.trunc(mouseSize/2);
|
||||
}
|
||||
var topLeft = [mousePos.x-mouseOffset,mousePos.y-mouseOffset];
|
||||
var bottomRight = [mousePos.x+mouseOffset,mousePos.y+mouseOffset];
|
||||
// Draw a square around the mouse
|
||||
ctx.strokeStyle = "white";
|
||||
ctx.strokeRect(topLeft[0]*pixelSize,topLeft[1]*pixelSize,(bottomRight[0]-topLeft[0]+1)*pixelSize,(bottomRight[1]-topLeft[1]+1)*pixelSize);
|
||||
// draw one transparent pixel in the center
|
||||
if (settings.precision) {
|
||||
ctx.fillStyle = "rgba(255,255,255,0.5)";
|
||||
ctx.fillRect(mousePos.x*pixelSize,mousePos.y*pixelSize,pixelSize,pixelSize);
|
||||
}
|
||||
if ((!paused) || forceTick) {pixelTicks++};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue