diff --git a/dist/BlueMarble.user.css b/dist/BlueMarble.user.css
index 597c5eb..9da12cf 100644
--- a/dist/BlueMarble.user.css
+++ b/dist/BlueMarble.user.css
@@ -1 +1 @@
-#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url('data:image/svg+xml;utf8,') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-contain-header{margin-bottom:.5em}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus-visible{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through}
+#bm-overlay{position:fixed;background-color:#153063e6;color:#fff;padding:10px;border-radius:8px;z-index:9000}div#bm-overlay{font-family:Roboto Mono,Courier New,Monaco,DejaVu Sans Mono,monospace,Arial;letter-spacing:.05em}#bm-bar-drag{margin-bottom:.5em;background:url('data:image/svg+xml;utf8,') repeat;cursor:grab;width:100%;height:1em}#bm-bar-drag.dragging{cursor:grabbing}#bm-contain-header{margin-bottom:.5em}#bm-overlay img{display:inline-block;height:2.5em;margin-right:1ch;vertical-align:middle}#bm-overlay h1{display:inline-block;font-size:x-large;font-weight:700;vertical-align:middle}#bm-contain-automation input[type=checkbox]{vertical-align:middle;margin-right:.5ch}#bm-contain-automation label{margin-right:.5ch}.bm-help{border:white 1px solid;height:1.5em;width:1.5em;margin-top:2px;text-align:center;line-height:1em;padding:0!important}#bm-button-coords{vertical-align:middle}#bm-button-coords svg{width:50%;margin:0 auto;fill:#111}#bm-contain-coords input[type=number]{appearance:auto;-moz-appearance:textfield;width:5.5ch;margin-left:1ch;background-color:#0003;padding:0 .5ch;font-size:small}#bm-contain-coords input[type=number]::-webkit-outer-spin-button,#bm-contain-coords input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#bm-contain-buttons-template{display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;gap:1ch}div:has(>#bm-input-file-template)>button{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#bm-output-status{font-size:small;background-color:#0003;padding:0 .5ch;height:3.75em;width:100%}#bm-contain-buttons-action{display:flex;justify-content:space-between}#bm-overlay small{font-size:x-small;color:#d3d3d3}#bm-contain-userinfo,#bm-contain-automation,#bm-contain-coords,#bm-contain-buttons-template,div:has(>#bm-input-file-template),#bm-output-status{margin-top:.5em}#bm-overlay button{background-color:#144eb9;border-radius:1em;padding:0 .75ch}#bm-overlay button:hover,#bm-overlay button:focus-visible{background-color:#1061e5}#bm-overlay button:active,#bm-overlay button:disabled{background-color:#2e97ff}#bm-overlay button:disabled{text-decoration:line-through}
diff --git a/dist/BlueMarble.user.js b/dist/BlueMarble.user.js
index d0700f9..f1a436e 100644
--- a/dist/BlueMarble.user.js
+++ b/dist/BlueMarble.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Blue Marble
// @namespace https://github.com/SwingTheVine/
-// @version 0.55.7
+// @version 0.55.11
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @author SwingTheVine
// @license MPL-2.0
@@ -20,4 +20,4 @@
// Wplace --> https://wplace.live
// License --> https://www.mozilla.org/en-US/MPL/2.0/
-(()=>{var t,e,n=t=>{throw TypeError(t)},s=(t,e,s)=>(((t,e)=>{e.has(t)||n("Cannot access private method")})(t,e),s);t=new WeakSet,e=function(t,e={},n={}){const s=document.createElement(t);this.t?(this.i.appendChild(s),this.o.push(this.i),this.i=s):(this.t=s,this.i=s);for(const[t,n]of Object.entries(e))s[t]=n;for(const[t,e]of Object.entries(n))s[t]=e;return s};var i=class{static h(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}static l(t,e){return[parseInt(t[0])%4*1e3+parseInt(e[0]),parseInt(t[1])%4*1e3+parseInt(e[1])]}},o=GM_info.script.name.toString(),a=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.textContent=`(${t})();`,document.documentElement.appendChild(e),e.remove()}(()=>{const t=window.fetch;window.fetch=async function(...e){const n=await t.apply(this,e),s=n.clone();if((s.headers.get("content-type")||"").includes("application/json")){let t=(e[0]instanceof Request?e[0]?.url:e[0])||"ignore";console.log(`Sending JSON message about endpoint "${t}"`),s.json().then(e=>{window.postMessage({source:"blue-marble",endpoint:t,jsonData:e},"*")}).catch(t=>{console.error("BM - Failed to parse JSON:",t)})}return n}});var r=GM_getResourceText("CSS-BM-File");GM_addStyle(r);var c=document.createElement("link");c.href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap",c.rel="preload",c.as="style",c.onload=function(){this.onload=null,this.rel="stylesheet"},document.head.appendChild(c),new class{constructor(){this.u=null,this.m=null,this.p="#bm-display-coords"}v(t){return this.m=t,this.u=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.p)}),this}M(){return this.u}observe(t,e=!1,n=!1){t.observe(this.m,{childList:e,subtree:n})}};var d=new class{constructor(e,s){var i,o;i=this,(o=t).has(i)?n("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,undefined),this.name=e,this.version=s,this.$=null,this.C="bm-output-status",this.t=null,this.i=null,this.o=[]}T(t){this.$=t}k(){return this.o.length>0&&(this.i=this.o.pop()),this}N(t){t.appendChild(this.t),this.t=null,this.i=null,this.o=[]}S(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"div",{},n)),this}I(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"p",{},n)),this}L(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"img",{},n)),this}B(n,i={},o=()=>{}){return o(this,s(this,t,e).call(this,"h"+n,{},i)),this}D(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"hr",{},n)),this}H(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"br",{},n)),this}O(n={},i=()=>{}){const o=s(this,t,e).call(this,"label",{textContent:n.textContent??""});delete n.textContent;const a=s(this,t,e).call(this,"input",{type:"checkbox"},n);return o.insertBefore(a,o.firstChild),this.k(),i(this,o,a),this}P(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"button",{},n)),this}R(n={},i=()=>{}){const o=n.title??n.textContent??"Help: No info";delete n.textContent,n.title=`Help: ${o}`;const a={textContent:"?",className:"bm-help",onclick:()=>{this.U(this.C,o)}};return i(this,s(this,t,e).call(this,"button",a,n)),this}j(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"input",{},n)),this}_(n={},i=()=>{}){const o=n.textContent??"";delete n.textContent;const a=s(this,t,e).call(this,"div"),r=s(this,t,e).call(this,"input",{type:"file",style:"display: none;"},n);this.k();const c=s(this,t,e).call(this,"button",{textContent:o});return this.k(),this.k(),c.addEventListener("click",()=>{r.click()}),r.addEventListener("change",()=>{c.style.maxWidth=`${c.offsetWidth}px`,r.files.length>0?c.textContent=r.files[0].name:c.textContent=o}),i(this,a,r,c),this}F(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"textarea",{},n)),this}U(t,e,n=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:n?s.textContent=e:s.innerHTML=e)}G(t,e){let n,s=!1,i=0;t=document.querySelector("#"==t?.[0]?t:"#"+t),e=document.querySelector("#"==e?.[0]?e:"#"+e),t&&e?(e.addEventListener("mousedown",function(o){s=!0,n=o.clientX-t.getBoundingClientRect().left,i=o.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging")}),e.addEventListener("touchstart",function(o){s=!0;const a=o?.touches?.[0];a&&(n=a.clientX-t.getBoundingClientRect().left,i=a.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(e){s&&(t.style.left=e.clientX-n+"px",t.style.top=e.clientY-i+"px",t.style.right="")}),document.addEventListener("touchmove",function(e){if(s){const s=e?.touches?.[0];if(!s)return;t.style.left=s.clientX-n+"px",t.style.top=s.clientY-i+"px",e.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchend",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")})):this.W(`Can not drag! ${t?"":"moveMe"} ${t||e?"":"and "}${e?"":"iMoveThings "}was not found!`)}W(t){(0,console.error)(`${this.name}: ${t}`),this.U(this.C,"Error: "+t,!0)}}(o,a),h=new class{constructor(){this.X=!1,this.Y=[]}q(t){window.addEventListener("message",e=>{const n=e.data,s=n.jsonData;if(!n||"blue-marble"!==n.source)return;const o=n.endpoint.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).pop();switch(console.log(`Recieved message about "${o}"`),o){case"me":if(s.status&&"2"!=s.status?.toString()[0])return void t.W("The game is down!\nCould not fetch userdata.");const e=Math.ceil(Math.pow(Math.floor(s.level)*Math.pow(30,.65),1/.65)-s.pixelsPainted);t.U("bm-user-name",`Username: ${i.h(s.name)}`),t.U("bm-user-droplets",`Droplets: ${(new Intl.NumberFormat).format(s.droplets)}`),t.U("bm-user-nextlevel",`Next level in ${(new Intl.NumberFormat).format(e)} pixel${1==e?"":"s"}`);break;case"pixel":const o=n.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),a=new URLSearchParams(n.endpoint.split("?")[1]),r=[a.get("x"),a.get("y")];if(this.Y.length&&(!o.length||!r.length))return void t.W("Coordinates are malformed!\nDid you try clicking the canvas first?");this.Y=[...o,...r];const c=i.l(o,r),d=document.querySelectorAll("span");for(const t of d)if(t.textContent.trim().includes(`${c[0]}, ${c[1]}`)){let e=document.querySelector("#bm-display-coords");const n=`(Tl X: ${o[0]}, Tl Y: ${o[1]}, Px X: ${r[0]}, Px Y: ${r[1]})`;e?e.textContent=n:(e=document.createElement("span"),e.id="bm-display-coords",e.textContent=n,e.style="margin-left: calc(var(--spacing)*3); font-size: small;",t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",e))}break;case"robots":this.X="false"==s.userscript?.toString().toLowerCase();break}})}};d.T(h),d.S({id:"bm-overlay",style:"top: 10px; right: 75px;"}).S({id:"bm-contain-header"}).S({id:"bm-bar-drag"}).k().L({alt:"Blue Marble Icon",src:"https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/assets/Favicon.png"}).k().B(1,{textContent:o}).k().k().D().k().S({id:"bm-contain-userinfo"}).I({id:"bm-user-name",textContent:"Username:"}).k().I({id:"bm-user-droplets",textContent:"Droplets:"}).k().I({id:"bm-user-nextlevel",textContent:"Next level in..."}).k().k().D().k().S({id:"bm-contain-automation"}).O({id:"bm-input-stealth",textContent:"Stealth",checked:!0}).k().R({title:"Waits for the website to make requests, instead of sending requests."}).k().H().k().O({id:"bm-input-possessed",textContent:"Possessed",checked:!0}).k().R({title:"Controls the website as if it were possessed."}).k().H().k().S({id:"bm-contain-coords"}).P({id:"bm-button-coords",className:"bm-help",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.$?.Y;e?.[0]?(t.U("bm-input-tx",e?.[0]||""),t.U("bm-input-ty",e?.[1]||""),t.U("bm-input-px",e?.[2]||""),t.U("bm-input-py",e?.[3]||"")):t.W("Coordinates are malformed! Did you try clicking on the canvas first?")}}).k().j({type:"number",id:"bm-input-tx",placeholder:"Tl X",min:0,max:2047,step:1}).k().j({type:"number",id:"bm-input-ty",placeholder:"Tl Y",min:0,max:2047,step:1}).k().j({type:"number",id:"bm-input-px",placeholder:"Px X",min:0,max:2047,step:1}).k().j({type:"number",id:"bm-input-py",placeholder:"Px Y",min:0,max:2047,step:1}).k().k()._({id:"bm-input-file-template",textContent:"Upload Template",accept:"image/png, image/jpeg, image/webp, image/bmp, image/gif"}).k().S({id:"bm-contain-buttons"}).P({id:"bm-button-enable",textContent:"Enable"},(t,e)=>{e.onclick=()=>{const e=document.querySelector("#bm-input-file-template");if(!e?.files[0])return void t.W("No file selected!");const n=URL.createObjectURL(e.files[0]);window.open(n,"_blank"),setTimeout(()=>URL.revokeObjectURL(n),1e4)}}).k().P({id:"bm-button-disable",textContent:"Disable"}).k().k().F({id:d.C,placeholder:`Status: Sleeping...\nVersion: ${a}`,readOnly:!0}).k().k().N(document.body),d.G("#bm-overlay","#bm-bar-drag"),h.q(d),console.log(`${o} (${a}) userscript has loaded!`)})();
\ No newline at end of file
+(()=>{var t,e,n=t=>{throw TypeError(t)},s=(t,e,s)=>(((t,e)=>{e.has(t)||n("Cannot access private method")})(t,e),s);t=new WeakSet,e=function(t,e={},n={}){const s=document.createElement(t);this.t?(this.i.appendChild(s),this.o.push(this.i),this.i=s):(this.t=s,this.i=s);for(const[t,n]of Object.entries(e))s[t]=n;for(const[t,e]of Object.entries(n))s[t]=e;return s};var i=class{static l(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}static h(t,e){return[parseInt(t[0])%4*1e3+parseInt(e[0]),parseInt(t[1])%4*1e3+parseInt(e[1])]}static u(t,e){return(t%e+e)%e}},o=GM_info.script.name.toString(),a=GM_info.script.version.toString();!function(t){const e=document.createElement("script");e.textContent=`(${t})();`,document.documentElement.appendChild(e),e.remove()}(()=>{const t=window.fetch;window.fetch=async function(...e){const n=await t.apply(this,e),s=n.clone();if((s.headers.get("content-type")||"").includes("application/json")){let t=(e[0]instanceof Request?e[0]?.url:e[0])||"ignore";console.log(`Sending JSON message about endpoint "${t}"`),s.json().then(e=>{window.postMessage({source:"blue-marble",endpoint:t,jsonData:e},"*")}).catch(t=>{console.error("BM - Failed to parse JSON:",t)})}return n}});var r=GM_getResourceText("CSS-BM-File");GM_addStyle(r);var c=document.createElement("link");c.href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap",c.rel="preload",c.as="style",c.onload=function(){this.onload=null,this.rel="stylesheet"},document.head.appendChild(c),new class{constructor(){this.m=null,this.p=null,this.v="#bm-display-coords"}M(t){return this.p=t,this.m=new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.matches?.(this.v)}),this}C(){return this.m}observe(t,e=!1,n=!1){t.observe(this.p,{childList:e,subtree:n})}};var l=new class{constructor(e,s){var i,o;i=this,(o=t).has(i)?n("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,undefined),this.name=e,this.version=s,this.T=null,this.$="bm-output-status",this.t=null,this.i=null,this.o=[]}k(t){this.T=t}N(){return this.o.length>0&&(this.i=this.o.pop()),this}S(t){t.appendChild(this.t),this.t=null,this.i=null,this.o=[]}L(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"div",{},n)),this}I(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"p",{},n)),this}B(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"small",{},n)),this}H(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"img",{},n)),this}D(n,i={},o=()=>{}){return o(this,s(this,t,e).call(this,"h"+n,{},i)),this}O(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"hr",{},n)),this}P(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"br",{},n)),this}R(n={},i=()=>{}){const o=s(this,t,e).call(this,"label",{textContent:n.textContent??""});delete n.textContent;const a=s(this,t,e).call(this,"input",{type:"checkbox"},n);return o.insertBefore(a,o.firstChild),this.N(),i(this,o,a),this}U(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"button",{},n)),this}j(n={},i=()=>{}){const o=n.title??n.textContent??"Help: No info";delete n.textContent,n.title=`Help: ${o}`;const a={textContent:"?",className:"bm-help",onclick:()=>{this._(this.$,o)}};return i(this,s(this,t,e).call(this,"button",a,n)),this}F(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"input",{},n)),this}G(n={},i=()=>{}){const o=n.textContent??"";delete n.textContent;const a=s(this,t,e).call(this,"div"),r=s(this,t,e).call(this,"input",{type:"file",style:"display: none;"},n);this.N();const c=s(this,t,e).call(this,"button",{textContent:o});return this.N(),this.N(),c.addEventListener("click",()=>{r.click()}),r.addEventListener("change",()=>{c.style.maxWidth=`${c.offsetWidth}px`,r.files.length>0?c.textContent=r.files[0].name:c.textContent=o}),i(this,a,r,c),this}W(n={},i=()=>{}){return i(this,s(this,t,e).call(this,"textarea",{},n)),this}_(t,e,n=!1){const s=document.getElementById(t.replace(/^#/,""));s&&(s instanceof HTMLInputElement?s.value=e:n?s.textContent=e:s.innerHTML=e)}X(t,e){let n,s=!1,i=0;t=document.querySelector("#"==t?.[0]?t:"#"+t),e=document.querySelector("#"==e?.[0]?e:"#"+e),t&&e?(e.addEventListener("mousedown",function(o){s=!0,n=o.clientX-t.getBoundingClientRect().left,i=o.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging")}),e.addEventListener("touchstart",function(o){s=!0;const a=o?.touches?.[0];a&&(n=a.clientX-t.getBoundingClientRect().left,i=a.clientY-t.getBoundingClientRect().top,document.body.style.userSelect="none",e.classList.add("dragging"))},{passive:!1}),document.addEventListener("mousemove",function(e){s&&(t.style.left=e.clientX-n+"px",t.style.top=e.clientY-i+"px",t.style.right="")}),document.addEventListener("touchmove",function(e){if(s){const s=e?.touches?.[0];if(!s)return;t.style.left=s.clientX-n+"px",t.style.top=s.clientY-i+"px",e.preventDefault()}},{passive:!1}),document.addEventListener("mouseup",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchend",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")}),document.addEventListener("touchcancel",function(){s=!1,document.body.style.userSelect="",e.classList.remove("dragging")})):this.Y(`Can not drag! ${t?"":"moveMe"} ${t||e?"":"and "}${e?"":"iMoveThings "}was not found!`)}Y(t){(0,console.error)(`${this.name}: ${t}`),this._(this.$,"Error: "+t,!0)}}(o,a),h=new class{constructor(){this.q=null,this.state=""}V(t){this.q=t,this.state="file";const e=URL.createObjectURL(t);window.open(e,"_blank"),setTimeout(()=>URL.revokeObjectURL(e),1e4)}},d=new class{constructor(){this.J=!1,this.A=[]}Z(t){window.addEventListener("message",e=>{const n=e.data,s=n.jsonData;if(!n||"blue-marble"!==n.source)return;const o=n.endpoint.split("?")[0].split("/").filter(t=>t&&isNaN(Number(t))).pop();switch(console.log(`Recieved message about "${o}"`),o){case"me":if(s.status&&"2"!=s.status?.toString()[0])return void t.Y("The game is down!\nCould not fetch userdata.");const e=Math.ceil(Math.pow(Math.floor(s.level)*Math.pow(30,.65),1/.65)-s.pixelsPainted);t._("bm-user-name",`Username: ${i.l(s.name)}`),t._("bm-user-droplets",`Droplets: ${(new Intl.NumberFormat).format(s.droplets)}`),t._("bm-user-nextlevel",`Next level in ${(new Intl.NumberFormat).format(e)} pixel${1==e?"":"s"}`);break;case"pixel":const o=n.endpoint.split("?")[0].split("/").filter(t=>t&&!isNaN(Number(t))),a=new URLSearchParams(n.endpoint.split("?")[1]),r=[a.get("x"),a.get("y")];if(this.A.length&&(!o.length||!r.length))return void t.Y("Coordinates are malformed!\nDid you try clicking the canvas first?");this.A=[...o,...r];const c=i.h(o,r),l=document.querySelectorAll("span");for(const t of l)if(t.textContent.trim().includes(`${c[0]}, ${c[1]}`)){let e=document.querySelector("#bm-display-coords");const n=`(Tl X: ${o[0]}, Tl Y: ${o[1]}, Px X: ${r[0]}, Px Y: ${r[1]})`;e?e.textContent=n:(e=document.createElement("span"),e.id="bm-display-coords",e.textContent=n,e.style="margin-left: calc(var(--spacing)*3); font-size: small;",t.parentNode.parentNode.parentNode.insertAdjacentElement("afterend",e))}break;case"robots":this.J="false"==s.userscript?.toString().toLowerCase();break}})}};l.k(d),l.L({id:"bm-overlay",style:"top: 10px; right: 75px;"}).L({id:"bm-contain-header"}).L({id:"bm-bar-drag"}).N().H({alt:"Blue Marble Icon",src:"https://raw.githubusercontent.com/SwingTheVine/Wplace-BlueMarble/main/dist/assets/Favicon.png"}).N().D(1,{textContent:o}).N().N().O().N().L({id:"bm-contain-userinfo"}).I({id:"bm-user-name",textContent:"Username:"}).N().I({id:"bm-user-droplets",textContent:"Droplets:"}).N().I({id:"bm-user-nextlevel",textContent:"Next level in..."}).N().N().O().N().L({id:"bm-contain-automation"}).R({id:"bm-input-stealth",textContent:"Stealth",checked:!0}).N().j({title:"Waits for the website to make requests, instead of sending requests."}).N().P().N().R({id:"bm-input-possessed",textContent:"Possessed",checked:!0}).N().j({title:"Controls the website as if it were possessed."}).N().P().N().L({id:"bm-contain-coords"}).U({id:"bm-button-coords",className:"bm-help",style:"margin-top: 0;",innerHTML:''},(t,e)=>{e.onclick=()=>{const e=t.T?.A;e?.[0]?(t._("bm-input-tx",e?.[0]||""),t._("bm-input-ty",e?.[1]||""),t._("bm-input-px",e?.[2]||""),t._("bm-input-py",e?.[3]||"")):t.Y("Coordinates are malformed! Did you try clicking on the canvas first?")}}).N().F({type:"number",id:"bm-input-tx",placeholder:"Tl X",min:0,max:2047,step:1}).N().F({type:"number",id:"bm-input-ty",placeholder:"Tl Y",min:0,max:2047,step:1}).N().F({type:"number",id:"bm-input-px",placeholder:"Px X",min:0,max:2047,step:1}).N().F({type:"number",id:"bm-input-py",placeholder:"Px Y",min:0,max:2047,step:1}).N().N().G({id:"bm-input-file-template",textContent:"Upload Template",accept:"image/png, image/jpeg, image/webp, image/bmp, image/gif"}).N().L({id:"bm-contain-buttons-template"}).U({id:"bm-button-enable",textContent:"Enable"},(t,e)=>{e.onclick=()=>{const e=document.querySelector("#bm-input-file-template");e?.files[0]?h.V(e.files[0]):t.Y("No file selected!")}}).N().U({id:"bm-button-disable",textContent:"Disable"}).N().N().W({id:l.$,placeholder:`Status: Sleeping...\nVersion: ${a}`,readOnly:!0}).N().L({id:"bm-contain-buttons-action"}).L().U({id:"bm-button-teleport",className:"bm-help",textContent:"🕴"}).N().U({id:"bm-button-favorite",className:"bm-help",innerHTML:''}).N().U({id:"bm-button-templates",className:"bm-help",innerHTML:''}).N().B({textContent:"Made by SwingTheVine"}).N().N().N().S(document.body),l.X("#bm-overlay","#bm-bar-drag"),d.Z(l),console.log(`${o} (${a}) userscript has loaded!`)})();
\ No newline at end of file
diff --git a/docs/README.md b/docs/README.md
index 7db439f..b28f53d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -35,7 +35,7 @@
-
+
diff --git a/package-lock.json b/package-lock.json
index 10c98bd..b8c78f0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "wplace-bluemarble",
- "version": "0.55.7",
+ "version": "0.55.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "wplace-bluemarble",
- "version": "0.55.7",
+ "version": "0.55.11",
"devDependencies": {
"esbuild": "^0.25.0",
"terser": "^5.43.1"
diff --git a/package.json b/package.json
index 0c73275..249b98d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wplace-bluemarble",
- "version": "0.55.7",
+ "version": "0.55.11",
"type": "module",
"scripts": {
"build": "node build/build.js",
diff --git a/src/BlueMarble.meta.js b/src/BlueMarble.meta.js
index eed99ee..2fad57a 100644
--- a/src/BlueMarble.meta.js
+++ b/src/BlueMarble.meta.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Blue Marble
// @namespace https://github.com/SwingTheVine/
-// @version 0.55.7
+// @version 0.55.11
// @description A userscript to automate and/or enhance the user experience on Wplace.live. Make sure to comply with the site's Terms of Service, and rules! This script is not affiliated with Wplace.live in any way, use at your own risk. This script is not affiliated with TamperMonkey. The author of this userscript is not responsible for any damages, issues, loss of data, or punishment that may occur as a result of using this script. This script is provided "as is" under the MPL-2.0 license. The "Blue Marble" icon is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. The image is owned by NASA.
// @author SwingTheVine
// @license MPL-2.0
diff --git a/src/TemplateManager.js b/src/TemplateManager.js
new file mode 100644
index 0000000..7615b54
--- /dev/null
+++ b/src/TemplateManager.js
@@ -0,0 +1,27 @@
+/** Manages the template system.
+ * @since 0.55.8
+ */
+export default class TemplateManager {
+
+ /** The constructor for the {@link TemplateManager} class.
+ * @since 0.55.8
+ */
+ constructor() {
+ this.template = null; // The template image.
+ this.state = ''; // The state of the template ('blob', 'proccessing', 'template', etc.)
+ }
+
+ /** Sets the template to the image passed in.
+ * @param {File} file - The file of the template image.
+ * @since 0.55.8
+ */
+ setTemplateImage(file) {
+
+ this.template = file;
+ this.state = 'file';
+
+ const url = URL.createObjectURL(file); // Creates a blob URL
+ window.open(url, '_blank'); // Opens a new tab with blob
+ setTimeout(() => URL.revokeObjectURL(url), 10000); // Destroys the blob 10 seconds later
+ }
+}
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 030c6f5..9ea7334 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,6 +1,7 @@
import Overlay from './Overlay.js';
import Observers from './Observers.js';
import ApiManager from './ApiManager.js';
+import TemplateManager from './TemplateManager.js';
const name = GM_info.script.name.toString();
const version = GM_info.script.version.toString();
@@ -77,6 +78,7 @@ document.head.appendChild(stylesheetLink);
const observers = new Observers(); // Constructs a new Observers object
const overlay = new Overlay(name, version); // Constructs a new Overlay object
+const templateManager = new TemplateManager(); // Constructs a new TemplateManager object
const apiManager = new ApiManager(); // Constructs a new ApiManager object
overlay.setApiManager(apiManager); // Sets the API manager
@@ -129,7 +131,7 @@ overlay.addDiv({'id': 'bm-overlay', 'style': 'top: 10px; right: 75px;'})
.addInput({'type': 'number', 'id': 'bm-input-py', 'placeholder': 'Px Y', 'min': 0, 'max': 2047, 'step': 1}).buildElement()
.buildElement()
.addInputFile({'id': 'bm-input-file-template', 'textContent': 'Upload Template', 'accept': 'image/png, image/jpeg, image/webp, image/bmp, image/gif'}).buildElement()
- .addDiv({'id': 'bm-contain-buttons'})
+ .addDiv({'id': 'bm-contain-buttons-template'})
.addButton({'id': 'bm-button-enable', 'textContent': 'Enable'}, (instance, button) => {
button.onclick = () => {
const input = document.querySelector('#bm-input-file-template');
@@ -137,14 +139,19 @@ overlay.addDiv({'id': 'bm-overlay', 'style': 'top: 10px; right: 75px;'})
// Kills itself if there is no file
if (!input?.files[0]) {instance.handleDisplayError(`No file selected!`); return;}
- const url = URL.createObjectURL(input.files[0]); // Creates a blob URL
- window.open(url, '_blank'); // Opens a new tab with blob
- setTimeout(() => URL.revokeObjectURL(url), 10000); // Destroys the blob 10 seconds later
+ templateManager.setTemplateImage(input.files[0]);
}
}).buildElement()
.addButton({'id': 'bm-button-disable', 'textContent': 'Disable'}).buildElement()
.buildElement()
.addTextarea({'id': overlay.outputStatusId, 'placeholder': `Status: Sleeping...\nVersion: ${version}`, 'readOnly': true}).buildElement()
+ .addDiv({'id': 'bm-contain-buttons-action'})
+ .addDiv()
+ .addButton({'id': 'bm-button-teleport', 'className': 'bm-help', 'textContent': '🕴'}).buildElement()
+ .addButton({'id': 'bm-button-favorite', 'className': 'bm-help', 'innerHTML': ''}).buildElement()
+ .addButton({'id': 'bm-button-templates', 'className': 'bm-help', 'innerHTML': ''}).buildElement()
+ .addSmall({'textContent': 'Made by SwingTheVine'}).buildElement()
+ .buildElement()
.buildElement()
.buildOverlay(document.body);
diff --git a/src/overlay.css b/src/overlay.css
index 52ffd44..0f2216c 100644
--- a/src/overlay.css
+++ b/src/overlay.css
@@ -112,7 +112,7 @@ div#bm-overlay {
}
/* Automation button container */
-#bm-contain-buttons {
+#bm-contain-buttons-template {
display: flex;
flex-direction: row;
flex-wrap: wrap;
@@ -139,11 +139,23 @@ div:has(> #bm-input-file-template) > button {
width: 100%;
}
+/* The action buttons below the status textarea */
+#bm-contain-buttons-action {
+ display: flex;
+ justify-content: space-between;
+}
+
+/* All small elements */
+#bm-overlay small {
+ font-size: x-small;
+ color: lightgray;
+}
+
/* The elements that need spacing from each-other */
#bm-contain-userinfo,
#bm-contain-automation,
#bm-contain-coords,
-#bm-contain-buttons,
+#bm-contain-buttons-template,
div:has(> #bm-input-file-template),
#bm-output-status {
margin-top: 0.5em;
diff --git a/src/overlay.js b/src/overlay.js
index 2ce3409..d180221 100644
--- a/src/overlay.js
+++ b/src/overlay.js
@@ -170,6 +170,31 @@ export default class Overlay {
return this;
}
+ /** Adds a `` to the overlay.
+ * This `` element will have properties shared between all `` elements in the overlay.
+ * You can override the shared properties by using a callback.
+ * @param {Object.} [additionalProperties={}] - The DOM properties of the `` that are NOT shared between all overlay `` elements. These should be camelCase.
+ * @param {function(Overlay, HTMLParagraphElement):void} [callback=()=>{}] - Additional JS modification to the ``.
+ * @returns {Overlay} Overlay class instance (this)
+ * @since 0.55.8
+ * @example
+ * // Assume all elements have a shared class (e.g. {'className': 'bar'})
+ * overlay.addSmall({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
+ * // Output:
+ * // (Assume already exists in the webpage)
+ *
+ * Foobar.
+ *
+ */
+ addSmall(additionalProperties = {}, callback = () => {}) {
+
+ const properties = {}; // Shared DOM properties
+
+ const small = this.#createElement('small', properties, additionalProperties); // Creates the element
+ callback(this, small); // Runs any script passed in through the callback
+ return this;
+ }
+
/** Adds a `` to the overlay.
* This `` element will have properties shared between all `` elements in the overlay.
* You can override the shared properties by using a callback.
diff --git a/src/utils.js b/src/utils.js
index 8282649..8b6785d 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -36,4 +36,15 @@ export default class Utils {
static serverTPtoDisplayTP(tile, pixel) {
return [((parseInt(tile[0]) % 4) * 1000) + parseInt(pixel[0]), ((parseInt(tile[1]) % 4) * 1000) + parseInt(pixel[1])];
}
+
+ /** Negative-Safe Modulo. You can pass negative numbers into this.
+ * @param {number} a - The first number
+ * @param {number} b - The second number
+ * @returns {number} Result
+ * @author osuplace
+ * @since 0.55.8
+ */
+ static negativeSafeModulo(a, b) {
+ return (a % b + b) % b;
+}
}
\ No newline at end of file