From 0c19943f05b0787cccbbe69335af79798ed1d55f Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Mon, 11 May 2020 10:18:13 +0200 Subject: [PATCH] code tidy --- init.lua | 2 +- switches.lua => switch.lua | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) rename switches.lua => switch.lua (91%) diff --git a/init.lua b/init.lua index b1bba98..da0ad0d 100644 --- a/init.lua +++ b/init.lua @@ -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") diff --git a/switches.lua b/switch.lua similarity index 91% rename from switches.lua rename to switch.lua index a1bdef0..2383a84 100644 --- a/switches.lua +++ b/switch.lua @@ -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)