From 5b9e18f2786b9b0848536cc535523c6af648e4c5 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Fri, 23 Jun 2023 16:56:45 +0200 Subject: [PATCH] register `forcefield` and `wall` node as stealthnode if available --- .luacheckrc | 3 ++- init.lua | 5 +++++ mod.conf | 1 + stealthnodes.lua | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 stealthnodes.lua diff --git a/.luacheckrc b/.luacheckrc index ce9f8ea..f0423c2 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -22,5 +22,6 @@ read_globals = { "minetest", "mesecon", "unifieddyes", - "letters" + "letters", + "stealthnode" } diff --git a/init.lua b/init.lua index 6e9cb4b..4f8df32 100644 --- a/init.lua +++ b/init.lua @@ -36,4 +36,9 @@ dofile(MP.."/crafts.lua") if minetest.get_modpath("letters") then -- register letter nodes dofile(MP.."/letters.lua") +end + +if minetest.get_modpath("mesecons_stealthnode") then + -- register stealthnodes + dofile(MP.."/stealthnodes.lua") end \ No newline at end of file diff --git a/mod.conf b/mod.conf index 6ace87b..8140ac1 100644 --- a/mod.conf +++ b/mod.conf @@ -13,4 +13,5 @@ basic_materials, dye, unifieddyes, letters +mesecons_stealthnode """ diff --git a/stealthnodes.lua b/stealthnodes.lua new file mode 100644 index 0000000..337cc9e --- /dev/null +++ b/stealthnodes.lua @@ -0,0 +1,3 @@ + +stealthnode.register_stealthnode("scifi_nodes", "forcefield") +stealthnode.register_stealthnode("scifi_nodes", "wall") \ No newline at end of file