Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2012
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.88 KB | None | 0 0
  1. -- Metals mod.
  2. -- Jordan Snelling, jordach@blokkeren.co.cc / jordach.snelling@gmail.com / http://twitter.com/jordansnelling
  3.  
  4. -- Nodes
  5.  
  6. minetest.register_node("metals:cross_girders", {
  7.     description = "Girders",
  8.     drawtype = "glasslike",
  9.     tiles ={"metals_girders_a.png"},
  10.     inventory_image = minetest.inventorycube("metals_girders_a.png"),
  11.     paramtype = "light",
  12.     sunlight_propagates = true,
  13.     is_ground_content = true,
  14.     groups = {snappy=1,bendy=2},
  15. })
  16.  
  17. minetest.register_node("metals:cross_girders_warning", {
  18.     description = "Girders",
  19.     drawtype = "glasslike",
  20.     tiles ={"metals_girders_b.png"},
  21.     inventory_image = minetest.inventorycube("metals_girders_b.png"),
  22.     paramtype = "light",
  23.     sunlight_propagates = true,
  24.     is_ground_content = true,
  25.     groups = {snappy=1,bendy=2},
  26. })
  27.  
  28. minetest.register_node("metals:warning", {
  29.     description = "Warning Marker",
  30.     tiles ={"metals_warning.png"},
  31.     inventory_image = minetest.inventorycube("metals_warning.png"),
  32.     is_ground_content = true,
  33.     groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
  34. })
  35.  
  36. minetest.register_node("metals:pipe_ud", {
  37.     description = "Pipe",
  38.     tiles ={"metals_pipe_ud_join.png", "metals_pipe_ud_join.png", "metals_pipe_ud.png"},
  39.     is_ground_content = true,
  40.     groups = {snappy=1,bendy=2},
  41. })
  42.  
  43. minetest.register_node("metals:pipe_lr", {
  44.     description = "Pipe",
  45.     tile_images = { 'metals_pipe_lr.png',
  46.             'metals_pipe_lr.png',
  47.             'metals_pipe_lr.png',
  48.             'metals_pipe_lr.png',
  49.             'metals_pipe_lr_join.png',
  50.             'metals_pipe_lr_join.png', },
  51.     paramtype2 = "facedir",
  52.     is_ground_content = true,
  53.     groups = {snappy=1,bendy=2},
  54. })
  55.  
  56. minetest.register_node("metals:pipe_cover", {
  57.     description = "Pipe Cap",
  58.     drawtype = "nodebox",
  59.     tiles = {"metals_pipe_cover.png"},
  60.     inventory_image = "metals_pipe_cover.png",
  61.     wield_image = "metals_pipe_cover.png",
  62.     paramtype = "light",
  63.     paramtype2 = "facedir",
  64.     sunlight_propagates = true,
  65.     walkable = false,
  66.     metadata_name = "sign",
  67.     selection_box = {
  68.         type = "fixed",
  69.         fixed = {-0.4999, -0.4999, 0.4999, 0.4999, 0.4999, 0.4999},
  70.     },
  71.     node_box = {
  72.         type = "fixed",
  73.         fixed = {-0.4999, -0.4999, 0.4999, 0.4999, 0.4999, 0.4999},
  74.     },
  75.     groups = {snappy=1, bendy=2},
  76. })
  77.  
  78. minetest.register_node("metals:metal_rails", {
  79.     description = "Metal Railings",
  80.     drawtype = "fencelike",
  81.     tiles ={"metals_fence.png"},
  82.     inventory_image = "metals_fence_icon.png",
  83.     wield_image = "metals_fence_icon.png",
  84.     paramtype = "light",
  85.     is_ground_content = true,
  86.     selection_box = {
  87.         type = "fixed",
  88.         fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
  89.     },
  90.     groups = {snappy=1,bendy=2},
  91. })
  92.  
  93. minetest.register_node("metals:corregated_iron", {
  94.     description = "Corregated Ironr",
  95.     tiles ={"metals_corregated_iron.png"},
  96.     inventory_image = minetest.inventorycube("metals_corregated_iron.png"),
  97.     is_ground_content = true,
  98.     groups = {snappy=1,bendy=2},
  99. })
  100.  
  101. --Register Special
  102.  
  103. minetest.register_craftitem("metals:half_ingot", {
  104.     description = "Half Ingot",
  105.     inventory_image = "metals_half_ingot.png",
  106. })
  107.  
  108. --Crafts
  109.  
  110. minetest.register_craft({
  111.     type = "cooking",
  112.     output = "default:steel_ingot 5",
  113.     recipe = "metals:cross_girders",
  114. })
  115.  
  116. minetest.register_craft({
  117.     type = "cooking",
  118.     output = "default:steel_ingot 5",
  119.     recipe = "metals:cross_girders_warning",
  120. })
  121.  
  122. minetest.register_craft({
  123.     type = "cooking",
  124.     output = "default:steel_ingot 6",
  125.     recipe = "metals:pipe_ud",
  126. })
  127.  
  128. minetest.register_craft({
  129.     type = "cooking",
  130.     output = "default:steel_ingot 6",
  131.     recipe = "metals:pipe_lr",
  132. })
  133.  
  134. minetest.register_craft({
  135.     type = "cooking",
  136.     output = "default:steel_ingot 6",
  137.     recipe = "metals:metal_rails",
  138. })
  139.  
  140. minetest.register_craft({
  141.     type = "cooking",
  142.     output = "default:steel_ingot 5",
  143.     recipe = "metals:pipe_cover",
  144. })
  145.  
  146. minetest.register_craft({
  147.     type = "cooking",
  148.     output = "default:steel_ingot 4",
  149.     recipe = "metals:cross_girders",
  150. })
  151.  
  152. -- Next
  153.  
  154. minetest.register_craft({
  155.     output = 'metals:cross_girders',
  156.     recipe = {
  157.         {'default:steel_ingot', '', 'default:steel_ingot'},
  158.         {'', 'default:steel_ingot', ''},
  159.         {'default:steel_ingot', '', 'default:steel_ingot'},
  160.     }
  161. })
  162.  
  163. minetest.register_craft({
  164.     output = 'metals:warning',
  165.     recipe = {
  166.         {'default:wood', 'unifieddyes:yellow', 'unifieddyes:black'},
  167.     }
  168. })
  169.  
  170. minetest.register_craft({
  171.     output = 'metals:cross_girders_warning',
  172.     recipe = {
  173.         {'metals:cross_girders', 'unifieddyes:yellow', 'unifieddyes:black'},
  174.     }
  175. })
  176.  
  177. minetest.register_craft({
  178.     output = 'metals:pipe_ud',
  179.     recipe = {
  180.         {'default:steel_ingot', '', 'default:steel_ingot'},
  181.         {'default:steel_ingot', '', 'default:steel_ingot'},
  182.         {'default:steel_ingot', '', 'default:steel_ingot'},
  183.     }
  184. })
  185.  
  186. minetest.register_craft({
  187.     output = 'metals:pipe_lr',
  188.     recipe = {
  189.         {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  190.         {'', '', ''},
  191.         {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  192.     }
  193. })
  194.  
  195. minetest.register_craft({
  196.     output = 'metals:metal_rails',
  197.     recipe = {
  198.         {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  199.         {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  200.     }
  201. })
  202.  
  203. minetest.register_craft({
  204.     output = 'metals:pipe_cover',
  205.     recipe = {
  206.         {'', 'default:steel_ingot', ''},
  207.         {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  208.         {'', 'default:steel_ingot', ''},
  209.     }
  210. })
  211.  
  212. minetest.register_craft({
  213.     output = 'metals:half_ingot 2',
  214.     type = "shapeless",
  215.     recipe = {
  216.         {'default:steel_ingot'},
  217.     }
  218. })
  219.  
  220. minetest.register_craft({
  221.     output = 'default:steel_ingot',
  222.     type = "shapeless",
  223.     recipe = {
  224.         {'metals:half_ingot', 'metals:half_ingot'},
  225.     }
  226. })
  227.  
  228. minetest.register_craft({
  229.     output = 'metals:corregated_iron 4',
  230.     recipe = {
  231.         {'metals:half_ingot', 'metals:half_ingot', 'metals:half_ingot'},
  232.         {'metals:half_ingot', 'metals:half_ingot', 'metals:half_ingot'},
  233.         {'metals:half_ingot', 'metals:half_ingot', 'metals:half_ingot'},
  234.     }
  235. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement