behavior+tick test
This commit is contained in:
parent
2221671f31
commit
7643b39575
|
|
@ -1038,18 +1038,24 @@ elements.op_hottester_bomb = {
|
||||||
excludeRandom: true,
|
excludeRandom: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
elements.vanishing_wall = {
|
||||||
elements.rainbow_alt_test = {
|
behavior: behaviors.WALL,
|
||||||
color: ["#ffaacc","#ffaacc","#aaccff","#aaccff","#ffffbb","#ffffbb"],
|
color: "#8080b0",
|
||||||
|
density: 3333,
|
||||||
tick: function(pixel) {
|
tick: function(pixel) {
|
||||||
var t = pixelTicks*3+pixel.x+pixel.y;
|
pixelTick(pixel)
|
||||||
var r = Math.floor(255*(1-Math.cos(t*Math.PI/180)));
|
if(pixel.charge) {
|
||||||
var g = Math.floor(255*(1-Math.cos(t*Math.PI/180+2*Math.PI/3)));
|
if(!isEmpty(pixel.x,pixel.y)) {
|
||||||
var b = Math.floor(255*(1-Math.cos(t*Math.PI/180+4*Math.PI/3)));
|
deletePixel(pixel.x,pixel.y)
|
||||||
pixel.color = "rgb("+Math.ceil((r/2)+127)+","+Math.ceil((g/2)+127)+","+Math.ceil((b/2)+127)+")";
|
}
|
||||||
doHeat(pixel);
|
}
|
||||||
},
|
},
|
||||||
category: "special",
|
category: "special",
|
||||||
|
state: "solid",
|
||||||
|
hardness: 1,
|
||||||
|
insulate: true,
|
||||||
|
conduct: 1,
|
||||||
|
extraInfo: "It disappears when charged.",
|
||||||
}
|
}
|
||||||
|
|
||||||
runAfterLoad(function() {
|
runAfterLoad(function() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue