summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--streetlamps/init.lua26
1 files changed, 18 insertions, 8 deletions
diff --git a/streetlamps/init.lua b/streetlamps/init.lua
index ac08cde..49dea32 100644
--- a/streetlamps/init.lua
+++ b/streetlamps/init.lua
@@ -1,7 +1,7 @@
--[[
StreetsMod: Streetlamps
]]
-minetest.register_node(":streets:streetlamp_basic_controller",{
+--[[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},
@@ -37,7 +37,8 @@ minetest.register_node(":streets:streetlamp_basic_controller",{
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",
@@ -55,8 +56,8 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{
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"})
- minetest.set_node({x = pos.x, y = pos.y - 2, z = pos.z},{name = "streets:streetlamp_basic_controller"})
+ 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",{
@@ -74,7 +75,7 @@ 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},
@@ -88,7 +89,7 @@ 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",
@@ -96,7 +97,6 @@ minetest.register_node(":streets:streetlamp_basic_top_on",{
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",
@@ -104,5 +104,15 @@ 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
}) \ No newline at end of file