diff options
author | webdesigner97 <Christian_D_97@gmx.de> | 2013-11-24 13:34:27 +0100 |
---|---|---|
committer | webdesigner97 <Christian_D_97@gmx.de> | 2013-11-24 13:34:27 +0100 |
commit | eeb04f5ad694b577134caa6111fb307a7933533b (patch) | |
tree | 79410d5298844c59cac75ea912e45a77eec2a3c9 /streetlamps | |
parent | f1ca0097c44914aa6c5197ce0e994ed4daeb98d1 (diff) | |
download | roads-eeb04f5ad694b577134caa6111fb307a7933533b.tar roads-eeb04f5ad694b577134caa6111fb307a7933533b.tar.gz roads-eeb04f5ad694b577134caa6111fb307a7933533b.tar.bz2 roads-eeb04f5ad694b577134caa6111fb307a7933533b.tar.xz roads-eeb04f5ad694b577134caa6111fb307a7933533b.zip |
Finished StreetLamp
Diffstat (limited to 'streetlamps')
-rw-r--r-- | streetlamps/init.lua | 26 |
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 |