summaryrefslogtreecommitdiff
path: root/trafficlight
diff options
context:
space:
mode:
Diffstat (limited to 'trafficlight')
-rw-r--r--trafficlight/init.lua21
-rw-r--r--trafficlight/pole.lua33
2 files changed, 20 insertions, 34 deletions
diff --git a/trafficlight/init.lua b/trafficlight/init.lua
index 7e6051a..86d3878 100644
--- a/trafficlight/init.lua
+++ b/trafficlight/init.lua
@@ -18,23 +18,6 @@ streets.tlBox = {
{-0.125,-0.3125,0.3125,-0.0625,-0.25,0.5}, --nodebox10
}
-streets.rules_pole = {
- {x= 0, y= 0, z=-1},
- {x= 1, y= 0, z= 0},
- {x=-1, y= 0, z= 0},
- {x= 0, y= 0, z= 1},
- {x= 1, y= 1, z= 0},
- {x= 1, y=-1, z= 0},
- {x=-1, y= 1, z= 0},
- {x=-1, y=-1, z= 0},
- {x= 0, y= 1, z= 1},
- {x= 0, y=-1, z= 1},
- {x= 0, y= 1, z=-1},
- {x= 0, y=-1, z=-1},
- {x= 0, y=-1, z= 0},
- {x= 0, y= 1, z= 0}
-}
-
streets.tlRythm = {
toRed = {
{name = "streets:trafficlight_top_yellow", pauseBefore = 0},
@@ -101,7 +84,7 @@ streets.on_digiline_receive = function(pos, node, channel, msg)
end
minetest.register_node(":streets:digiline_distributor",{
- description = S("Digiline distributor"),
+ description = streets.S("Digiline distributor"),
tiles = {"streets_lampcontroller_top.png","streets_lampcontroller_bottom.png","streets_lampcontroller_sides.png"},
groups = {cracky = 1},
digiline = {
@@ -114,7 +97,7 @@ minetest.register_node(":streets:digiline_distributor",{
})
minetest.register_node(":streets:trafficlight_top_off",{
- description = S("Trafficlight"),
+ description = streets.S("Trafficlight"),
drawtype="nodebox",
paramtype = "light",
paramtype2 = "facedir",
diff --git a/trafficlight/pole.lua b/trafficlight/pole.lua
index 46d77aa..a8815fc 100644
--- a/trafficlight/pole.lua
+++ b/trafficlight/pole.lua
@@ -1,20 +1,23 @@
--[[
StreetsMod: inDev Trafficlights
]]
-minetest.register_node(":digiline_vertical:wire", {
- description = "Vertical digiline",
- tiles = {"default_brick.png"},
- wield_image = "digiline_std_inv.png",
- paramtype = "light",
- digiline =
- {
- wire =
- {
- rules = streets.rules_pole
- }
- },
- groups = {dig_immediate = 3}
-})
+local rules_pole = {
+ {x= 0, y= 0, z=-1},
+ {x= 1, y= 0, z= 0},
+ {x=-1, y= 0, z= 0},
+ {x= 0, y= 0, z= 1},
+ {x= 1, y= 1, z= 0},
+ {x= 1, y=-1, z= 0},
+ {x=-1, y= 1, z= 0},
+ {x=-1, y=-1, z= 0},
+ {x= 0, y= 1, z= 1},
+ {x= 0, y=-1, z= 1},
+ {x= 0, y= 1, z=-1},
+ {x= 0, y=-1, z=-1},
+ {x= 0, y=-1, z= 0},
+ {x= 0, y= 1, z= 0}
+}
+
minetest.register_node(":streets:bigpole", {
description = "Pole",
paramtype = "light",
@@ -31,7 +34,7 @@ minetest.register_node(":streets:bigpole", {
on_place = minetest.rotate_node,
digiline = {
wire = {
- rules = streets.rules_pole
+ rules = rules_pole
}
}
})