From e6c9a283bebb2a52a3896c18d6df0293f9294b18 Mon Sep 17 00:00:00 2001 From: Niklp Date: Wed, 11 Dec 2024 00:20:46 +0100 Subject: [PATCH] Register travelnet nodes as MVPS stoppers (#93) --- elevator.lua | 4 ++++ init.lua | 3 +++ mod.conf | 2 +- register_travelnet.lua | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/elevator.lua b/elevator.lua index bf8dcf4..daaf56c 100644 --- a/elevator.lua +++ b/elevator.lua @@ -152,6 +152,10 @@ minetest.register_node("travelnet:elevator", { end }) +if minetest.get_modpath("mesecons_mvps") then + mesecon.register_mvps_stopper("travelnet:elevator") +end + minetest.register_craft({ output = "travelnet:elevator", recipe = travelnet.elevator_recipe, diff --git a/init.lua b/init.lua index bba089d..b13411f 100644 --- a/init.lua +++ b/init.lua @@ -83,6 +83,9 @@ minetest.register_node("travelnet:hidden_top", { drop = "", }) +if minetest.get_modpath("mesecons_mvps") then + mesecon.register_mvps_stopper("travelnet:hidden_top") +end if travelnet.travelnet_effect_enabled then minetest.register_entity("travelnet:effect", { diff --git a/mod.conf b/mod.conf index 4fe48e2..810c5c3 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = travelnet depends = xcompat -optional_depends = mesecons, mtt +optional_depends = mesecons, mesecons_mvps, mtt description = Network of teleporter-boxes that allows easy travelling to other boxes on the same network. diff --git a/register_travelnet.lua b/register_travelnet.lua index daa111b..4b0c1c6 100644 --- a/register_travelnet.lua +++ b/register_travelnet.lua @@ -127,4 +127,8 @@ function travelnet.register_travelnet_box(cfg) recipe = { "group:travelnet", cfg.dye }, }) end + + if minetest.get_modpath("mesecons_mvps") then + mesecon.register_mvps_stopper(cfg.nodename) + end end