THERMAL CONDUCTIVITY

and pollen
This commit is contained in:
slweeb 2021-12-23 23:42:03 -05:00
parent e27288a507
commit 01cc070863
2 changed files with 40 additions and 4 deletions

View File

@ -1,4 +1,13 @@
[Version 0.5.2 - December 22, 2021]
[Future Plans]
+ Density Update
+ Reactions Update
+ Electricity & Machines Update
[Version 0.6 - Thermal Conductivity - Dec. 23, 2021]
+ Thermal Conductivity / Heat Transfer
+ Bees now drop pollen which turns into flower seeds
[Version 0.5.2 - Dec. 22, 2021]
+ Antimatter
+ Acid Cloud
+ Acid Gas
@ -15,7 +24,7 @@
+ All molten elements now spawn fire like magma
~ Fixed: NaN fire temperatures
[Version 0.5.1 - December 22, 2021]
[Version 0.5.1 - Dec. 22, 2021]
+ Erase tool
+ Pick tool (Middle click works too)
+ Press E to select an element by name
@ -30,7 +39,7 @@
~ Fixed: Shift icon [⬆ ] doesn't show when hovering outside of game
~ Fixed: Console error sometimes when page loads
[Version 0.5 - December 21, 2021]
[Version 0.5 - Dec. 21, 2021]
+ New name: Sandboxels (Sandbox + Pixels)
+ Mushrooms
+ Mushroom Spore grows a mushroom

View File

@ -308,6 +308,8 @@
"XX|DL:carbon_dioxide%50|XX",
],
"category":"life",
"tempHigh": 300,
"stateHigh": "fire",
"burn":65,
"burnTime":50,
},
@ -1885,6 +1887,7 @@
arg = arg.split(",")[Math.floor(Math.random()*arg.split(",").length)];
}
createPixel(arg,newCoords.x,newCoords.y);
pixelMap[newCoords.x][newCoords.y].temp = pixel.temp
}
}
//Leave behind element
@ -2110,7 +2113,7 @@
}
else if (pixel.element != "fire" && isEmpty(pixel.x,pixel.y-1) && Math.floor(Math.random()*100)<10) {
createPixel("fire",pixel.x,pixel.y-1);
pixelMap[pixel.x][pixel.y-1].temp = pixel.temp+(pixelTicks - (pixel.burnStart || 0));
pixelMap[pixel.x][pixel.y-1].temp = pixel.temp//+(pixelTicks - (pixel.burnStart || 0));
if (info.fireColor != undefined) {
pixelMap[pixel.x][pixel.y-1].color = pixelColorPick(pixelMap[pixel.x][pixel.y-1],info.fireColor);
}
@ -2118,11 +2121,35 @@
}
// Change tempearture if needed
if (info.tempChange != undefined) {
pixel.temp += info.tempChange;
pixelTempCheck(pixel);
}
// Heat Transfer
// Check right and bottom adjacent pixels
coordsToCheck = [
{x:pixel.x+1,y:pixel.y},
{x:pixel.x,y:pixel.y+1},
];
for (var i = 0; i < coordsToCheck.length; i++) {
var coords = coordsToCheck[i];
if (!isEmpty(coords.x,coords.y) && !outOfBounds(coords.x,coords.y)) {
var newPixel = pixelMap[coords.x][coords.y];
// Skip if both temperatures are the same
if (pixel.temp == newPixel.temp) {
continue;
}
// Set both pixel temperatures to their average
var avg = (pixel.temp + newPixel.temp)/2;
pixel.temp = avg;
newPixel.temp = avg;
pixelTempCheck(pixel);
pixelTempCheck(newPixel);
}
}
}
function pixelColorPick(pixel,customColor=null) {