Browse Source

code tidy

protected-button
BuckarooBanzay 4 months ago
parent
commit
0c19943f05
2 changed files with 12 additions and 3 deletions
  1. +1
    -1
      init.lua
  2. +11
    -2
      switch.lua

+ 1
- 1
init.lua View File

@@ -14,7 +14,7 @@ dofile(MP.."/chest.lua")
dofile(MP.."/plants.lua")
dofile(MP.."/nodes.lua")
dofile(MP.."/doors.lua")
dofile(MP.."/switches.lua")
dofile(MP.."/switch.lua")
dofile(MP.."/nodeboxes.lua")
dofile(MP.."/palm_scanner.lua")
dofile(MP.."/digicode.lua")


switches.lua → switch.lua View File

@@ -33,7 +33,12 @@ minetest.register_node("scifi_nodes:switch_on", {
paramtype = "light",
paramtype2 = "wallmounted",
light_source = 5,
groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
groups = {
cracky=1,
oddly_breakable_by_hand = 1,
not_in_creative_inventory = 1,
mesecon_needs_receiver = 1
},
mesecons = {
receptor = {
state = (has_mesecons and mesecon.state.on)
@@ -56,7 +61,11 @@ minetest.register_node("scifi_nodes:switch_off", {
selection_box = {type = "wallmounted",},
paramtype = "light",
paramtype2 = "wallmounted",
groups = {cracky=1, oddly_breakable_by_hand=1, mesecon_needs_receiver = 1},
groups = {
cracky = 1,
oddly_breakable_by_hand = 1,
mesecon_needs_receiver = 1
},
mesecons = {
receptor = {
state = (has_mesecons and mesecon.state.off)

Loading…
Cancel
Save