summaryrefslogtreecommitdiff
path: root/trafficlight
diff options
context:
space:
mode:
authorwebdesigner97 <Christian_D_97@gmx.de>2014-04-23 23:07:03 +0200
committerwebdesigner97 <Christian_D_97@gmx.de>2014-04-23 23:07:03 +0200
commit6432eb425ed0233ea3882c0fecca6027804df4c6 (patch)
treec05e7498c47465be251be842408291f87b50f49c /trafficlight
parenteee27ca381b2d458c88173593dee44445ac7b80b (diff)
downloadroads-6432eb425ed0233ea3882c0fecca6027804df4c6.tar
roads-6432eb425ed0233ea3882c0fecca6027804df4c6.tar.gz
roads-6432eb425ed0233ea3882c0fecca6027804df4c6.tar.bz2
roads-6432eb425ed0233ea3882c0fecca6027804df4c6.tar.xz
roads-6432eb425ed0233ea3882c0fecca6027804df4c6.zip
good night commit
Diffstat (limited to 'trafficlight')
-rw-r--r--trafficlight/init.lua71
1 files changed, 28 insertions, 43 deletions
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