diff --git a/mods/Shroomboxels.js b/mods/Shroomboxels.js index f871bbe0..29d3bf61 100644 --- a/mods/Shroomboxels.js +++ b/mods/Shroomboxels.js @@ -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++}; } diff --git a/mods/a_mod_by_alice.js b/mods/a_mod_by_alice.js index e017b054..74ced39e 100644 --- a/mods/a_mod_by_alice.js +++ b/mods/a_mod_by_alice.js @@ -4665,6 +4665,22 @@ color1 and color2 spread through striped paint like dye does with itself. 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++; diff --git a/mods/acid_and_shapes.js b/mods/acid_and_shapes.js index 41d8a344..85b06c09 100644 --- a/mods/acid_and_shapes.js +++ b/mods/acid_and_shapes.js @@ -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++}; } diff --git a/mods/gradient_background_support.js b/mods/gradient_background_support.js index 28b25dab..c3ed553c 100644 --- a/mods/gradient_background_support.js +++ b/mods/gradient_background_support.js @@ -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 ++; } diff --git a/mods/special_property_library.js b/mods/special_property_library.js index 26ce7684..551fef1d 100644 --- a/mods/special_property_library.js +++ b/mods/special_property_library.js @@ -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 diff --git a/mods/velocity.js b/mods/velocity.js index cd87d0af..e5b83e26 100644 --- a/mods/velocity.js +++ b/mods/velocity.js @@ -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++}; }