sex with hyeju

This commit is contained in:
An Orbit 2023-05-07 15:52:52 -04:00 committed by GitHub
parent 067836312a
commit 14886f32e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 53 additions and 49 deletions

View File

@ -1,51 +1,55 @@
var modName = "mods/switches.js"; console.log("doElectricity should be changed");
var formerlyNoConductMod = "mods/doElectricity changes.js";
if(enabledMods.includes(formerlyNoConductMod)) { function doElectricity(pixel) {
elements.switch_off = { if(isNaN(pixel.charge)) {
name: "switch (off)", pixel.charge = 0;
color: "#7F3333",
behavior: behaviors.WALL,
noConduct: ["switch_on_control","switch_off_control"],
category: "machines",
}; };
if (pixel.charge) {
elements.switch_on = { // Check each adjacent pixel, if that pixel's charge is false, set it to the same charge
name: "switch (on)", for (var i = 0; i < adjacentCoords.length; i++) {
color: "#33CC33", var x = pixel.x+adjacentCoords[i][0];
behavior: behaviors.WALL, var y = pixel.y+adjacentCoords[i][1];
conduct: 1, if (!isEmpty(x,y,true)) {
noConduct: ["switch_on_control","switch_off_control"], var newPixel = pixelMap[x][y];
category: "machines", var con = elements[newPixel.element].conduct;
}; if (con == undefined) {continue}
var info = elements[pixel.element];
elements.switch_off_control = { if (info.noConduct && info.noConduct.includes(newPixel.element)) {continue};
color: "#FF3333", if (Math.random() < con) { // If random number is less than conductivity
behavior: behaviors.WALL, if (!newPixel.charge && !newPixel.chargeCD) {
behaviorOn: [ newPixel.charge = isNaN(pixel.charge) ? 0 : pixel.charge; //Actually set it to the same charge
"XX|CH:switch_on>switch_off|XX", if (elements[newPixel.element].colorOn) {
"CH:switch_on>switch_off|XX|CH:switch_on>switch_off", newPixel.color = pixelColorPick(newPixel);
"XX|CH:switch_on>switch_off|XX" }
], if(elements[newPixel.element].onCharge) {
conduct: 1, pixel.charge ??= 0;
noConduct: ["switch_on","switch_off"], if(isNaN(pixel.charge)) { pixel.charge = 0 };
category: "machines", elements[newPixel.element].onCharge(pixel);
}; };
}
elements.switch_on_control = { }
color: "#33FF33", else if (elements[newPixel.element].insulate != true && !elements[newPixel.element].noResistance) { // Otherwise heat the pixel (Resistance simulation)
behavior: behaviors.WALL, newPixel.temp += isNaN(pixel.charge) ? 0.25 : pixel.charge/4;
behaviorOn: [ pixelTempCheck(newPixel);
"XX|CH:switch_off>switch_on|XX", }
"CH:switch_off>switch_on|XX|CH:switch_off>switch_on", }
"XX|CH:switch_off>switch_on|XX" }
], pixel.charge -= 0.25;
conduct: 1, if (pixel.charge <= 0) {
noConduct: ["switch_on","switch_off"], delete pixel.charge;
category: "machines", //console.log(elements[pixel.element].chargeCD);
}; var chargeCd = elements[pixel.element].chargeCD ?? 4;
} else { pixel.chargeCD = chargeCd; //Customizable chargeCD
enabledMods.splice(enabledMods.indexOf(modName),0,formerlyNoConductMod) }
alert(`The ${formerlyNoConductMod} mod is required and has been automatically inserted (reload for this to take effect).`) }
localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); // Lower charge cooldown
}; else if (pixel.chargeCD) {
pixel.chargeCD -= 1;
if (pixel.chargeCD <= 0) {
delete pixel.chargeCD;
if (elements[pixel.element].colorOn) {
pixel.color = pixelColorPick(pixel);
}
}
}
}