Update switches.js

This commit is contained in:
slweeb 2026-01-12 17:57:23 -05:00
parent 39824f41d5
commit e6d09e79b0
1 changed files with 49 additions and 47 deletions

View File

@ -1,51 +1,53 @@
var modName = "mods/switches.js"; // var modName = "mods/switches.js";
var formerlyNoConductMod = "mods/doElectricity changes.js"; // var formerlyNoConductMod = "mods/doElectricity changes.js";
if(enabledMods.includes(formerlyNoConductMod)) { // if(enabledMods.includes(formerlyNoConductMod)) {
elements.switch_off = {
name: "switch (off)",
color: "#7F3333",
behavior: behaviors.WALL,
noConduct: ["switch_on_control","switch_off_control"],
category: "machines",
};
elements.switch_on = { // } else {
name: "switch (on)", // enabledMods.splice(enabledMods.indexOf(modName),0,formerlyNoConductMod)
color: "#33CC33", // alert(`The ${formerlyNoConductMod} mod is required and has been automatically inserted (reload for this to take effect).`)
behavior: behaviors.WALL, // localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
conduct: 1, // };
noConduct: ["switch_on_control","switch_off_control"],
category: "machines",
};
elements.switch_off_control = { elements.switch_off = {
color: "#FF3333", name: "switch (off)",
behavior: behaviors.WALL, color: "#7F3333",
behaviorOn: [ behavior: behaviors.WALL,
"XX|CH:switch_on>switch_off|XX", noConduct: ["switch_on_control","switch_off_control"],
"CH:switch_on>switch_off|XX|CH:switch_on>switch_off", category: "machines",
"XX|CH:switch_on>switch_off|XX" };
],
conduct: 1, elements.switch_on = {
noConduct: ["switch_on","switch_off"], name: "switch (on)",
category: "machines", color: "#33CC33",
}; behavior: behaviors.WALL,
conduct: 1,
elements.switch_on_control = { noConduct: ["switch_on_control","switch_off_control"],
color: "#33FF33", category: "machines",
behavior: behaviors.WALL, };
behaviorOn: [
"XX|CH:switch_off>switch_on|XX", elements.switch_off_control = {
"CH:switch_off>switch_on|XX|CH:switch_off>switch_on", color: "#FF3333",
"XX|CH:switch_off>switch_on|XX" behavior: behaviors.WALL,
], behaviorOn: [
conduct: 1, "XX|CH:switch_on>switch_off|XX",
noConduct: ["switch_on","switch_off"], "CH:switch_on>switch_off|XX|CH:switch_on>switch_off",
category: "machines", "XX|CH:switch_on>switch_off|XX"
}; ],
} else { conduct: 1,
enabledMods.splice(enabledMods.indexOf(modName),0,formerlyNoConductMod) noConduct: ["switch_on","switch_off"],
alert(`The ${formerlyNoConductMod} mod is required and has been automatically inserted (reload for this to take effect).`) category: "machines",
localStorage.setItem("enabledMods", JSON.stringify(enabledMods)); };
elements.switch_on_control = {
color: "#33FF33",
behavior: behaviors.WALL,
behaviorOn: [
"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"
],
conduct: 1,
noConduct: ["switch_on","switch_off"],
category: "machines",
}; };