summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--streetsmod/textures/streets_tl_flashred.pngbin0 -> 1170 bytes
-rw-r--r--trafficlight/init.lua36
2 files changed, 35 insertions, 1 deletions
diff --git a/streetsmod/textures/streets_tl_flashred.png b/streetsmod/textures/streets_tl_flashred.png
new file mode 100644
index 0000000..82c118c
--- /dev/null
+++ b/streetsmod/textures/streets_tl_flashred.png
Binary files differ
diff --git a/trafficlight/init.lua b/trafficlight/init.lua
index 562068f..a042dee 100644
--- a/trafficlight/init.lua
+++ b/trafficlight/init.lua
@@ -33,6 +33,9 @@ streets.tlRythm = {
},
toWarn = {
{name = "streets:trafficlight_top_warn", pauseBefore = 0}
+ },
+ toFlashRed = {
+ {name = "streets:trafficlight_top_flashred", pauseBefore = 0}
}
}
@@ -80,6 +83,11 @@ streets.on_digiline_receive = function(pos, node, channel, msg)
pos = pos,
to = "toWarn"
})
+ elseif msg == "FLASHRED" then
+ streets.tlSwitch({
+ pos = pos,
+ to = "toFlashRed"
+ })
elseif msg == "GET" then
local state = minetest.get_meta(pos):get_string("state")
if not state or state == "" then
@@ -267,6 +275,32 @@ minetest.register_node(":streets:trafficlight_top_warn",{
},
})
+minetest.register_node(":streets:trafficlight_top_flashred",{
+ drop = "streets:trafficlight_top_off",
+ groups = {cracky = 1, not_in_creative_inventory = 1},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = true,
+ drawtype = "nodebox",
+ tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png",{
+ name="streets_tl_flashred.png",
+ animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.5},
+ }},
+ node_box = {
+ type = "fixed",
+ fixed = streets.tlBox
+ },
+ light_source = 6,
+ digiline = {
+ receptor = {},
+ effector = {
+ action = function(pos, node, channel, msg)
+ streets.on_digiline_receive(pos, node, channel, msg)
+ end
+ }
+ },
+})
+
minetest.register_craft({
output = "streets:trafficlight_top_off",
recipe = {
@@ -283,4 +317,4 @@ minetest.register_craft({
{"digilines:wire_std_00000000", "mesecons_luacontroller:luacontroller0000", "digilines:wire_std_00000000"},
{"", "digilines:wire_std_00000000", ""}
}
-}) \ No newline at end of file
+})