diff options
Diffstat (limited to 'steel')
-rw-r--r-- | steel/depends.txt | 1 | ||||
-rw-r--r-- | steel/init.lua | 69 | ||||
-rw-r--r-- | steel/models/steel_cube.obj | 50 | ||||
-rw-r--r-- | steel/textures/steel_default_steel_block.png | bin | 0 -> 272 bytes | |||
-rw-r--r-- | steel/textures/steel_strut_overlay.png | bin | 0 -> 123 bytes |
5 files changed, 119 insertions, 1 deletions
diff --git a/steel/depends.txt b/steel/depends.txt index 5643dca..105a865 100644 --- a/steel/depends.txt +++ b/steel/depends.txt @@ -3,3 +3,4 @@ streets? homedecor? protector? node_ownership? +unifieddyes? diff --git a/steel/init.lua b/steel/init.lua index 0b1ef0c..72aa92b 100644 --- a/steel/init.lua +++ b/steel/init.lua @@ -100,8 +100,11 @@ minetest.register_node("steel:plate_rusted", { sounds = default.node_sound_stone_defaults(), }) +local base_tex = "strut.png" + if minetest.registered_nodes["streets:steel_support"] then minetest.register_alias("steel:strut","streets:steel_support") + base_tex = "streets_support.png" else minetest.register_node("steel:strut", { drawtype = "glasslike", @@ -114,6 +117,26 @@ else }) minetest.register_alias("streets:steel_support","steel:strut") end + +minetest.register_node("steel:strut_mount", { + description = "Strut with mount", + drawtype = "mesh", + mesh = "steel_cube.obj", + tiles = { + base_tex, + base_tex, + base_tex.."^steel_strut_overlay.png", + base_tex.."^steel_strut_overlay.png", + base_tex.."^steel_strut_overlay.png", + base_tex.."^steel_strut_overlay.png", + }, + is_ground_content = true, + paramtype= "light", + paramtype2 = "wallmounted", + groups = {choppy=1,cracky=1}, + sounds = default.node_sound_stone_defaults(), +}) + minetest.register_node("steel:grate_soft", { description = "Soft Steel Grate", drawtype = "fencelike", @@ -266,6 +289,22 @@ minetest.register_craft({ {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, } }) + +minetest.register_craft({ + output = 'steel:strut_mount', + recipe = { + {'steel:strut', 'default:steel_ingot'}, + } +}) + +minetest.register_craft({ + output = 'steel:strut_mount', + recipe = { + {'streets:steel_support', 'default:steel_ingot'}, + } +}) + + --remelting recipes minetest.register_craft({ @@ -317,6 +356,34 @@ minetest.register_craft({ } }) +if minetest.get_modpath("unifieddyes") then + -- Colorize default:steel_block + + minetest.register_node("steel:steel_block", { + description = "Steel block (colorized)", + tiles = {"steel_default_steel_block.png"}, + paramtype = "light", + paramtype2 = "color", + is_ground_content = false, + palette = "unifieddyes_palette_extended.png", + groups = {cracky=1, level=2, ud_param2_colorable=1, not_in_creative_inventory=1}, + on_construct = unifieddyes.on_construct, + sounds = default.node_sound_metal_defaults(), + }) + minetest.override_item("default:steelblock", { + palette = "unifieddyes_palette_extended.png", + groups = {cracky=1, level=2, ud_param2_colorable=1}, + }) - + unifieddyes.register_color_craft({ + output = "steel:steel_block", + palette = "extended", + neutral_node = "default:steelblock", + type = "shapeless", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE", + } + }) +end diff --git a/steel/models/steel_cube.obj b/steel/models/steel_cube.obj new file mode 100644 index 0000000..349ca31 --- /dev/null +++ b/steel/models/steel_cube.obj @@ -0,0 +1,50 @@ +# Blender v2.79 (sub 0) OBJ File: 'simple-cube.blend' +# www.blender.org +o Cube_Cube.001 +v 0.499468 -0.499468 -0.499468 +v 0.499468 0.499468 -0.499468 +v 0.499468 -0.499468 0.499468 +v 0.499468 0.499468 0.499468 +v -0.499468 -0.499468 -0.499468 +v -0.499468 0.499468 -0.499468 +v -0.499468 -0.499468 0.499468 +v -0.499468 0.499468 0.499468 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt 0.000000 -0.000000 +vt 1.000000 0.000000 +vt 0.000000 -0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt 0.000000 1.000000 +vt -0.000000 0.000000 +vt 1.000000 -0.000000 +vt 1.000000 1.000000 +vt 1.000000 -0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt -0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt 0.000000 -0.000000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 0.0000 -1.0000 +g Cube_Cube.001_top +s off +f 8/1/1 4/2/1 2/3/1 6/4/1 +g Cube_Cube.001_bottom +f 3/5/2 7/6/2 5/7/2 1/8/2 +g Cube_Cube.001_right +f 7/6/3 8/1/3 6/9/3 5/10/3 +g Cube_Cube.001_left +f 1/11/4 2/12/4 4/2/4 3/5/4 +g Cube_Cube.001_back +f 3/13/5 4/14/5 8/15/5 7/16/5 +g Cube_Cube.001_front +f 5/17/6 6/18/6 2/19/6 1/20/6 diff --git a/steel/textures/steel_default_steel_block.png b/steel/textures/steel_default_steel_block.png Binary files differnew file mode 100644 index 0000000..c8f80be --- /dev/null +++ b/steel/textures/steel_default_steel_block.png diff --git a/steel/textures/steel_strut_overlay.png b/steel/textures/steel_strut_overlay.png Binary files differnew file mode 100644 index 0000000..fd5bcb2 --- /dev/null +++ b/steel/textures/steel_strut_overlay.png |