From bdc8a32e36b189047aab95a4b11cdbbc62234418 Mon Sep 17 00:00:00 2001 From: zeno Date: Wed, 28 Feb 2024 11:59:54 -0500 Subject: [PATCH] fix vacuum temperature --- js/core_blocks.js | 2 +- js/temperature.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/js/core_blocks.js b/js/core_blocks.js index eda97ce..691af8b 100644 --- a/js/core_blocks.js +++ b/js/core_blocks.js @@ -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) diff --git a/js/temperature.js b/js/temperature.js index 34ef0e6..22b5776 100644 --- a/js/temperature.js +++ b/js/temperature.js @@ -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);