changePixel warns you when an attempt is made to change to a nonexistent element
hopefully instead of shitting itself and dying with the blank screen
This commit is contained in:
parent
be7236a9b6
commit
45d8c773ee
|
|
@ -0,0 +1,9 @@
|
||||||
|
doLog = true;
|
||||||
|
oldChangePixel = changePixel;
|
||||||
|
function changePixel(pixel,element,changetemp=true) {
|
||||||
|
if(!elements[element]) {
|
||||||
|
if(doLog) { console.error(`Something tried to change a pixel (${pixel.x},${pixel.y}) to nonexistent element "${element}"`) };
|
||||||
|
};
|
||||||
|
return false;
|
||||||
|
changePixel(pixel,element,changetemp);
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue