aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authorBlockhead <jbis1337@hotmail.com>2021-03-30 10:16:43 +0200
committerorwell96 <orwell@bleipb.de>2021-03-31 09:31:33 +0200
commit99e619a2e57683196e2da5dba2346184554a3019 (patch)
treea908d6d23358390069eb4e3486a326bcc41292e6 /advtrains
parent5d372b1cf127733d9addd832f584f05d87437b29 (diff)
downloadadvtrains-99e619a2e57683196e2da5dba2346184554a3019.tar.gz
advtrains-99e619a2e57683196e2da5dba2346184554a3019.tar.bz2
advtrains-99e619a2e57683196e2da5dba2346184554a3019.zip
Make mesecons_switch a proper optional dependency (H#175)
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/mod.conf2
-rw-r--r--advtrains/p_mesecon_iface.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/mod.conf b/advtrains/mod.conf
index 027e08a..5808d1a 100644
--- a/advtrains/mod.conf
+++ b/advtrains/mod.conf
@@ -4,4 +4,4 @@ description=Core system for realistic trains in Minetest
author=orwell96
depends=serialize_lib
-optional_depends=mesecons,digtron
+optional_depends=mesecons,mesecons_switch,digtron
diff --git a/advtrains/p_mesecon_iface.lua b/advtrains/p_mesecon_iface.lua
index 0eef96a..33fcecd 100644
--- a/advtrains/p_mesecon_iface.lua
+++ b/advtrains/p_mesecon_iface.lua
@@ -1,7 +1,7 @@
-- p_mesecon_iface.lua
-- Mesecons interface by overriding the switch
-if not mesecon then return end
+if minetest.get_modpath("mesecons_switch") == nil then return end
minetest.override_item("mesecons_switch:mesecon_switch_off", {
groups = {