summaryrefslogtreecommitdiff
path: root/streetlamps
diff options
context:
space:
mode:
authorwebdesigner97 <Christian_D_97@gmx.de>2013-11-24 20:11:27 +0100
committerwebdesigner97 <Christian_D_97@gmx.de>2013-11-24 20:11:27 +0100
commit09ab936c5c1f73cff63d309badf6c2d0742768ae (patch)
tree18ad5ac274d8625071bd941a76e419dd9765770d /streetlamps
parentb1ac7abba79201778f60e1b4ec44f90ca1ed1ba4 (diff)
parent4fab78d25b26bb9111aa5d5da0511c8395f0c5ca (diff)
downloadroads-09ab936c5c1f73cff63d309badf6c2d0742768ae.tar
roads-09ab936c5c1f73cff63d309badf6c2d0742768ae.tar.gz
roads-09ab936c5c1f73cff63d309badf6c2d0742768ae.tar.bz2
roads-09ab936c5c1f73cff63d309badf6c2d0742768ae.tar.xz
roads-09ab936c5c1f73cff63d309badf6c2d0742768ae.zip
Merge branch 'indev'
Diffstat (limited to 'streetlamps')
-rw-r--r--streetlamps/init.lua86
-rw-r--r--streetlamps/textures/streets_lamps_basi_inv.pngbin0 -> 4210 bytes
-rw-r--r--streetlamps/textures/streets_lamps_basic_bottom.pngbin0 -> 3121 bytes
-rw-r--r--streetlamps/textures/streets_lamps_basic_middle.pngbin0 -> 6634 bytes
-rw-r--r--streetlamps/textures/streets_lamps_basic_top.pngbin0 -> 5112 bytes
-rw-r--r--streetlamps/textures/streets_lamps_basic_top_top.pngbin0 -> 6359 bytes
6 files changed, 71 insertions, 15 deletions
diff --git a/streetlamps/init.lua b/streetlamps/init.lua
index 1cc9973..a139104 100644
--- a/streetlamps/init.lua
+++ b/streetlamps/init.lua
@@ -1,8 +1,49 @@
--[[
StreetsMod: Streetlamps
]]
+--[[minetest.register_node(":streets:streetlamp_basic_controller",{
+ description = "Trafficlight",
+ tiles = {"streets_lampcontroller_top.png","streets_lampcontroller_bottom.png","streets_lampcontroller_sides.png"},
+ groups = {cracky = 1, not_in_creative_inventory = 1},
+ drawtype = "nodebox",
+ paramtype = "light",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.05,0.5,-0.05,0.05,1.6,0.05}
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.3,1.5,-0.3,0.3,4.5,0.3}
+ }
+ },
+ mesecons = {
+ effector = {
+ action_on = function(pos,node)
+ minetest.set_node({x = pos.x, y = pos.y + 4, z = pos.z},{name = "streets:streetlamp_basic_top_on"})
+ end,
+ action_off = function(pos,node)
+ minetest.set_node({x = pos.x, y = pos.y + 4, z = pos.z},{name = "streets:streetlamp_basic_top_off"})
+ end
+ }
+ },
+ after_dig_node = function(pos)
+ minetest.remove_node({x = pos.x, y = pos.y + 2, z = pos.z})
+ minetest.remove_node({x = pos.x, y = pos.y + 3, z = pos.z})
+ minetest.remove_node({x = pos.x, y = pos.y + 4, z = pos.z})
+ minetest.chat_send_all("!!!")
+ end
+})]]
+
minetest.register_node(":streets:streetlamp_basic_bottom",{
+ drop = "",
description = "Street lamp",
+ tiles = {"streets_lamps_basic_bottom.png"},
+ inventory_image = "streets_lamps_basi_inv.png",
groups = {cracky = 1},
paramtype = "light",
drawtype = "nodebox",
@@ -13,24 +54,18 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{
{-0.1,0.4,-0.1,0.1,0.5,0.1}
}
},
+ pointable = false,
after_place_node = function(pos,placer,itemstack)
minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},{name = "streets:streetlamp_basic_middle"})
- minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"})
- end,
- mesecons = {
- effector = {
- action_on = function(pos,node)
- minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_on"})
- end,
- action_off = function(pos,node)
- minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"})
- end
- }
- }
+ minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_on"})
+ -- minetest.set_node({x = pos.x, y = pos.y - 2, z = pos.z},{name = "streets:streetlamp_basic_controller"})
+ end
})
minetest.register_node(":streets:streetlamp_basic_middle",{
+ drop = "",
description = "U cheater U",
groups = {cracky = 1, not_in_creative_inventory = 1},
+ tiles = {"streets_lamps_basic_middle.png"},
paramtype = "light",
drawtype = "nodebox",
pointable = false,
@@ -41,7 +76,8 @@ minetest.register_node(":streets:streetlamp_basic_middle",{
}
}
})
-minetest.register_node(":streets:streetlamp_basic_top_off",{
+--[[minetest.register_node(":streets:streetlamp_basic_top_off",{
+ drop = "",
description = "U cheater U",
groups = {cracky = 1, not_in_creative_inventory = 1},
paramtype = "light",
@@ -54,13 +90,14 @@ minetest.register_node(":streets:streetlamp_basic_top_off",{
{-0.3,-0.4,-0.3,0.3,0.5,0.3}
}
}
-})
+})]]
minetest.register_node(":streets:streetlamp_basic_top_on",{
+ drop = "",
description = "U cheater U",
groups = {cracky = 1, not_in_creative_inventory = 1},
+ tiles = {"streets_lamps_basic_top_top.png","streets_lamps_basic_top_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png"},
paramtype = "light",
drawtype = "nodebox",
- pointable = false,
light_source = 10,
node_box = {
type = "fixed",
@@ -68,5 +105,24 @@ minetest.register_node(":streets:streetlamp_basic_top_on",{
{-0.1,-0.5,-0.1,0.1,-0.4,0.1},
{-0.3,-0.4,-0.3,0.3,0.5,0.3}
}
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.3,0.5,-0.3,0.3,-2.5,0.3},
+ }
+ },
+ after_dig_node = function(pos)
+ minetest.remove_node({x = pos.x, y = pos.y - 1, z = pos.z})
+ minetest.remove_node({x = pos.x, y = pos.y - 2, z = pos.z})
+ end
+})
+
+minetest.register_craft({
+ output = "streets:streetlamp_basic_bottom",
+ recipe = {
+ {"","default:torch",""},
+ {"","default:stick",""},
+ {"","default:stick",""}
}
}) \ No newline at end of file
diff --git a/streetlamps/textures/streets_lamps_basi_inv.png b/streetlamps/textures/streets_lamps_basi_inv.png
new file mode 100644
index 0000000..5c31236
--- /dev/null
+++ b/streetlamps/textures/streets_lamps_basi_inv.png
Binary files differ
diff --git a/streetlamps/textures/streets_lamps_basic_bottom.png b/streetlamps/textures/streets_lamps_basic_bottom.png
new file mode 100644
index 0000000..07d123f
--- /dev/null
+++ b/streetlamps/textures/streets_lamps_basic_bottom.png
Binary files differ
diff --git a/streetlamps/textures/streets_lamps_basic_middle.png b/streetlamps/textures/streets_lamps_basic_middle.png
new file mode 100644
index 0000000..1370765
--- /dev/null
+++ b/streetlamps/textures/streets_lamps_basic_middle.png
Binary files differ
diff --git a/streetlamps/textures/streets_lamps_basic_top.png b/streetlamps/textures/streets_lamps_basic_top.png
new file mode 100644
index 0000000..355f50d
--- /dev/null
+++ b/streetlamps/textures/streets_lamps_basic_top.png
Binary files differ
diff --git a/streetlamps/textures/streets_lamps_basic_top_top.png b/streetlamps/textures/streets_lamps_basic_top_top.png
new file mode 100644
index 0000000..4d6bf22
--- /dev/null
+++ b/streetlamps/textures/streets_lamps_basic_top_top.png
Binary files differ