summaryrefslogtreecommitdiff
path: root/constructionarea
diff options
context:
space:
mode:
authorChristian Danscheid <Christian_D_97@gmx.de>2013-08-10 19:23:52 +0200
committerChristian Danscheid <Christian_D_97@gmx.de>2013-08-10 19:23:52 +0200
commit7bda846ea7f8c3ad127b167e6c7a797bfd46f73f (patch)
tree37c4d4cc80cb2b11452d24df057e485c54687eb4 /constructionarea
downloadroads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar
roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar.gz
roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar.bz2
roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.tar.xz
roads-7bda846ea7f8c3ad127b167e6c7a797bfd46f73f.zip
Initial commit
Diffstat (limited to 'constructionarea')
-rw-r--r--constructionarea/depends.txt3
-rw-r--r--constructionarea/init.lua70
-rw-r--r--constructionarea/textures/streets_fence_bottom.pngbin0 -> 433 bytes
-rw-r--r--constructionarea/textures/streets_fence_fromtop.pngbin0 -> 215 bytes
-rw-r--r--constructionarea/textures/streets_fence_inv.pngbin0 -> 895 bytes
-rw-r--r--constructionarea/textures/streets_fence_top.pngbin0 -> 441 bytes
6 files changed, 73 insertions, 0 deletions
diff --git a/constructionarea/depends.txt b/constructionarea/depends.txt
new file mode 100644
index 0000000..f17a377
--- /dev/null
+++ b/constructionarea/depends.txt
@@ -0,0 +1,3 @@
+default
+streetsmod
+wool? \ No newline at end of file
diff --git a/constructionarea/init.lua b/constructionarea/init.lua
new file mode 100644
index 0000000..d9e328b
--- /dev/null
+++ b/constructionarea/init.lua
@@ -0,0 +1,70 @@
+minetest.register_node(":streets:constructionfence_bottom",{
+ description = "Construction fence",
+ tiles = {"streets_fence_fromtop.png","streets_fence_fromtop.png","streets_fence_fromtop.png","streets_fence_fromtop.png","streets_fence_bottom.png","streets_fence_bottom.png"},
+ groups = {cracky = 2,},
+ paramtype = "light",
+ inventory_image = "streets_fence_inv.png",
+ wield_image = "streets_fence_inv.png",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.1,0.5,0.0,0.1}, -- lower part
+ {-0.2,-0.0,-0.1,0.2,0.5,0.1} -- thing in the middle
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.1,0.5,1.0,0.1}
+ }
+ },
+ after_dig_node = function(pos,node,digger)
+ pos.y = pos.y + 1
+ minetest.remove_node(pos)
+ end,
+ after_place_node = function(pos,placer,itemstack)
+ pos.y = pos.y + 1
+ if minetest.get_node(pos).name == "air" then
+ minetest.add_node(pos,{name = "streets:constructionfence_top", param2 = minetest.dir_to_facedir(placer:get_look_dir())})
+ else
+ minetest.chat_send_player(placer:get_player_name("Not enough free space! A construction fence has a height of 2 blocks!"))
+ end
+ end
+})
+
+minetest.register_node(":streets:constructionfence_top",{
+ description = "Construction fence",
+ tiles = {"streets_fence_fromtop.png","streets_fence_fromtop.png","streets_fence_fromtop.png","streets_fence_fromtop.png","streets_fence_top.png","streets_fence_top.png"},
+ groups = {cracky = 2, not_in_creative_inventory = 1},
+ paramtype = "light",
+ paramtype2 = "facedir",
+ drawtype = "nodebox",
+ drop = "streets:constructionfence_bottom",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.1,0.5,0.0,0.1} -- upper part
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-1.5,-0.1,0.5,0.0,0.1}
+ }
+ },
+ after_dig_node = function(pos,node,digger)
+ pos.y = pos.y - 1
+ minetest.remove_node(pos)
+ end
+})
+
+minetest.register_craft({
+ output = "streets:constructionfence_bottom 8",
+ recipe = {
+ {"","",""},
+ {"","streets:sign_construction",""},
+ {"wool:red","wool:white","wool:red"}
+ }
+}) \ No newline at end of file
diff --git a/constructionarea/textures/streets_fence_bottom.png b/constructionarea/textures/streets_fence_bottom.png
new file mode 100644
index 0000000..d07d321
--- /dev/null
+++ b/constructionarea/textures/streets_fence_bottom.png
Binary files differ
diff --git a/constructionarea/textures/streets_fence_fromtop.png b/constructionarea/textures/streets_fence_fromtop.png
new file mode 100644
index 0000000..f4c0e23
--- /dev/null
+++ b/constructionarea/textures/streets_fence_fromtop.png
Binary files differ
diff --git a/constructionarea/textures/streets_fence_inv.png b/constructionarea/textures/streets_fence_inv.png
new file mode 100644
index 0000000..a73f300
--- /dev/null
+++ b/constructionarea/textures/streets_fence_inv.png
Binary files differ
diff --git a/constructionarea/textures/streets_fence_top.png b/constructionarea/textures/streets_fence_top.png
new file mode 100644
index 0000000..43a3613
--- /dev/null
+++ b/constructionarea/textures/streets_fence_top.png
Binary files differ