change sl to save pixelTicks, remove if-block referencing velocity.js (since it's a hard dependency now)
This commit is contained in:
parent
e9790cfc31
commit
a767ac107e
|
|
@ -7986,7 +7986,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
state: "solid",
|
state: "solid",
|
||||||
category: "rainbow variants",
|
category: "rainbow variants",
|
||||||
};
|
}; //7989 yay soshi!
|
||||||
|
|
||||||
elements.lavashimmer = {
|
elements.lavashimmer = {
|
||||||
color: ["#ff3f00","#200800","#ff3f00","#200800"],
|
color: ["#ff3f00","#200800","#ff3f00","#200800"],
|
||||||
|
|
@ -8216,7 +8216,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reactions: {
|
reactions: {
|
||||||
dye: elements.rainbow.reactions.dye, //7989 yay soshi!
|
dye: elements.rainbow.reactions.dye,
|
||||||
},
|
},
|
||||||
behavior: behaviors.WALL,
|
behavior: behaviors.WALL,
|
||||||
state: "solid",
|
state: "solid",
|
||||||
|
|
@ -9648,7 +9648,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
||||||
for(y = bottomFortyPercent; y < height; y++) {
|
for(y = bottomFortyPercent; y < height; y++) {
|
||||||
var chance = y > bottomTwentyPercent ? 0.03 : 0.01
|
var chance = y > bottomTwentyPercent ? 0.03 : 0.01
|
||||||
var radius = y > bottomTwentyPercent ? 8 : 6
|
var radius = y > bottomTwentyPercent ? 8 : 6
|
||||||
if(enabledMods.includes("velocity.js") && !isEmpty(x,y,true)) {
|
if(!isEmpty(x,y,true)) {
|
||||||
pixelMap[x][y].vy ??= 0;
|
pixelMap[x][y].vy ??= 0;
|
||||||
pixelMap[x][y].vy -= 20;
|
pixelMap[x][y].vy -= 20;
|
||||||
};
|
};
|
||||||
|
|
@ -11275,10 +11275,11 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
||||||
pixelMap: structuredClone ? structuredClone(pixelMap) : JSON.parse(JSON.stringify(pixelMap)),
|
pixelMap: structuredClone ? structuredClone(pixelMap) : JSON.parse(JSON.stringify(pixelMap)),
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
|
pixelTicks: pixelTicks,
|
||||||
pixelSize: pixelSize,
|
pixelSize: pixelSize,
|
||||||
settings: settings,
|
settings: settings,
|
||||||
version: 1,
|
version: 1,
|
||||||
enabledMods: localStorage.enabledMods,
|
enabledMods: localStorage.enabledMods
|
||||||
};
|
};
|
||||||
for(i = 0; i < simulationState.pixelMap.length; i++) {
|
for(i = 0; i < simulationState.pixelMap.length; i++) {
|
||||||
var column = simulationState.pixelMap[i];
|
var column = simulationState.pixelMap[i];
|
||||||
|
|
@ -11529,6 +11530,7 @@ color1 and color2 spread through striped paint like dye does with itself. <u>col
|
||||||
width = json.width;
|
width = json.width;
|
||||||
height = json.height;
|
height = json.height;
|
||||||
pixelSize = json.pixelSize;
|
pixelSize = json.pixelSize;
|
||||||
|
pixelTicks = (json.pixelTicks ?? 0);
|
||||||
//currentPixels = json.currentPixels;
|
//currentPixels = json.currentPixels;
|
||||||
for(i = 0; i < json.pixelMap.length; i++) {
|
for(i = 0; i < json.pixelMap.length; i++) {
|
||||||
json.pixelMap[i] = json.pixelMap[i].map(x => zeroToNull(x));
|
json.pixelMap[i] = json.pixelMap[i].map(x => zeroToNull(x));
|
||||||
|
|
@ -41507,25 +41509,25 @@ Make sure to save your command in a file if you want to add this preset again.`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(enabledMods.includes("mods/paint_event.js")) {
|
|
||||||
randomEvents.paint = function() {
|
randomEvents.paint = function() {
|
||||||
// set the color of a random circle to a random color
|
// set the color of a random circle to a random color
|
||||||
var x = Math.floor(Math.random()*(width-1))+1;
|
var x = Math.floor(Math.random()*(width-1))+1;
|
||||||
var y = Math.floor(Math.random()*(height-1))+1;
|
var y = Math.floor(Math.random()*(height-1))+1;
|
||||||
var randomR = Math.floor(Math.random() * 256);
|
var randomR = Math.floor(Math.random() * 256);
|
||||||
var randomG = Math.floor(Math.random() * 256);
|
var randomG = Math.floor(Math.random() * 256);
|
||||||
var randomB = Math.floor(Math.random() * 256);
|
var randomB = Math.floor(Math.random() * 256);
|
||||||
var radius = Math.floor(Math.random()*19)+1;
|
var radius = Math.floor(Math.random()*19)+1;
|
||||||
var rColor = "rgb(" + randomR + "," + randomG + "," + randomB + ")";
|
var rColor = "rgb(" + randomR + "," + randomG + "," + randomB + ")";
|
||||||
var coords = circleCoords(x,y,radius);
|
var coords = circleCoords(x,y,radius);
|
||||||
for (var i = 0; i < coords.length; i++) {
|
for (var i = 0; i < coords.length; i++) {
|
||||||
var coord = coords[i];
|
var coord = coords[i];
|
||||||
if (!outOfBounds(coord.x,coord.y) && !isEmpty(coord.x,coord.y)) {
|
if (!outOfBounds(coord.x,coord.y) && !isEmpty(coord.x,coord.y)) {
|
||||||
pixelMap[coord.x][coord.y].color = rColor;
|
pixelMap[coord.x][coord.y].color = rColor;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//Buff mob events
|
//Buff mob events
|
||||||
if(typeof(maximumCreeperTries) !== "undefined") {
|
if(typeof(maximumCreeperTries) !== "undefined") {
|
||||||
minimumCreeperTries = 10;
|
minimumCreeperTries = 10;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue