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,25 +1,32 @@
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 = {
// } else {
// 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));
// };
elements.switch_off = {
name: "switch (off)", name: "switch (off)",
color: "#7F3333", color: "#7F3333",
behavior: behaviors.WALL, behavior: behaviors.WALL,
noConduct: ["switch_on_control","switch_off_control"], noConduct: ["switch_on_control","switch_off_control"],
category: "machines", category: "machines",
}; };
elements.switch_on = { elements.switch_on = {
name: "switch (on)", name: "switch (on)",
color: "#33CC33", color: "#33CC33",
behavior: behaviors.WALL, behavior: behaviors.WALL,
conduct: 1, conduct: 1,
noConduct: ["switch_on_control","switch_off_control"], noConduct: ["switch_on_control","switch_off_control"],
category: "machines", category: "machines",
}; };
elements.switch_off_control = { elements.switch_off_control = {
color: "#FF3333", color: "#FF3333",
behavior: behaviors.WALL, behavior: behaviors.WALL,
behaviorOn: [ behaviorOn: [
@ -30,9 +37,9 @@ if(enabledMods.includes(formerlyNoConductMod)) {
conduct: 1, conduct: 1,
noConduct: ["switch_on","switch_off"], noConduct: ["switch_on","switch_off"],
category: "machines", category: "machines",
}; };
elements.switch_on_control = { elements.switch_on_control = {
color: "#33FF33", color: "#33FF33",
behavior: behaviors.WALL, behavior: behaviors.WALL,
behaviorOn: [ behaviorOn: [
@ -43,9 +50,4 @@ if(enabledMods.includes(formerlyNoConductMod)) {
conduct: 1, conduct: 1,
noConduct: ["switch_on","switch_off"], noConduct: ["switch_on","switch_off"],
category: "machines", category: "machines",
};
} else {
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));
}; };