summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--streetsmod/textures/streets_tl_bg.pngbin3513 -> 750 bytes
-rw-r--r--streetsmod/textures/streets_tl_warn.pngbin3699 -> 3683 bytes
-rw-r--r--streetsmod/textures/streets_tl_yellow.pngbin3295 -> 1003 bytes
-rw-r--r--trafficlight/init.lua71
4 files changed, 28 insertions, 43 deletions
diff --git a/streetsmod/textures/streets_tl_bg.png b/streetsmod/textures/streets_tl_bg.png
index f0bba98..e4213db 100644
--- a/streetsmod/textures/streets_tl_bg.png
+++ b/streetsmod/textures/streets_tl_bg.png
Binary files differ
diff --git a/streetsmod/textures/streets_tl_warn.png b/streetsmod/textures/streets_tl_warn.png
index 8b4da58..349fa84 100644
--- a/streetsmod/textures/streets_tl_warn.png
+++ b/streetsmod/textures/streets_tl_warn.png
Binary files differ
diff --git a/streetsmod/textures/streets_tl_yellow.png b/streetsmod/textures/streets_tl_yellow.png
index 3666cae..42b4803 100644
--- a/streetsmod/textures/streets_tl_yellow.png
+++ b/streetsmod/textures/streets_tl_yellow.png
Binary files differ
diff --git a/trafficlight/init.lua b/trafficlight/init.lua
index 0b5d779..8501a2b 100644
--- a/trafficlight/init.lua
+++ b/trafficlight/init.lua
@@ -1,6 +1,21 @@
--[[
StreetsMod: inDev Trafficlights
]]
+streets.tlBox = {
+ --[[ Thank you, rubenwardy, for your awesome NodeboxEditor! Not perfect, but still great! ]]
+ {-0.1875,-0.5,0.5,0.1875,0.5,0.75}, --nodebox1
+ {-0.0625,0.375,0.3125,0.0625,0.4375,0.5}, --nodebox2
+ {-0.0625,0.0625,0.3125,0.0625,0.125,0.5}, --nodebox3
+ {-0.0625,-0.25,0.3125,0.0625,-0.1875,0.5}, --nodebox4
+ {0.0625,0.3125,0.3125,0.125,0.38,0.5}, --nodebox5
+ {-0.125,0.3125,0.3125,-0.0625,0.375,0.5}, --nodebox6
+ {0.0625,0,0.3125,0.125,0.0625,0.5}, --nodebox7
+ {-0.125,0,0.3125,-0.0625,0.0625,0.5}, --nodebox8
+ {0.0625,-0.3125,0.3125,0.125,-0.25,0.5}, --nodebox9
+ {-0.125,-0.3125,0.3125,-0.0625,-0.25,0.5}, --nodebox10
+}
+
+
minetest.register_node(":streets:trafficlight_top_off",{
description = S("Trafficlight"),
drawtype="nodebox",
@@ -9,29 +24,18 @@ minetest.register_node(":streets:trafficlight_top_off",{
groups = {cracky = 1, level = 2},
inventory_image = "streets_trafficlight_inv.png",
light_source = 11,
+ sunlight_propagates = true,
node_box = {
type = "fixed",
- fixed = {
- --[[ Thank you, rubenwardy, for your awesome NodeboxEditor! Not perfect, but still great! ]]
- {-0.1875,-0.5,0.5,0.1875,0.5,0.75}, --nodebox1
- {-0.0625,0.375,0.3125,0.0625,0.4375,0.5}, --nodebox2
- {-0.0625,0.0625,0.3125,0.0625,0.125,0.5}, --nodebox3
- {-0.0625,-0.25,0.3125,0.0625,-0.1875,0.5}, --nodebox4
- {0.0625,0.3125,0.3125,0.125,0.38,0.5}, --nodebox5
- {-0.125,0.3125,0.3125,-0.0625,0.375,0.5}, --nodebox6
- {0.0625,0,0.3125,0.125,0.0625,0.5}, --nodebox7
- {-0.125,0,0.3125,-0.0625,0.0625,0.5}, --nodebox8
- {0.0625,-0.3125,0.3125,0.125,-0.25,0.5}, --nodebox9
- {-0.125,-0.3125,0.3125,-0.0625,-0.25,0.5}, --nodebox10
- }
+ fixed = streets.tlBox
},
- tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_green.png"},
+ tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_off.png"},
})
minetest.register_node(":streets:trafficlight_top_red",{
description = S("U cheater U"),
drop = "",
- groups = {cracky = 1, not_in_creative_inventory = 1},
+ groups = {cracky = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
@@ -39,9 +43,7 @@ minetest.register_node(":streets:trafficlight_top_red",{
tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_red.png"},
node_box = {
type = "fixed",
- fixed = {
- {-0.25,-0.5,-0.25,0.25,0.5,0.25}
- }
+ fixed = streets.tlBox
},
pointable = false,
light_source = 6,
@@ -50,7 +52,7 @@ minetest.register_node(":streets:trafficlight_top_red",{
minetest.register_node(":streets:trafficlight_top_yellow",{
description = S("U cheater U"),
drop = "",
- groups = {cracky = 1, not_in_creative_inventory = 1},
+ groups = {cracky = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
@@ -58,9 +60,7 @@ minetest.register_node(":streets:trafficlight_top_yellow",{
tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_yellow.png"},
node_box = {
type = "fixed",
- fixed = {
- {-0.25,-0.5,-0.25,0.25,0.5,0.25}
- }
+ fixed = streets.tlBox
},
pointable = false,
light_source = 6,
@@ -69,7 +69,7 @@ minetest.register_node(":streets:trafficlight_top_yellow",{
minetest.register_node(":streets:trafficlight_top_redyellow",{
description = S("U cheater U"),
drop = "",
- groups = {cracky = 1, not_in_creative_inventory = 1},
+ groups = {cracky = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
@@ -77,9 +77,7 @@ minetest.register_node(":streets:trafficlight_top_redyellow",{
tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_redyellow.png"},
node_box = {
type = "fixed",
- fixed = {
- {-0.25,-0.5,-0.25,0.25,0.5,0.25}
- }
+ fixed = streets.tlBox
},
pointable = false,
light_source = 6,
@@ -88,7 +86,7 @@ minetest.register_node(":streets:trafficlight_top_redyellow",{
minetest.register_node(":streets:trafficlight_top_green",{
description = S("U cheater U"),
drop = "",
- groups = {cracky = 1, not_in_creative_inventory = 1},
+ groups = {cracky = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
@@ -96,9 +94,7 @@ minetest.register_node(":streets:trafficlight_top_green",{
tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_green.png"},
node_box = {
type = "fixed",
- fixed = {
- {-0.25,-0.5,-0.25,0.25,0.5,0.25}
- }
+ fixed = streets.tlBox
},
pointable = false,
light_source = 6,
@@ -107,7 +103,7 @@ minetest.register_node(":streets:trafficlight_top_green",{
minetest.register_node(":streets:trafficlight_top_warn",{
description = S("U cheater U"),
drop = "",
- groups = {cracky = 1, not_in_creative_inventory = 1},
+ groups = {cracky = 1},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
@@ -118,19 +114,8 @@ minetest.register_node(":streets:trafficlight_top_warn",{
}},
node_box = {
type = "fixed",
- fixed = {
- {-0.25,-0.5,-0.25,0.25,0.5,0.25}
- }
+ fixed = streets.tlBox
},
pointable = false,
light_source = 6,
-})
-
-minetest.register_craft({
- output = "streets:trafficlight_controller",
- recipe = {
- {"dye:red","",""},
- {"dye:yellow","",""},
- {"dye:green","",""}
- }
}) \ No newline at end of file