1.6.2 tiny update
This commit is contained in:
parent
f2ea974fdf
commit
db8c1bfd33
|
|
@ -3,7 +3,11 @@
|
||||||
+ Baking Update
|
+ Baking Update
|
||||||
+ More plans / suggestions at https://docs.google.com/document/u/4/d/1R8xljj_J-K5oU-9y4louwplQmM-ZBvUfXmhbgj5LYdk/edit
|
+ More plans / suggestions at https://docs.google.com/document/u/4/d/1R8xljj_J-K5oU-9y4louwplQmM-ZBvUfXmhbgj5LYdk/edit
|
||||||
|
|
||||||
[Version 1.6.1 - Egg Update]
|
[Version 1.6.2 - July 10, 2022]
|
||||||
|
+ Dyes will mix colors [Warning: Laggy]
|
||||||
|
+ Broth, from heating meat in water
|
||||||
|
|
||||||
|
[Version 1.6.1 - May 17, 2022 - Egg Update]
|
||||||
+ Feather
|
+ Feather
|
||||||
+ Egg
|
+ Egg
|
||||||
+ Yolk
|
+ Yolk
|
||||||
|
|
|
||||||
78
index.html
78
index.html
|
|
@ -1119,6 +1119,11 @@
|
||||||
"acid": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
|
"acid": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
|
||||||
"acid_gas": { "elem1":"rotten_meat", "chance":0.4 },
|
"acid_gas": { "elem1":"rotten_meat", "chance":0.4 },
|
||||||
"cyanide": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
|
"cyanide": { "elem1":"rotten_meat", "elem2":null, "chance":0.5 },
|
||||||
|
"water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"salt_water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"sugar_water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"dirty_water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"seltzer": { "elem2":"broth", "tempMin":70 },
|
||||||
},
|
},
|
||||||
tempHigh: 100,
|
tempHigh: 100,
|
||||||
stateHigh: "cooked_meat",
|
stateHigh: "cooked_meat",
|
||||||
|
|
@ -1153,6 +1158,13 @@
|
||||||
"cooked_meat": {
|
"cooked_meat": {
|
||||||
color: ["#AE7D5B","#9B6D54","#7E4D31"],
|
color: ["#AE7D5B","#9B6D54","#7E4D31"],
|
||||||
behavior: behaviors.STURDYPOWDER,
|
behavior: behaviors.STURDYPOWDER,
|
||||||
|
reactions: {
|
||||||
|
"water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"salt_water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"sugar_water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"dirty_water": { "elem2":"broth", "tempMin":70 },
|
||||||
|
"seltzer": { "elem2":"broth", "tempMin":70 },
|
||||||
|
},
|
||||||
tempHigh: 300,
|
tempHigh: 300,
|
||||||
stateHigh: "ash",
|
stateHigh: "ash",
|
||||||
category:"food",
|
category:"food",
|
||||||
|
|
@ -4047,6 +4059,20 @@
|
||||||
density: 1054,
|
density: 1054,
|
||||||
stain: 0.05,
|
stain: 0.05,
|
||||||
},
|
},
|
||||||
|
"broth": {
|
||||||
|
color: "#dbb169",
|
||||||
|
behavior: behaviors.LIQUID,
|
||||||
|
tempHigh: 125,
|
||||||
|
stateHigh: ["steam","steam","steam","fragrance"],
|
||||||
|
tempLow: 0,
|
||||||
|
stateLow: "ice",
|
||||||
|
category: "food",
|
||||||
|
state: "liquid",
|
||||||
|
density: 1052,
|
||||||
|
conduct: 0.03,
|
||||||
|
stain: -0.01,
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
"milk": {
|
"milk": {
|
||||||
color: "#fafafa",
|
color: "#fafafa",
|
||||||
behavior: behaviors.LIQUID,
|
behavior: behaviors.LIQUID,
|
||||||
|
|
@ -4656,6 +4682,7 @@
|
||||||
category: "liquids",
|
category: "liquids",
|
||||||
state: "liquid",
|
state: "liquid",
|
||||||
density: 998,
|
density: 998,
|
||||||
|
stainSelf: true,
|
||||||
},
|
},
|
||||||
"ink": {
|
"ink": {
|
||||||
color: "#171717",
|
color: "#171717",
|
||||||
|
|
@ -6737,6 +6764,27 @@
|
||||||
return r.elem1!==undefined || r.elem2!==undefined;
|
return r.elem1!==undefined || r.elem2!==undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loadedSounds = {};
|
||||||
|
function playSound(sound) {
|
||||||
|
if (loadedSounds[sound] === undefined) {
|
||||||
|
loadedSounds[sound] = new Audio("sounds/" + sound);
|
||||||
|
}
|
||||||
|
loadedSounds[sound].play();
|
||||||
|
}
|
||||||
|
function stopSound(sound) {
|
||||||
|
if (loadedSounds[sound] === undefined) {
|
||||||
|
loadedSounds[sound] = new Audio("sounds/" + sound);
|
||||||
|
}
|
||||||
|
loadedSounds[sound].pause();
|
||||||
|
loadedSounds[sound].currentTime = 0;
|
||||||
|
}
|
||||||
|
function loopSound(sound) {
|
||||||
|
if (loadedSounds[sound] === undefined) {
|
||||||
|
loadedSounds[sound] = new Audio("sounds/" + sound);
|
||||||
|
}
|
||||||
|
loadedSounds[sound].loop = true;
|
||||||
|
loadedSounds[sound].play();
|
||||||
|
}
|
||||||
|
|
||||||
validDensitySwaps = {
|
validDensitySwaps = {
|
||||||
"solid": {
|
"solid": {
|
||||||
|
|
@ -7541,6 +7589,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
solidStates = {solid:true};
|
||||||
|
liquidStates = {liquid:true};
|
||||||
|
gasStates = {gas:true};
|
||||||
|
|
||||||
function doStaining(pixel) {
|
function doStaining(pixel) {
|
||||||
if (settings["stainoff"]) { return }
|
if (settings["stainoff"]) { return }
|
||||||
var stain = elements[pixel.element].stain;
|
var stain = elements[pixel.element].stain;
|
||||||
|
|
@ -7556,28 +7608,38 @@
|
||||||
var y = pixel.y+adjacentCoords[i][1];
|
var y = pixel.y+adjacentCoords[i][1];
|
||||||
if (!isEmpty(x,y,true)) {
|
if (!isEmpty(x,y,true)) {
|
||||||
var newPixel = pixelMap[x][y];
|
var newPixel = pixelMap[x][y];
|
||||||
if (elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) != -1) {
|
if (elements[pixel.element].ignore && elements[pixel.element].ignore.indexOf(newPixel.element) !== -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((newPixel.element != pixel.element || elements[newPixel.element].stainSelf) && (elements[newPixel.element].state == "solid" || !elements[newPixel.element].state || newPixel.element == pixel.element)) {
|
if ((elements[newPixel.element].id !== elements[pixel.element].id || elements[newPixel.element].stainSelf) && (solidStates[elements[newPixel.element].state] || elements[newPixel.element].id === elements[pixel.element].id)) {
|
||||||
if (Math.random() < Math.abs(stain)) {
|
if (Math.random() < Math.abs(stain)) {
|
||||||
if (stain < 0) {
|
if (stain < 0) {
|
||||||
if (newPixel.origColor) {
|
if (newPixel.origColor) {
|
||||||
newColor = newPixel.origColor.match(/\d+/g);
|
newColor = newPixel.origColor;
|
||||||
}
|
}
|
||||||
else { continue; }
|
else { continue; }
|
||||||
}
|
}
|
||||||
else if (!newPixel.origColor) {
|
else if (!newPixel.origColor) {
|
||||||
newPixel.origColor = newPixel.color;
|
newPixel.origColor = newPixel.color.match(/\d+/g);
|
||||||
}
|
}
|
||||||
// if newPixel.color doesn't start with rgb, continue
|
// if newPixel.color doesn't start with rgb, continue
|
||||||
if (!newPixel.color.match(/^rgb/)) { continue; }
|
if (!newPixel.color.match(/^rgb/)) { continue; }
|
||||||
// parse rgb color string of newPixel rgb(r,g,b)
|
// parse rgb color string of newPixel rgb(r,g,b)
|
||||||
var rgb = newPixel.color.match(/\d+/g);
|
var rgb = newPixel.color.match(/\d+/g);
|
||||||
// get the average of rgb and newColor, more intense as stain reaches 1
|
if (elements[pixel.element].stainSelf && elements[newPixel.element].id === elements[pixel.element].id) {
|
||||||
var avg = [];
|
// if rgb and newColor are the same, continue
|
||||||
for (var j = 0; j < rgb.length; j++) {
|
if (rgb[0] === newColor[0] && rgb[1] === newColor[1] && rgb[2] === newColor[2]) { continue; }
|
||||||
avg.push(Math.floor((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain))));
|
var avg = [];
|
||||||
|
for (var j = 0; j < rgb.length; j++) {
|
||||||
|
avg[j] = Math.round((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// get the average of rgb and newColor, more intense as stain reaches 1
|
||||||
|
var avg = [];
|
||||||
|
for (var j = 0; j < rgb.length; j++) {
|
||||||
|
avg[j] = Math.floor((rgb[j]*(1-Math.abs(stain))) + (newColor[j]*Math.abs(stain)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// set newPixel color to avg
|
// set newPixel color to avg
|
||||||
newPixel.color = "rgb("+avg.join(",")+")";
|
newPixel.color = "rgb("+avg.join(",")+")";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue