fix vacuum temperature

This commit is contained in:
zeno 2024-02-28 11:59:54 -05:00
parent e4584d0669
commit bdc8a32e36
2 changed files with 2 additions and 5 deletions

View file

@ -20,7 +20,7 @@ mainTiles.loadSet(
.state(['Vanilla/Air', 'Plasma'],3000,true),
new Tile('rgb(0,0,0)', 'Vacuum').gravity(0.01 / 1000 / 1000, 4, Infinity)
.temperature(-269.15,0),
.temperature(-296.15,0),
new Tile('rgb(180,156,229)', 'Hydrogen').gravity(0.8 / 1000, 4, 200) //H2
.temperature(0,0.1)

View file

@ -28,10 +28,7 @@ function temperature(event, conduct, transfer = 0) {
let conduct2 = (blok != -1) ? (mainTiles.tiles[blok].attributes.conduct || 0) : 0;
let conductSum = Math.min(conduct * conduct2 * 10, 0.5);
let s = conductSum*(temp2 - temp + transfer);
s += temp * -0.01;
if (temp < -296.15 && temp2 > -296.15) s = temp2 - temp;
let s = conductSum*(temp2 - temp + transfer + temp * -0.01);
chunks.setBlock(cx, cy, Math.max(s + temp,-296.15), true);
chunks.setBlock(cx+x, cy+y, Math.max(temp2 - s,-296.15), true);