grid maker :)
This commit is contained in:
parent
a0e336980d
commit
358ea0111f
|
|
@ -2368,4 +2368,24 @@ elements.spacedust = {
|
|||
}
|
||||
elements.acid.ignore.push("spacedust")
|
||||
elements.acid.ignore.push("spacedust_cola")
|
||||
elements.sun.breakInto = "spacedust"
|
||||
elements.sun.breakInto = "spacedust"
|
||||
var gridElem = 0
|
||||
elements.grid_maker = {
|
||||
color: elements.lattice.color,
|
||||
behavior: behaviors.WALL,
|
||||
category: "special",
|
||||
movable: false,
|
||||
onSelect: function() {
|
||||
var gridans = prompt("Please input the desired element of this void. It will not work if you do multiple void types while paused.",(gridElem||undefined));
|
||||
if (!gridans) { return }
|
||||
gridElem = mostSimilarElement(gridans);
|
||||
},
|
||||
tick: function(pixel){
|
||||
if (pixel.x%2 || pixel.y%2){
|
||||
deletePixel(pixel.x, pixel.y)
|
||||
createPixel(gridElem, pixel.x, pixel.y)
|
||||
} else {
|
||||
deletePixel(pixel.x, pixel.y)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue