diff options
author | Christian <Christian_D_97@gmx.de> | 2013-11-24 11:14:19 -0800 |
---|---|---|
committer | Christian <Christian_D_97@gmx.de> | 2013-11-24 11:14:19 -0800 |
commit | 72081ea604af282ae7a5304dfcc689d8de735756 (patch) | |
tree | 161ca95e5fce06902ab9dc91b7644c632b0b448d /streetlamps | |
parent | d04d0c142f3826729c289ea52df1e85ad104dfdc (diff) | |
parent | 4fab78d25b26bb9111aa5d5da0511c8395f0c5ca (diff) | |
download | roads-72081ea604af282ae7a5304dfcc689d8de735756.tar roads-72081ea604af282ae7a5304dfcc689d8de735756.tar.gz roads-72081ea604af282ae7a5304dfcc689d8de735756.tar.bz2 roads-72081ea604af282ae7a5304dfcc689d8de735756.tar.xz roads-72081ea604af282ae7a5304dfcc689d8de735756.zip |
Merge pull request #3 from webdesigner97/indev
new release
Diffstat (limited to 'streetlamps')
-rw-r--r-- | streetlamps/init.lua | 86 | ||||
-rw-r--r-- | streetlamps/textures/streets_lamps_basi_inv.png | bin | 0 -> 4210 bytes | |||
-rw-r--r-- | streetlamps/textures/streets_lamps_basic_bottom.png | bin | 0 -> 3121 bytes | |||
-rw-r--r-- | streetlamps/textures/streets_lamps_basic_middle.png | bin | 0 -> 6634 bytes | |||
-rw-r--r-- | streetlamps/textures/streets_lamps_basic_top.png | bin | 0 -> 5112 bytes | |||
-rw-r--r-- | streetlamps/textures/streets_lamps_basic_top_top.png | bin | 0 -> 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 Binary files differnew file mode 100644 index 0000000..5c31236 --- /dev/null +++ b/streetlamps/textures/streets_lamps_basi_inv.png diff --git a/streetlamps/textures/streets_lamps_basic_bottom.png b/streetlamps/textures/streets_lamps_basic_bottom.png Binary files differnew file mode 100644 index 0000000..07d123f --- /dev/null +++ b/streetlamps/textures/streets_lamps_basic_bottom.png diff --git a/streetlamps/textures/streets_lamps_basic_middle.png b/streetlamps/textures/streets_lamps_basic_middle.png Binary files differnew file mode 100644 index 0000000..1370765 --- /dev/null +++ b/streetlamps/textures/streets_lamps_basic_middle.png diff --git a/streetlamps/textures/streets_lamps_basic_top.png b/streetlamps/textures/streets_lamps_basic_top.png Binary files differnew file mode 100644 index 0000000..355f50d --- /dev/null +++ b/streetlamps/textures/streets_lamps_basic_top.png diff --git a/streetlamps/textures/streets_lamps_basic_top_top.png b/streetlamps/textures/streets_lamps_basic_top_top.png Binary files differnew file mode 100644 index 0000000..4d6bf22 --- /dev/null +++ b/streetlamps/textures/streets_lamps_basic_top_top.png |