diff --git a/building_blocks/depends.txt b/building_blocks/depends.txt new file mode 100644 index 00000000..562cf632 --- /dev/null +++ b/building_blocks/depends.txt @@ -0,0 +1 @@ +default diff --git a/building_blocks/init.lua b/building_blocks/init.lua new file mode 100644 index 00000000..3adf060e --- /dev/null +++ b/building_blocks/init.lua @@ -0,0 +1,421 @@ +minetest.register_node("building_blocks:Adobe", { + tile_images = {"building_blocks_Adobe.png"}, + description = "Adobe", + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("building_blocks:Roofing", { + tile_images = {"building_blocks_Roofing.png"}, + is_ground_content = true, + description = "Roof block", + groups = {snappy=3}, +}) +minetest.register_craft({ + output = 'building_blocks:terrycloth_towel 2', + recipe = { + {"flowers:cotton", "flowers:cotton", "flowers:cotton"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:Tarmac_spread 4', + recipe = { + {"building_blocks:Tar", "building_blocks:Tar"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:gravel_spread 4', + recipe = { + {"default:gravel", "default:gravel", "default:gravel"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:brobble_spread 4', + recipe = { + {"default:brick", "default:cobble", "default:brick"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:Fireplace 1', + recipe = { + {"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:Adobe 3', + recipe = { + {"default:sand"}, + {"default:clay"}, + {"default:stick"}, + } +}) + +minetest.register_craft({ + output = 'building_blocks:Roofing 10', + recipe = { + {"building_blocks:Adobe", "building_blocks:Adobe"}, + {"building_blocks:Adobe", "building_blocks:Adobe"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:BWtile 10', + recipe = { + {"building_blocks:Marble", "building_blocks:Tar"}, + {"building_blocks:Tar", "building_blocks:Marble"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:grate 1', + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:glass", "default:glass"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:woodglass 1', + recipe = { + {"default:wood"}, + {"default:glass"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:hardwood 1', + recipe = { + {"default:wood", "default:wood"}, + {"default:wood", "default:wood"}, + } +}) +minetest.register_craft({ + output = 'building_blocks:sticks', + recipe = { + {'default:stick', 'default:stick'}, + {'default:stick', 'default:stick'}, + } +}) + +minetest.register_craft({ + output = 'building_blocks:fakegrass 2', + recipe = { + {'default:leaves'}, + {"default:dirt"}, + } +}) + +minetest.register_craft({ + type = "cooking", + output = "building_blocks:smoothglass", + recipe = "default:glass" +}) +minetest.register_node("building_blocks:smoothglass", { + drawtype = "glasslike", + description = "Streak Free Glass", + tile_images = {"building_blocks_sglass.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3}, + sounds = default.node_sound_glass_defaults(), +}) +minetest.register_node("building_blocks:grate", { + drawtype = "glasslike", + description = "Grate", + tile_images = {"building_blocks_grate.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + groups = {cracky=1}, +}) +minetest.register_node("building_blocks:Fireplace", { + drawtype = "stonelike", + description = "fireplace", + tile_images = {"building_blocks_cast_iron.png","building_blocks_cast_iron.png","building_blocks_cast_iron.png","building_blocks_cast_iron_fireplace.png"}, + paramtype = "facedir_simple", + light_source = LIGHT_MAX, + sunlight_propagates = true, + is_ground_content = true, + groups = {cracky=2}, +}) +minetest.register_node("building_blocks:woodglass", { + drawtype = "glasslike", + description = "Wood Framed Glass", + tile_images = {"building_blocks_wglass.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3}, + sounds = default.node_sound_glass_defaults(), +}) +minetest.register_node("building_blocks:terrycloth_towel", { + drawtype = "raillike", + description = "Terrycloth towel", + tile_images = {"building_blocks_towel.png"}, + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + -- but how to specify the dimensions for curved and sideways rails? + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sunlight_propagates = true, + is_ground_content = true, + groups = {crumbly=3}, +}) +minetest.register_node("building_blocks:Tarmac_spread", { + drawtype = "raillike", + description = "Tarmac Spread", + tile_images = {"building_blocks_tar.png"}, + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + -- but how to specify the dimensions for curved and sideways rails? + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sunlight_propagates = true, + is_ground_content = true, + groups = {cracky=3}, +}) +minetest.register_node("building_blocks:BWtile", { + drawtype = "raillike", + description = "Chess board tiling", + tile_images = {"building_blocks_BWtile.png"}, + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + -- but how to specify the dimensions for curved and sideways rails? + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sunlight_propagates = true, + is_ground_content = true, + groups = {crumbly=3}, +}) +minetest.register_node("building_blocks:brobble_spread", { + drawtype = "raillike", + description = "Brobble Spread", + tile_images = {"building_blocks_brobble.png"}, + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + -- but how to specify the dimensions for curved and sideways rails? + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sunlight_propagates = true, + is_ground_content = true, + groups = {crumbly=3}, +}) +minetest.register_node("building_blocks:gravel_spread", { + drawtype = "raillike", + description = "Gravel Spread", + tile_images = {"default_gravel.png"}, + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + -- but how to specify the dimensions for curved and sideways rails? + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sunlight_propagates = true, + is_ground_content = true, + groups = {crumbly=2}, +}) +minetest.register_node("building_blocks:hardwood", { + tile_images = {"building_blocks_hardwood.png"}, + is_ground_content = true, + description = "Hardwood", + groups = {choppy=1,flammable=1}, + sounds = default.node_sound_wood_defaults(), +}) + +bb_stairs = {} + +-- Node will be called stairs:stair_ +function bb_stairs.register_stair(subname, recipeitem, groups, images, description) + minetest.register_node("building_blocks:stair_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = images, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = true, + groups = groups, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + {-0.5, 0, 0, 0.5, 0.5, 0.5}, + }, + }, + }) + + minetest.register_craft({ + output = 'building_blocks:stair_' .. subname .. ' 4', + recipe = { + {recipeitem, "", ""}, + {recipeitem, recipeitem, ""}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Flipped recipe for the silly minecrafters + minetest.register_craft({ + output = 'building_blocks:stair_' .. subname .. ' 4', + recipe = { + {"", "", recipeitem}, + {"", recipeitem, recipeitem}, + {recipeitem, recipeitem, recipeitem}, + }, + }) +end + +-- Node will be called stairs:slab_ +function bb_stairs.register_slab(subname, recipeitem, groups, images, description) + minetest.register_node("building_blocks:slab_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = images, + paramtype = "light", + is_ground_content = true, + groups = groups, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + }, + }) + + minetest.register_craft({ + output = 'building_blocks:slab_' .. subname .. ' 3', + recipe = { + {recipeitem, recipeitem, recipeitem}, + }, + }) +end + +-- Nodes will be called stairs:{stair,slab}_ +function bb_stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab) + bb_stairs.register_stair(subname, recipeitem, groups, images, desc_stair) + bb_stairs.register_slab(subname, recipeitem, groups, images, desc_slab) +end +bb_stairs.register_stair_and_slab("marble","building_blocks:Marble", + {cracky=3}, + {"building_blocks_marble.png"}, + "Marble stair", + "Marble slab") +bb_stairs.register_stair_and_slab("hardwood","building_blocks:hardwood", + {snappy=1,choppy=1,flammable=1}, + {"building_blocks_hardwood.png"}, + "Hardwood stair", + "Hardwood slab") +bb_stairs.register_stair_and_slab("fakegrass","building_blocks:fakegrass", + {crumbly=3}, + {"default_grass.png"}, + "Grass stair", + "Grass slab") +bb_stairs.register_stair_and_slab("tar","building_blocks:Tar", + {crumbly=1}, + {"building_blocks_tar.png"}, + "Tar stair", + "Tar slab") +bb_stairs.register_stair_and_slab("grate","building_blocks:grate", + {crumbly=1}, + {"building_blocks_grate.png"}, + "Grate Stair", + "Grate Slab") +minetest.register_craft({ + type = "fuel", + recipe = "building_blocks:hardwood", + burntime = 28, +}) + +minetest.register_node("building_blocks:fakegrass", { + tile_images = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, + description = "Fake Grass", + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_craftitem("building_blocks:sticks", { + description = "Small bundle of sticks", + image = "building_blocks_sticks.png", + on_place_on_ground = minetest.craftitem_place_item, +}) + +--Tar +minetest.register_craft({ + output = 'building_blocks:knife 1', + recipe = { + {"building_blocks:Tar"}, + {"default:stick"}, + } +}) + +minetest.register_alias("tar", "building_blocks:Tar") +minetest.register_alias("fakegrass", "building_blocks:fakegrass") +minetest.register_alias("tar_knife", "building_blocks:knife") +minetest.register_alias("adobe", "building_blocks:Adobe") +minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing") +minetest.register_alias("hardwood", "building_blocks:hardwood") +minetest.register_alias("sticks", "building_blocks:sticks") +minetest.register_alias("building_blocks:faggot", "building_blocks:sticks") +minetest.register_alias("marble", "building_blocks:Marble") + +minetest.register_node("building_blocks:Tar", { + description = "Tar", + tiles = {"building_blocks_tar.png"}, + is_ground_content = true, + groups = {crumbly=1}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("building_blocks:Marble", { + description = "Marble", + tiles = {"building_blocks_marble.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_craft({ + type = "fuel", + recipe = "building_blocks:sticks", + burntime = 5, +}) +minetest.register_craft({ + type = "fuel", + recipe = "building_blocks:Tar", + burntime = 40, +}) +minetest.register_craft({ + type = "cooking", + output = "building_blocks:Tar", + recipe = "default:gravel", +}) +minetest.register_tool("building_blocks:knife", { + description = "Tar Knife", + inventory_image = "building_blocks_knife.png", + tool_capabilities = { + max_drop_level=0, + groupcaps={ + choppy={times={[2]=7.50, [3]=2.80}, maxwear=0.01, maxlevel=1}, + fleshy={times={[2]=5.50, [3]=2.80}, maxwear=0.01, maxlevel=1} + } + }, +}) + +minetest.add_to_creative_inventory('building_blocks:Tar 0') +minetest.add_to_creative_inventory('building_blocks:hardwood 0') +minetest.register_craft({ + output = "building_blocks:Marble 9", + recipe = { + {"default:clay", "building_blocks:Tar", "default:clay"}, + {"building_blocks:Tar","default:clay", "building_blocks:Tar"}, + {"default:clay", "building_blocks:Tar","default:clay"}, + } +}) + diff --git a/building_blocks/textures/building_blocks_Adobe.png b/building_blocks/textures/building_blocks_Adobe.png new file mode 100644 index 00000000..0992513a Binary files /dev/null and b/building_blocks/textures/building_blocks_Adobe.png differ diff --git a/building_blocks/textures/building_blocks_BWtile.png b/building_blocks/textures/building_blocks_BWtile.png new file mode 100644 index 00000000..6d4fb48b Binary files /dev/null and b/building_blocks/textures/building_blocks_BWtile.png differ diff --git a/building_blocks/textures/building_blocks_Roofing.png b/building_blocks/textures/building_blocks_Roofing.png new file mode 100644 index 00000000..c76846fd Binary files /dev/null and b/building_blocks/textures/building_blocks_Roofing.png differ diff --git a/building_blocks/textures/building_blocks_brobble.png b/building_blocks/textures/building_blocks_brobble.png new file mode 100644 index 00000000..533f3bfd Binary files /dev/null and b/building_blocks/textures/building_blocks_brobble.png differ diff --git a/building_blocks/textures/building_blocks_cast_iron.png b/building_blocks/textures/building_blocks_cast_iron.png new file mode 100644 index 00000000..54f2bacc Binary files /dev/null and b/building_blocks/textures/building_blocks_cast_iron.png differ diff --git a/building_blocks/textures/building_blocks_cast_iron_fireplace.png b/building_blocks/textures/building_blocks_cast_iron_fireplace.png new file mode 100644 index 00000000..218c1a3a Binary files /dev/null and b/building_blocks/textures/building_blocks_cast_iron_fireplace.png differ diff --git a/building_blocks/textures/building_blocks_grate.png b/building_blocks/textures/building_blocks_grate.png new file mode 100644 index 00000000..79beac8e Binary files /dev/null and b/building_blocks/textures/building_blocks_grate.png differ diff --git a/building_blocks/textures/building_blocks_grate2.png b/building_blocks/textures/building_blocks_grate2.png new file mode 100644 index 00000000..941ca9fc Binary files /dev/null and b/building_blocks/textures/building_blocks_grate2.png differ diff --git a/building_blocks/textures/building_blocks_hardwood.png b/building_blocks/textures/building_blocks_hardwood.png new file mode 100644 index 00000000..e3a6bd4d Binary files /dev/null and b/building_blocks/textures/building_blocks_hardwood.png differ diff --git a/building_blocks/textures/building_blocks_knife.png b/building_blocks/textures/building_blocks_knife.png new file mode 100644 index 00000000..ae99bdc6 Binary files /dev/null and b/building_blocks/textures/building_blocks_knife.png differ diff --git a/building_blocks/textures/building_blocks_marble.png b/building_blocks/textures/building_blocks_marble.png new file mode 100644 index 00000000..7814ce86 Binary files /dev/null and b/building_blocks/textures/building_blocks_marble.png differ diff --git a/building_blocks/textures/building_blocks_sglass.png b/building_blocks/textures/building_blocks_sglass.png new file mode 100644 index 00000000..6ecd512d Binary files /dev/null and b/building_blocks/textures/building_blocks_sglass.png differ diff --git a/building_blocks/textures/building_blocks_sticks.png b/building_blocks/textures/building_blocks_sticks.png new file mode 100644 index 00000000..6cac9709 Binary files /dev/null and b/building_blocks/textures/building_blocks_sticks.png differ diff --git a/building_blocks/textures/building_blocks_tar.png b/building_blocks/textures/building_blocks_tar.png new file mode 100644 index 00000000..d2a17d86 Binary files /dev/null and b/building_blocks/textures/building_blocks_tar.png differ diff --git a/building_blocks/textures/building_blocks_towel.png b/building_blocks/textures/building_blocks_towel.png new file mode 100644 index 00000000..f66aaba0 Binary files /dev/null and b/building_blocks/textures/building_blocks_towel.png differ diff --git a/building_blocks/textures/building_blocks_wglass.png b/building_blocks/textures/building_blocks_wglass.png new file mode 100644 index 00000000..64c505eb Binary files /dev/null and b/building_blocks/textures/building_blocks_wglass.png differ