fix vacuum temperature
This commit is contained in:
parent
e4584d0669
commit
bdc8a32e36
2 changed files with 2 additions and 5 deletions
|
@ -20,7 +20,7 @@ mainTiles.loadSet(
|
||||||
.state(['Vanilla/Air', 'Plasma'],3000,true),
|
.state(['Vanilla/Air', 'Plasma'],3000,true),
|
||||||
|
|
||||||
new Tile('rgb(0,0,0)', 'Vacuum').gravity(0.01 / 1000 / 1000, 4, Infinity)
|
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
|
new Tile('rgb(180,156,229)', 'Hydrogen').gravity(0.8 / 1000, 4, 200) //H2
|
||||||
.temperature(0,0.1)
|
.temperature(0,0.1)
|
||||||
|
|
|
@ -28,10 +28,7 @@ function temperature(event, conduct, transfer = 0) {
|
||||||
let conduct2 = (blok != -1) ? (mainTiles.tiles[blok].attributes.conduct || 0) : 0;
|
let conduct2 = (blok != -1) ? (mainTiles.tiles[blok].attributes.conduct || 0) : 0;
|
||||||
|
|
||||||
let conductSum = Math.min(conduct * conduct2 * 10, 0.5);
|
let conductSum = Math.min(conduct * conduct2 * 10, 0.5);
|
||||||
let s = conductSum*(temp2 - temp + transfer);
|
let s = conductSum*(temp2 - temp + transfer + temp * -0.01);
|
||||||
|
|
||||||
s += temp * -0.01;
|
|
||||||
if (temp < -296.15 && temp2 > -296.15) s = temp2 - temp;
|
|
||||||
|
|
||||||
chunks.setBlock(cx, cy, Math.max(s + temp,-296.15), true);
|
chunks.setBlock(cx, cy, Math.max(s + temp,-296.15), true);
|
||||||
chunks.setBlock(cx+x, cy+y, Math.max(temp2 - s,-296.15), true);
|
chunks.setBlock(cx+x, cy+y, Math.max(temp2 - s,-296.15), true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue