local switch_box = {fixed = {(-1 / 2), (-1 / 2), (-1 / 2), (1 / 2), ((-1 / 2) + (3 / 16)), (1 / 2)}, type = "fixed"}
local function _0_(pos, node, clicker, itemstack, pointed_thing)
  do
    local meta = minetest.get_meta(pos)
    meta:set_float("resis", 0.050000000000000003)
    swap_node(pos, "electricity:switch_on")
  end
  return nil
end
minetest.register_node("electricity:switch_off", {description = "Switch", drawtype = "nodebox", drop = "electricity:switch_off", groups = {crumbly = 3, disabled_electric_tool = 1}, node_box = switch_box, on_rightclick = _0_, paramtype = "light", paramtype2 = "facedir", selection_box = switch_box, tiles = {"electricity_switch_top_off.png", "electricity_switch_bottom.png", "electricity_switch_side.png", "electricity_switch_side.png", "electricity_switch_side.png", "electricity_switch_side.png"}})
local function _1_(pos, node, clicker, itemstack, pointed_thing)
  do
    local meta = minetest.get_meta(pos)
    meta:set_float("I", 0)
    meta:set_float("U", 0)
    reset_current(pos)
    swap_node(pos, "electricity:switch_off")
  end
  return nil
end
minetest.register_node("electricity:switch_on", {description = "Switch (active)", drawtype = "nodebox", drop = "electricity:switch_off", groups = {conductor = 1, crumbly = 3, not_in_creative_inventory = 1}, node_box = switch_box, on_destruct = reset_current, on_rightclick = _1_, paramtype = "light", paramtype2 = "facedir", selection_box = switch_box, tiles = {"electricity_switch_top_on.png", "electricity_switch_bottom.png", "electricity_switch_side.png", "electricity_switch_side.png", "electricity_switch_connect_side.png", "electricity_switch_connect_side.png"}})
model["electricity:switch_on"] = consumer
return nil
