| | |
| | | --Minetest 0.4.7 mod: concrete |
| | | --Minetest 0.4.7 mod: concrete |
| | | --(c) 2013 by RealBadAngel <mk@realbadangel.pl> |
| | | |
| | | local technic = rawget(_G, "technic") or {} |
| | |
| | | "technic:concrete_post_with_platform") |
| | | end |
| | | |
| | | local steel_ingot |
| | | if minetest.get_modpath("technic_worldgen") then |
| | | steel_ingot = "technic:carbon_steel_ingot" |
| | | else |
| | | steel_ingot = "default:steel_ingot" |
| | | end |
| | | |
| | | minetest.register_craft({ |
| | | output = 'technic:rebar 6', |
| | | recipe = { |
| | | {'','', steel_ingot}, |
| | | {'',steel_ingot,''}, |
| | | {steel_ingot, '', ''}, |
| | | } |
| | | }) |
| | | |
| | | minetest.register_craft({ |
| | | output = 'technic:concrete 5', |
| | | recipe = { |
| | | {'default:stone','technic:rebar','default:stone'}, |
| | | {'technic:rebar','default:stone','technic:rebar'}, |
| | | {'default:stone','technic:rebar','default:stone'}, |
| | | } |
| | | }) |
| | | |
| | | minetest.register_craft({ |
| | | output = 'technic:concrete_post_platform 6', |
| | | recipe = { |
| | |
| | | minetest.register_craft({ |
| | | output = 'technic:concrete_post 12', |
| | | recipe = { |
| | | {'default:stone','technic:rebar','default:stone'}, |
| | | {'default:stone','technic:rebar','default:stone'}, |
| | | {'default:stone','technic:rebar','default:stone'}, |
| | | {'default:stone','basic_materials:steel_bar','default:stone'}, |
| | | {'default:stone','basic_materials:steel_bar','default:stone'}, |
| | | {'default:stone','basic_materials:steel_bar','default:stone'}, |
| | | } |
| | | }) |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | minetest.register_craftitem(":technic:rebar", { |
| | | description = S("Rebar"), |
| | | inventory_image = "technic_rebar.png", |
| | | }) |
| | | |
| | | minetest.register_node(":technic:concrete", { |
| | | description = S("Concrete Block"), |
| | | tiles = {"technic_concrete_block.png",}, |
| | | groups = {cracky=1, level=2, concrete=1}, |
| | | sounds = default.node_sound_stone_defaults(), |
| | | }) |
| | | |
| | | minetest.register_node(":technic:blast_resistant_concrete", { |
| | | description = S("Blast-resistant Concrete Block"), |
| | | tiles = {"technic_blast_resistant_concrete_block.png",}, |
| | | groups = {cracky=1, level=3, concrete=1}, |
| | | sounds = default.node_sound_stone_defaults(), |
| | | on_blast = function(pos, intensity) |
| | | if intensity > 1 then |
| | | if intensity > 9 then |
| | | minetest.remove_node(pos) |
| | | minetest.add_item(pos, "technic:blast_resistant_concrete") |
| | | return {"technic:blast_resistant_concrete"} |
| | | end |
| | | end, |
| | | }) |
| | | |
| | | if minetest.get_modpath("moreblocks") then |
| | | stairsplus:register_all("technic","blast_resistant_concrete","technic:blast_resistant_concrete",{ |
| | | description = "Blast-resistant Concrete", |
| | | tiles = {"technic_blast_resistant_concrete_block.png",}, |
| | | groups = {cracky=1, level=3, concrete=1}, |
| | | sounds = default.node_sound_stone_defaults(), |
| | | on_blast = function(pos, intensity) |
| | | if intensity > 1 then |
| | | minetest.remove_node(pos) |
| | | minetest.add_item(pos, "technic:blast_resistant_concrete") |
| | | end |
| | | end, |
| | | }) |
| | | end |
| | | |
| | | local box_platform = {-0.5, 0.3, -0.5, 0.5, 0.5, 0.5} |
| | | local box_post = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15} |
| | | local box_front = {-0.1, -0.3, 0, 0.1, 0.3, -0.5} |
| | | local box_front = {-0.1, -0.3, -0.5, 0.1, 0.3, 0} |
| | | local box_back = {-0.1, -0.3, 0, 0.1, 0.3, 0.5} |
| | | local box_left = {0, -0.3, -0.1, -0.5, 0.3, 0.1} |
| | | local box_left = {-0.5, -0.3, -0.1, 0, 0.3, 0.1} |
| | | local box_right = {0, -0.3, -0.1, 0.5, 0.3, 0.1} |
| | | |
| | | minetest.register_node(":technic:concrete_post_platform", { |
| | | description = S("Concrete Post Platform"), |
| | | tiles = {"technic_concrete_block.png",}, |
| | | tiles = {"basic_materials_concrete_block.png",}, |
| | | groups={cracky=1, level=2}, |
| | | sounds = default.node_sound_stone_defaults(), |
| | | paramtype = "light", |
| | | drawtype = "nodebox", |
| | | drawtype = "nodebox", |
| | | node_box = { |
| | | type = "fixed", |
| | | fixed = {box_platform} |
| | | }, |
| | | on_place = function (itemstack, placer, pointed_thing) |
| | | local node = minetest.get_node(pointed_thing.under) |
| | | if node.name ~= "technic:concrete_post" then |
| | | return minetest.item_place_node(itemstack, placer, pointed_thing) |
| | | if node.name ~= "technic:concrete_post" then |
| | | return minetest.item_place_node(itemstack, placer, pointed_thing) |
| | | end |
| | | minetest.set_node(pointed_thing.under, {name="technic:concrete_post_with_platform"}) |
| | | itemstack:take_item() |
| | |
| | | |
| | | minetest.register_node(":technic:concrete_post"..(platform == 1 and "_with_platform" or ""), { |
| | | description = S("Concrete Post"), |
| | | tiles = {"technic_concrete_block.png"}, |
| | | tiles = {"basic_materials_concrete_block.png"}, |
| | | groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform}, |
| | | sounds = default.node_sound_stone_defaults(), |
| | | drop = (platform == 1 and "technic:concrete_post_platform" or |