summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Danscheid <Christian_D_97@gmx.de>2013-08-15 11:28:58 +0200
committerChristian Danscheid <Christian_D_97@gmx.de>2013-08-15 11:28:58 +0200
commitcea35d5c50a68247fc5b281261c3539eb690bfde (patch)
tree44d48d33fde2933817350919d7e4ba74f9e450dc
parent2a229d6552dfd08d817272edea2caf85de865c32 (diff)
downloadroads-cea35d5c50a68247fc5b281261c3539eb690bfde.tar
roads-cea35d5c50a68247fc5b281261c3539eb690bfde.tar.gz
roads-cea35d5c50a68247fc5b281261c3539eb690bfde.tar.bz2
roads-cea35d5c50a68247fc5b281261c3539eb690bfde.tar.xz
roads-cea35d5c50a68247fc5b281261c3539eb690bfde.zip
Added softdependencies for trafficlight
-rw-r--r--streetsmod/init.lua14
-rw-r--r--trafficlight/depends.txt3
-rw-r--r--trafficlight/init.lua5
3 files changed, 20 insertions, 2 deletions
diff --git a/streetsmod/init.lua b/streetsmod/init.lua
index 5a49d1b..3a94f6f 100644
--- a/streetsmod/init.lua
+++ b/streetsmod/init.lua
@@ -42,6 +42,20 @@
print("'Bucket' not installed \n\t => No signs available")
streets.extendedBy.bucket = false
end
+ if minetest.get_modpath("mesecons") then
+ print("'Mesecons' is installed \n\t => Trafficlights might be available. Checking for digilines.")
+ streets.extendedBy.mesecons = true
+ else
+ print("'Mesecons' not installed \n\t => No trafficlight, sorry.")
+ streets.extendedBy.mesecons = false
+ end
+ if minetest.get_modpath("digilines") then
+ print("'Digilines' is installed \n\t => Trafficlights might be available")
+ streets.extendedBy.digilines = true
+ else
+ print("'Digilines' not installed \n\t => No trafficlight, sorry.")
+ streets.extendedBy.digilines = false
+ end
-- Done
print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!") \ No newline at end of file
diff --git a/trafficlight/depends.txt b/trafficlight/depends.txt
index e0e13a6..8d7b8d8 100644
--- a/trafficlight/depends.txt
+++ b/trafficlight/depends.txt
@@ -1,3 +1,4 @@
default
streetsmod
-digilines? \ No newline at end of file
+digilines?
+mesecons? \ No newline at end of file
diff --git a/trafficlight/init.lua b/trafficlight/init.lua
index 6a6922d..4f3f201 100644
--- a/trafficlight/init.lua
+++ b/trafficlight/init.lua
@@ -1,6 +1,7 @@
--[[
StreetsMod: inDev Trafficlights
]]
+if streets.extendedBy.mesecons and streets.extendedBy.digilines then
minetest.register_node(":streets:trafficlight_bottom",{
description = "Trafficlight",
groups = {cracky = 1},
@@ -215,4 +216,6 @@ minetest.register_node(":streets:trafficlight_top_warn",{
},
pointable = false,
light_source = 6,
-}) \ No newline at end of file
+})
+
+end \ No newline at end of file