summaryrefslogtreecommitdiff
path: root/trafficlight
diff options
context:
space:
mode:
Diffstat (limited to 'trafficlight')
-rw-r--r--trafficlight/init.lua3
-rw-r--r--trafficlight/pole.lua39
2 files changed, 42 insertions, 0 deletions
diff --git a/trafficlight/init.lua b/trafficlight/init.lua
index 8501a2b..182a3a8 100644
--- a/trafficlight/init.lua
+++ b/trafficlight/init.lua
@@ -1,6 +1,9 @@
--[[
StreetsMod: inDev Trafficlights
]]
+
+dofile(streets.modpath .. "/../trafficlight/pole.lua")
+
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
diff --git a/trafficlight/pole.lua b/trafficlight/pole.lua
new file mode 100644
index 0000000..ab5e788
--- /dev/null
+++ b/trafficlight/pole.lua
@@ -0,0 +1,39 @@
+--[[
+ StreetsMod: inDev Trafficlights
+]]
+minetest.register_node(":streets:bigpole", {
+ description = "Pole",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ tiles = {"streets_pole.png"},
+ groups = {cracky = 1, level = 2, bigpole = 1},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.15, -1.15, -0.15, 0.15, 1.15, 0.15}
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
+ }
+ },
+ on_place = minetest.rotate_node
+})
+minetest.register_node(":streets:bigpole_edge", {
+ drop = "streets:bigpole",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ tiles = {"streets_pole.png"},
+ groups = {cracky = 1, level = 2, not_in_creative_inventory = 1, bigpole = 1},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.15,-0.5,-0.15,0.15,0.15,0.15},
+ {-0.15,-0.15,-0.125,0.15,0.15,-0.5}
+ }
+ },
+}) \ No newline at end of file