Merge pull request #449 from kaeudomt/main

gas n mod list
This commit is contained in:
slweeb 2024-03-25 21:02:01 -04:00 committed by GitHub
commit 21f97047bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 74 additions and 34 deletions

View File

@ -202,6 +202,7 @@
<tr><td>ticking_temp_stuff.js</td><td>Adds more heaters and coolers</td><td>Alice</td></tr>
<tr><td>video.js</td><td>Adds a video player</td><td>ggod</td></tr>
<tr><td>waterspout.js</td><td>Adds back the old Water Spout</td><td>mollthecoder</td></tr>
<tr><td>WhisperingTheory.js</td><td>Add powder and gas variant of heater and cooler</td><td>kaeud</td></tr>
<!----><tr><td class="modCat" colspan="3">Weapons</td></tr><!---->
<tr><td>aircrafts.js</td><td>Adds aircraft and aircraft part pixels</td><td>Jayd</td></tr>

View File

@ -1,8 +1,31 @@
/* TODO
- [x] powder heater & coller
- [x] block roomtemp
- [x] no smoke from cold fire
*/
elements.roomtemper = {
color: "#29632f",
behavior: behaviors.WALL,
tick: function(pixel) {
// from nouserthings.js <3
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (!isEmpty(x,y, true)) {
if(pixelMap[x][y].temp < -230) {
pixelMap[x][y].temp = (pixelMap[x][y].temp + 7)
} else if(pixelMap[x][y].temp > 270) {
pixelMap[x][y].temp = (pixelMap[x][y].temp - 7)
} else if (pixelMap[x][y].temp < 20) {
pixelMap[x][y].temp = (pixelMap[x][y].temp + 2)
} else if (pixelMap[x][y].temp > 20) {
pixelMap[x][y].temp = (pixelMap[x][y].temp - 2)
}
}
}
},
category:"machines",
state:"solid",
insulate: true,
noMix: true,
movable: false,
};
elements.powder_heater = {
category: "machines",
@ -48,36 +71,52 @@ elements.powder_freeze = {
insulate: true,
};
elements.roomtemper = {
color: "#29632f",
behavior: behaviors.WALL,
tick: function(pixel) {
for (var i = 0; i < squareCoords.length; i++) {
var coord = squareCoords[i];
var x = pixel.x+coord[0];
var y = pixel.y+coord[1];
if (!isEmpty(x,y, true)) {
if(pixelMap[x][y].temp < -230) {
pixelMap[x][y].temp = (pixelMap[x][y].temp + 7)
} else if(pixelMap[x][y].temp > 270) {
pixelMap[x][y].temp = (pixelMap[x][y].temp - 7)
} else if (pixelMap[x][y].temp < 20) {
pixelMap[x][y].temp = (pixelMap[x][y].temp + 2)
} else if (pixelMap[x][y].temp > 20) {
pixelMap[x][y].temp = (pixelMap[x][y].temp - 2)
}
}
}
},
category:"machines",
state:"solid",
insulate: true,
noMix: true,
movable: false,
},
elements.cold_fire.behavior = [
"M1|M1|M1",
"M2|DL%8|M2",
"XX|M2|XX",
]
];
elements.gas_heater = {
color: "#881111",
behavior: [
"M2|M1 AND HT:2|M2",
"M1 AND HT:2|XX|M1 AND HT:2",
"M2|M1 AND HT:2 | M2",
],
category: "machines",
insulate: true,
};
elements.gas_superheater = {
color: "#dd1111",
behavior: [
"M2|M1 AND HT:10|M2",
"M1 AND HT:10|XX|M1 AND HT:10",
"M2|M1 AND HT:10|M2",
],
category: "machines",
insulate: true,
};
elements.gas_cooler = {
color: "#111188",
behavior: [
"M2|M1 AND CO:2|M2",
"M1 AND CO:2|XX|M1 AND CO:2",
"M2|M1 AND CO:2|M2",
],
category: "machines",
insulate: true,
};
elements.gas_freezer = {
color: "#1111dd",
behavior: [
"M2|M1 AND CO:10|M2",
"M1 AND CO:10|XX|M1 AND CO:10",
"M2|M1 AND CO:10|M2",
],
category: "machines",
insulate: true,
};