Added softdependencies for trafficlight

This commit is contained in:
Christian Danscheid 2013-08-15 11:28:58 +02:00
parent 2a229d6552
commit cea35d5c50
3 changed files with 20 additions and 2 deletions

View File

@ -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 .."!")

View File

@ -1,3 +1,4 @@
default
streetsmod
digilines?
digilines?
mesecons?

View File

@ -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,
})
})
end