commit 2d969cb9bffe7cf2f30baaa1e836ba60e903a45a Author: Vanessa Ezekowitz Date: Thu Jul 12 17:56:15 2012 -0400 first commit diff --git a/README b/README new file mode 100644 index 00000000..93258152 --- /dev/null +++ b/README @@ -0,0 +1,49 @@ +This is what I consider to be a fairly feature-filled home decor mod. +It supplies a bunch of stuff found in most homes, like flower pots, home +electronics, brass and wrought-iron tables, and lots more! + +All items can be accessed either by crafting various other items +together, or with the usual /give commands. To get a list of the actual +node names, just go into the homedecor/ folder and run the listnodes.sh +Bash script. Note that a few of the listed nodes are kinda useless by +themselves (like the various parts of the folding doors). + +All of the images used for the recipes below are included in the +crafting-guide/ folder. + +Most stuff can be made from materials found through a game world. Some +stuff can only be crafted by using materials from another mod (look for +the orange highlights). Currently, this mod can use materials from +moreores, mesecons, wool, and unifieddyes if present. You can still use +the usual /give commands to get the items that depend on these mods if +you don't use them installed. + +This mod is still a work-in-progress, but should be complete enough not +to irritate anyone. :-) Namely, dressers still need to be fleshed out, +many items can be used as fuel but the burn times need tuning, and I +need to tune the cook time and fuel usage on the four smelted items. + +This mod was put together using a recent git pull, and requires a +build/pull dated June 17, 2012 or later. Most stuff should work fine on +older builds as well, but a few nodes in this mod require Nodebox +support, a feature added to Minetest on that date. It will NOT work +with Minetest v0.3 (that version doesn't support mods). + +Much of the code (especially for the doors) plus the bucket were taken +from the files which come with Minetest and altered to suit. Many +thanks to Jeija for coming up with an elegant cylinder using nodeboxes; +see his 'irregular' mods). His code is used herein (you can guess where +:-) ). + +Dependencies: none (just the game's default stuff) + +Recommends: buckets, flowers, unifieddyes, junglegrass, moreores, +mesecons, wool + +License: GPL for all lua code. WTFPL for all of my textures and +everything else. + +The distribution archive also supplies a copy of Ironzorg's Flowers mod +and of my Unified Dyes mod, since this mod provides more stuff when +those two are present. You can remove these if you want - they're only +needed if you want to craft the various dyed/colored items. diff --git a/copyright.txt b/copyright.txt new file mode 100644 index 00000000..14613ffb --- /dev/null +++ b/copyright.txt @@ -0,0 +1,6 @@ +Most code and all textures by Vanessa Ezekowitz. + +Some code copied and modified from the game's default mods (especially +doors) and ironzorg's flowers mod. + +Licenses: For the lua code, GPL. For all images and everything else, WTFPL. diff --git a/crafting-guide/brass-ingot.png b/crafting-guide/brass-ingot.png new file mode 100644 index 00000000..2957befd Binary files /dev/null and b/crafting-guide/brass-ingot.png differ diff --git a/crafting-guide/drawer-large.png b/crafting-guide/drawer-large.png new file mode 100644 index 00000000..1720f34f Binary files /dev/null and b/crafting-guide/drawer-large.png differ diff --git a/crafting-guide/drawer-small.png b/crafting-guide/drawer-small.png new file mode 100644 index 00000000..84cb6556 Binary files /dev/null and b/crafting-guide/drawer-small.png differ diff --git a/crafting-guide/drop-ceiling-tile.png b/crafting-guide/drop-ceiling-tile.png new file mode 100644 index 00000000..4055261d Binary files /dev/null and b/crafting-guide/drop-ceiling-tile.png differ diff --git a/crafting-guide/fancy-exterior-door.png b/crafting-guide/fancy-exterior-door.png new file mode 100644 index 00000000..523f8d57 Binary files /dev/null and b/crafting-guide/fancy-exterior-door.png differ diff --git a/crafting-guide/fence-brass.png b/crafting-guide/fence-brass.png new file mode 100644 index 00000000..ff6b8864 Binary files /dev/null and b/crafting-guide/fence-brass.png differ diff --git a/crafting-guide/fence-wrought-iron.png b/crafting-guide/fence-wrought-iron.png new file mode 100644 index 00000000..6f6e98dc Binary files /dev/null and b/crafting-guide/fence-wrought-iron.png differ diff --git a/crafting-guide/flowerpot-black.png b/crafting-guide/flowerpot-black.png new file mode 100644 index 00000000..bab212e0 Binary files /dev/null and b/crafting-guide/flowerpot-black.png differ diff --git a/crafting-guide/flowerpot-terracotta.png b/crafting-guide/flowerpot-terracotta.png new file mode 100644 index 00000000..f800ea91 Binary files /dev/null and b/crafting-guide/flowerpot-terracotta.png differ diff --git a/crafting-guide/flowerpot_green.png b/crafting-guide/flowerpot_green.png new file mode 100644 index 00000000..748a2fb1 Binary files /dev/null and b/crafting-guide/flowerpot_green.png differ diff --git a/crafting-guide/folding-door-mahogany.png b/crafting-guide/folding-door-mahogany.png new file mode 100644 index 00000000..a7924bfd Binary files /dev/null and b/crafting-guide/folding-door-mahogany.png differ diff --git a/crafting-guide/folding-door-oak.png b/crafting-guide/folding-door-oak.png new file mode 100644 index 00000000..6022bae1 Binary files /dev/null and b/crafting-guide/folding-door-oak.png differ diff --git a/crafting-guide/glass-table-large.png b/crafting-guide/glass-table-large.png new file mode 100644 index 00000000..0ffd91a5 Binary files /dev/null and b/crafting-guide/glass-table-large.png differ diff --git a/crafting-guide/glass-table-small-round.png b/crafting-guide/glass-table-small-round.png new file mode 100644 index 00000000..28ca1fe6 Binary files /dev/null and b/crafting-guide/glass-table-small-round.png differ diff --git a/crafting-guide/glass-table-small-square.png b/crafting-guide/glass-table-small-square.png new file mode 100644 index 00000000..8790e994 Binary files /dev/null and b/crafting-guide/glass-table-small-square.png differ diff --git a/crafting-guide/nightstand-mahogany-one-drawer.png b/crafting-guide/nightstand-mahogany-one-drawer.png new file mode 100644 index 00000000..a4c71bae Binary files /dev/null and b/crafting-guide/nightstand-mahogany-one-drawer.png differ diff --git a/crafting-guide/nightstand-mahogany-two-drawers.png b/crafting-guide/nightstand-mahogany-two-drawers.png new file mode 100644 index 00000000..74d8d515 Binary files /dev/null and b/crafting-guide/nightstand-mahogany-two-drawers.png differ diff --git a/crafting-guide/nightstand-oak-one-drawer.png b/crafting-guide/nightstand-oak-one-drawer.png new file mode 100644 index 00000000..d7231152 Binary files /dev/null and b/crafting-guide/nightstand-oak-one-drawer.png differ diff --git a/crafting-guide/nightstand-oak-two-drawers.png b/crafting-guide/nightstand-oak-two-drawers.png new file mode 100644 index 00000000..1add90e2 Binary files /dev/null and b/crafting-guide/nightstand-oak-two-drawers.png differ diff --git a/crafting-guide/nightstand-one-drawer.png b/crafting-guide/nightstand-one-drawer.png new file mode 100644 index 00000000..3d9725fa Binary files /dev/null and b/crafting-guide/nightstand-one-drawer.png differ diff --git a/crafting-guide/nightstand-two-drawers.png b/crafting-guide/nightstand-two-drawers.png new file mode 100644 index 00000000..2b0a96e7 Binary files /dev/null and b/crafting-guide/nightstand-two-drawers.png differ diff --git a/crafting-guide/plastic-sheeting.png b/crafting-guide/plastic-sheeting.png new file mode 100644 index 00000000..c3f32b8f Binary files /dev/null and b/crafting-guide/plastic-sheeting.png differ diff --git a/crafting-guide/pole-brass.png b/crafting-guide/pole-brass.png new file mode 100644 index 00000000..bb0b69ff Binary files /dev/null and b/crafting-guide/pole-brass.png differ diff --git a/crafting-guide/pole-wrought-iron.png b/crafting-guide/pole-wrought-iron.png new file mode 100644 index 00000000..3a1b970f Binary files /dev/null and b/crafting-guide/pole-wrought-iron.png differ diff --git a/crafting-guide/projection-screen-material.png b/crafting-guide/projection-screen-material.png new file mode 100644 index 00000000..cdc7bccc Binary files /dev/null and b/crafting-guide/projection-screen-material.png differ diff --git a/crafting-guide/rug-large.png b/crafting-guide/rug-large.png new file mode 100644 index 00000000..6438d98e Binary files /dev/null and b/crafting-guide/rug-large.png differ diff --git a/crafting-guide/rug-small.png b/crafting-guide/rug-small.png new file mode 100644 index 00000000..51c0fd8d Binary files /dev/null and b/crafting-guide/rug-small.png differ diff --git a/crafting-guide/shingles-asphalt.png b/crafting-guide/shingles-asphalt.png new file mode 100644 index 00000000..4854efa1 Binary files /dev/null and b/crafting-guide/shingles-asphalt.png differ diff --git a/crafting-guide/shingles-terracotta.png b/crafting-guide/shingles-terracotta.png new file mode 100644 index 00000000..3ed83736 Binary files /dev/null and b/crafting-guide/shingles-terracotta.png differ diff --git a/crafting-guide/shingles-wood.png b/crafting-guide/shingles-wood.png new file mode 100644 index 00000000..aeb808e5 Binary files /dev/null and b/crafting-guide/shingles-wood.png differ diff --git a/crafting-guide/shutter-black.png b/crafting-guide/shutter-black.png new file mode 100644 index 00000000..12b6955a Binary files /dev/null and b/crafting-guide/shutter-black.png differ diff --git a/crafting-guide/shutter-dark-grey.png b/crafting-guide/shutter-dark-grey.png new file mode 100644 index 00000000..a58c06ee Binary files /dev/null and b/crafting-guide/shutter-dark-grey.png differ diff --git a/crafting-guide/shutter-green.png b/crafting-guide/shutter-green.png new file mode 100644 index 00000000..a3c70856 Binary files /dev/null and b/crafting-guide/shutter-green.png differ diff --git a/crafting-guide/shutter-grey.png b/crafting-guide/shutter-grey.png new file mode 100644 index 00000000..56912144 Binary files /dev/null and b/crafting-guide/shutter-grey.png differ diff --git a/crafting-guide/shutter-light-blue.png b/crafting-guide/shutter-light-blue.png new file mode 100644 index 00000000..361fd5a7 Binary files /dev/null and b/crafting-guide/shutter-light-blue.png differ diff --git a/crafting-guide/shutter-mahogany.png b/crafting-guide/shutter-mahogany.png new file mode 100644 index 00000000..8dad6711 Binary files /dev/null and b/crafting-guide/shutter-mahogany.png differ diff --git a/crafting-guide/shutter-oak.png b/crafting-guide/shutter-oak.png new file mode 100644 index 00000000..c37cd667 Binary files /dev/null and b/crafting-guide/shutter-oak.png differ diff --git a/crafting-guide/shutter-purple.png b/crafting-guide/shutter-purple.png new file mode 100644 index 00000000..331de9cb Binary files /dev/null and b/crafting-guide/shutter-purple.png differ diff --git a/crafting-guide/shutter-red.png b/crafting-guide/shutter-red.png new file mode 100644 index 00000000..c65c73fb Binary files /dev/null and b/crafting-guide/shutter-red.png differ diff --git a/crafting-guide/shutter-white.png b/crafting-guide/shutter-white.png new file mode 100644 index 00000000..14e9fdfc Binary files /dev/null and b/crafting-guide/shutter-white.png differ diff --git a/crafting-guide/shutter-yellow.png b/crafting-guide/shutter-yellow.png new file mode 100644 index 00000000..237dc9ce Binary files /dev/null and b/crafting-guide/shutter-yellow.png differ diff --git a/crafting-guide/skylight.png b/crafting-guide/skylight.png new file mode 100644 index 00000000..4efa730e Binary files /dev/null and b/crafting-guide/skylight.png differ diff --git a/crafting-guide/speaker-small.png b/crafting-guide/speaker-small.png new file mode 100644 index 00000000..25d72d53 Binary files /dev/null and b/crafting-guide/speaker-small.png differ diff --git a/crafting-guide/speaker.png b/crafting-guide/speaker.png new file mode 100644 index 00000000..1177946e Binary files /dev/null and b/crafting-guide/speaker.png differ diff --git a/crafting-guide/stereo.png b/crafting-guide/stereo.png new file mode 100644 index 00000000..b45ee354 Binary files /dev/null and b/crafting-guide/stereo.png differ diff --git a/crafting-guide/table-legs-brass.png b/crafting-guide/table-legs-brass.png new file mode 100644 index 00000000..55e86f98 Binary files /dev/null and b/crafting-guide/table-legs-brass.png differ diff --git a/crafting-guide/table-legs-wrought-iron.png b/crafting-guide/table-legs-wrought-iron.png new file mode 100644 index 00000000..63d085a8 Binary files /dev/null and b/crafting-guide/table-legs-wrought-iron.png differ diff --git a/crafting-guide/television.png b/crafting-guide/television.png new file mode 100644 index 00000000..0334728b Binary files /dev/null and b/crafting-guide/television.png differ diff --git a/crafting-guide/terracotta-tile.png b/crafting-guide/terracotta-tile.png new file mode 100644 index 00000000..3c776f57 Binary files /dev/null and b/crafting-guide/terracotta-tile.png differ diff --git a/crafting-guide/textured-ceiling-paint.png b/crafting-guide/textured-ceiling-paint.png new file mode 100644 index 00000000..d42f3b74 Binary files /dev/null and b/crafting-guide/textured-ceiling-paint.png differ diff --git a/crafting-guide/utility-table-legs.png b/crafting-guide/utility-table-legs.png new file mode 100644 index 00000000..3ada809b Binary files /dev/null and b/crafting-guide/utility-table-legs.png differ diff --git a/crafting-guide/wood-tabletop-large.png b/crafting-guide/wood-tabletop-large.png new file mode 100644 index 00000000..39fdfdbb Binary files /dev/null and b/crafting-guide/wood-tabletop-large.png differ diff --git a/crafting-guide/wood-tabletop-small-round.png b/crafting-guide/wood-tabletop-small-round.png new file mode 100644 index 00000000..1f7b748a Binary files /dev/null and b/crafting-guide/wood-tabletop-small-round.png differ diff --git a/crafting-guide/wood-tabletop-small-square.png b/crafting-guide/wood-tabletop-small-square.png new file mode 100644 index 00000000..6a497d2b Binary files /dev/null and b/crafting-guide/wood-tabletop-small-square.png differ diff --git a/crafts.lua b/crafts.lua new file mode 100644 index 00000000..16b03195 --- /dev/null +++ b/crafts.lua @@ -0,0 +1,766 @@ +-- Crafting for homedecor mod (includes folding) by Vanessa Ezekowitz +-- 2012-06-12 +-- +-- Mostly my own code; overall template borrowed from game default +-- +-- License: GPL +-- + +-- ==================================== +-- Smelting recipes and resultant items + +minetest.register_craftitem("homedecor:roof_tile_terracotta", { + description = "Terracotta Roof Tile", + inventory_image = "homedecor_roof_tile_terracotta.png", +}) + +minetest.register_craft({ + type = "cooking", + output = "homedecor:roof_tile_terracotta 4", + recipe = "default:dirt", +}) + +minetest.register_craft( { + output = 'homedecor:shingles_terracotta', + recipe = { + { 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta'}, + { 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta'}, + }, +}) + +minetest.register_craft( { + output = 'homedecor:flower_pot_terracotta', + recipe = { + { 'homedecor:roof_tile_terracotta', 'default:dirt', 'homedecor:roof_tile_terracotta' }, + { 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta' }, + }, +}) + +-- + +minetest.register_craftitem("homedecor:plastic_sheeting", { + description = "Plastic sheet", + inventory_image = "homedecor_plastic_sheeting.png", +}) + +minetest.register_craft({ + type = "cooking", + output = "homedecor:plastic_sheeting", + recipe = "default:junglegrass 2", +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:plastic_sheeting', + burntime = 30, +}) + +minetest.register_craft( { + output = 'homedecor:flower_pot_green', + recipe = { + { 'unifieddyes:green', '', '' }, + { 'homedecor:plastic_sheeting', 'default:dirt', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +minetest.register_craft( { + output = 'homedecor:flower_pot_black', + recipe = { + { 'unifieddyes:black', 'unifieddyes:black', 'unifieddyes:black' }, + { 'homedecor:plastic_sheeting', 'default:dirt', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:projection_screen 3', + recipe = { + { '', 'default:glass', '' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:projection_screen', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:ceiling_paint 10', + recipe = { + 'unifieddyes:white_paint', + 'default:stone', + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft( { + output = 'homedecor:ceiling_tile 10', + recipe = { + { '', 'unifieddyes:white_paint', '' }, + { 'default:steel_ingot', 'default:stone', 'default:steel_ingot' }, + + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + + +-- ======================================================= +-- Items/recipes not requiring smelting of anything new + +minetest.register_craft( { + output = 'homedecor:glass_table_small_round 15', + recipe = { + { '', 'default:glass', '' }, + { 'default:glass', 'default:glass', 'default:glass' }, + { '', 'default:glass', '' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:glass_table_small_square 2', + recipe = { + { 'homedecor:glass_table_small_round', 'homedecor:glass_table_small_round', 'homedecor:glass_table_small_round' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:glass_table_large 2', + recipe = { + { 'homedecor:glass_table_small_square', 'homedecor:glass_table_small_square' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:shingles_asphalt 6', + recipe = { + { 'default:dirt', 'unifieddyes:black', 'default:dirt' }, + { 'default:sand', 'unifieddyes:black', 'default:sand' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:shingles_wood 12', + recipe = { + { 'default:wood', 'default:wood'}, + { 'default:wood', 'default:wood'}, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shingles_wood', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:skylight 9', + recipe = { + { 'default:glass', 'default:glass' }, + { 'default:glass', 'default:glass' }, + }, +}) + +-- + +minetest.register_craftitem("homedecor:utility_table_legs", { + description = "Legs for Small Utility table", + inventory_image = "homedecor_utility_table_legs.png", +}) + +minetest.register_craft( { + output = 'homedecor:utility_table_legs', + recipe = { + { 'default:stick', 'default:stick', 'default:stick' }, + { 'default:stick', '', 'default:stick' }, + { 'default:stick', '', 'default:stick' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:utility_table_legs', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:wood_table_small_round 15', + recipe = { + { '', 'default:wood', '' }, + { 'default:wood', 'default:wood', 'default:wood' }, + { '', 'default:wood', '' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:wood_table_small_round', + burntime = 30, +}) + +minetest.register_craft( { + output = 'homedecor:wood_table_small_square 2', + recipe = { + { 'homedecor:wood_table_small_round', 'homedecor:wood_table_small_round', 'homedecor:wood_table_small_round' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:wood_table_small_square', + burntime = 30, +}) + +-- + +-- + +minetest.register_craft( { + output = 'homedecor:wood_table_large 2', + recipe = { + { 'homedecor:wood_table_small_square', 'homedecor:wood_table_small_square' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:wood_table_large', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:shutter_oak 2', + recipe = { + { 'default:stick', 'default:stick' }, + { 'default:stick', 'default:stick' }, + { 'default:stick', 'default:stick' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_oak', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_black', + recipe = { + 'unifieddyes:black', + 'unifieddyes:black', + 'homedecor:shutter_oak' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_black', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_dark_grey', + recipe = { + 'unifieddyes:black', + 'homedecor:shutter_oak' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_dark_grey', + burntime = 30, +}) + + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_grey', + recipe = { + 'unifieddyes:black', + 'unifieddyes:white_paint', + 'homedecor:shutter_oak' + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_grey', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_forest_green', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:green', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_forest_green', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_white', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:white_paint', + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_white', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:table_legs_wrought_iron 2', + recipe = { + { '', 'default:iron_lump', '' }, + { '', 'default:iron_lump', '' }, + { 'default:iron_lump', 'default:iron_lump', 'default:iron_lump' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:pole_wrought_iron 2', + recipe = { + { 'default:iron_lump', }, + { 'default:iron_lump', }, + { 'default:iron_lump', }, + }, +}) + +minetest.register_craft( { + output = 'homedecor:fence_wrought_iron 4', + recipe = { + { 'default:iron_lump','default:iron_lump','default:iron_lump' }, + { 'default:iron_lump','default:iron_lump','default:iron_lump' }, + }, +}) + +-- + +minetest.register_craftitem("homedecor:drawer_small", { + description = "Small Wooden Drawer", + inventory_image = "homedecor_drawer_small.png", +}) + + +minetest.register_craft( { + output = 'homedecor:drawer_small', + recipe = { + { 'default:wood', 'default:steel_ingot', 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:drawer_small', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:nightstand_oak_one_drawer', + recipe = { + { 'homedecor:drawer_small' }, + { 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_oak_one_drawer', + burntime = 30, +}) + +minetest.register_craft( { + output = 'homedecor:nightstand_oak_two_drawers', + recipe = { + { 'homedecor:drawer_small' }, + { 'homedecor:drawer_small' }, + { 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_oak_two_drawers', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:nightstand_mahogany_one_drawer', + recipe = { + 'homedecor:nightstand_oak_one_drawer', + 'unifieddyes:black', + 'unifieddyes:red', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_mahogany_one_drawer', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:nightstand_mahogany_two_drawers', + recipe = { + 'homedecor:nightstand_oak_two_drawers', + 'unifieddyes:black', + 'unifieddyes:red', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_mahogany_two_drawers', + burntime = 30, +}) + + +-- + +minetest.register_craftitem("homedecor:drawer_large", { + description = "Large Wooden Drawer", + inventory_image = "homedecor_drawer_large.png", +}) + + +minetest.register_craft( { + output = 'homedecor:drawer_large', + recipe = { + { 'default:wood', 'default:steel_ingot', 'default:wood' }, + { 'default:wood', 'default:wood', 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:drawer_large', + burntime = 30, +}) + + +-- + +minetest.register_craftitem("homedecor:dresser_oak", { + description = "Three-Drawer Oak Dresser", + inventory_image = "homedecor_dresser_oak_inv.png", +}) + + +minetest.register_craft( { + output = 'homedecor:dresser_oak', + recipe = { + { 'default:wood', 'homedecor:drawer_large', 'default:wood' }, + { 'default:wood', 'homedecor:drawer_large', 'default:wood' }, + { 'default:wood', 'homedecor:drawer_large', 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:dresser_oak', + burntime = 30, +}) + +-- + +minetest.register_craftitem("homedecor:dresser_mahogany", { + description = "Three-Drawer Mahogany Dresser", + inventory_image = "homedecor_dresser_mahogany_inv.png", +}) + + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:dresser_mahogany', + recipe = { + 'homedecor:dresser_oak', + 'unifieddyes:red', + 'unifieddyes:red', + 'unifieddyes:black', + 'unifieddyes:black' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:dresser_oak', + burntime = 30, +}) + +-- ========================================================== +-- Recipes that require materials from Calinou's Moreores mod + +minetest.register_craftitem("homedecor:brass_ingot", { + description = "Brass Ingot", + inventory_image = "homedecor_brass_ingot.png", +}) + +if ( minetest.get_modpath("moreores") ) ~= nil then + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:brass_ingot 2', + recipe = { + 'moreores:silver_ingot', + 'moreores:copper_ingot', + }, + }) + + + minetest.register_craft( { + output = 'homedecor:table_legs_brass 2', + recipe = { + { '', 'homedecor:brass_ingot', '' }, + { '', 'homedecor:brass_ingot', '' }, + { 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' } + }, + }) + + minetest.register_craft( { + output = 'homedecor:pole_brass 2', + recipe = { + { '', 'homedecor:brass_ingot', '' }, + { '', 'homedecor:brass_ingot', '' }, + { '', 'homedecor:brass_ingot', '' } + }, + }) + + minetest.register_craft( { + output = 'homedecor:fence_brass 4', + recipe = { + { 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' }, + { 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' }, + }, + }) + +end + + +-- ======================================================== +-- Recipes that require materials from Jeija's Mesecons mod + +if ( minetest.get_modpath("mesecons") ) ~= nil then + + minetest.register_craft( { + output = 'homedecor:television', + recipe = { + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'default:glass', 'homedecor:plastic_sheeting' }, + { 'mesecons_materials:ic', 'mesecons_materials:ic', 'mesecons_materials:ic' }, + }, + }) + + minetest.register_craft( { + output = 'homedecor:stereo', + recipe = { + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'mesecons_materials:ic', 'homedecor:plastic_sheeting' }, + { 'default:steel_ingot', 'mesecons_materials:ic', 'default:steel_ingot' }, + }, + }) + +end + + +-- ====================================================== +-- Recipes that require materials from Jordach's Wool mod + +if ( minetest.get_modpath("wool") ) ~= nil then + + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:rug_small 8', + recipe = { + 'wool:red', + 'wool:yellow', + 'wool:blue', + 'wool:black' + }, + }) + + minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:rug_small', + burntime = 30, + }) + + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:rug_large 2', + recipe = { + 'homedecor:rug_small', + 'homedecor:rug_small', + }, + }) + + minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:rug_large', + burntime = 30, + }) + +end + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_mahogany', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:red', + 'unifieddyes:black' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_mahogany', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_purple', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:violet', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_purple', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_red', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:red', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_red', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_yellow', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:yellow', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_yellow', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:shutter_light_blue', + recipe = { + 'homedecor:shutter_oak', + 'unifieddyes:white_paint', + 'unifieddyes:blue', + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shutter_light_blue', + burntime = 30, +}) + +-- ================================================================ +-- Speakers require both Jordache's wool and Jeija's mesecons mods. + +if ( minetest.get_modpath("wool") ) ~= nil then + if ( minetest.get_modpath("mesecons") ) ~= nil then + + minetest.register_craft( { + output = 'homedecor:speaker', + recipe = { + { 'default:wood', 'wool:black', 'default:wood' }, + { 'default:wood', 'mesecons:noteblock', 'default:wood' }, + { 'default:wood', 'wool:black', 'default:wood' }, + }, + }) + + minetest.register_craft( { + output = 'homedecor:speaker_small', + recipe = { + { 'default:wood', 'wool:black', 'default:wood' }, + { 'default:wood', 'mesecons:noteblock', 'default:wood' }, + }, + }) + end +end + + + diff --git a/crafts.lua~ b/crafts.lua~ new file mode 100644 index 00000000..107c080e --- /dev/null +++ b/crafts.lua~ @@ -0,0 +1,766 @@ +-- Crafting for homedecor mod (includes folding) by Vanessa Ezekowitz +-- 2012-06-12 +-- +-- Mostly my own code; overall template borrowed from game default +-- +-- License: GPL +-- + +-- ==================================== +-- Smelting recipes and resultant items + +minetest.register_craftitem("homedecor:roof_tile_terracotta", { + description = "Terracotta Roof Tile", + inventory_image = "homedecor_roof_tile_terracotta.png", +}) + +minetest.register_craft({ + type = "cooking", + output = "homedecor:roof_tile_terracotta 4", + recipe = "default:dirt", +}) + +minetest.register_craft( { + output = 'homedecor:shingles_terracotta', + recipe = { + { 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta'}, + { 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta'}, + }, +}) + +minetest.register_craft( { + output = 'homedecor:flower_pot_terracotta', + recipe = { + { 'homedecor:roof_tile_terracotta', 'default:dirt', 'homedecor:roof_tile_terracotta' }, + { 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta', 'homedecor:roof_tile_terracotta' }, + }, +}) + +-- + +minetest.register_craftitem("homedecor:plastic_sheeting", { + description = "Plastic sheet", + inventory_image = "homedecor_plastic_sheeting.png", +}) + +minetest.register_craft({ + type = "cooking", + output = "homedecor:plastic_sheeting", + recipe = "default:junglegrass 2", +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:plastic_sheeting', + burntime = 30, +}) + +minetest.register_craft( { + output = 'homedecor:flower_pot_green', + recipe = { + { 'unifieddyes:green', '', '' }, + { 'homedecor:plastic_sheeting', 'default:dirt', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +minetest.register_craft( { + output = 'homedecor:flower_pot_black', + recipe = { + { 'unifieddyes:black', 'unifieddyes:black', 'unifieddyes:black' }, + { 'homedecor:plastic_sheeting', 'default:dirt', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:projection_screen 3', + recipe = { + { '', 'default:glass', '' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:projection_screen', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:ceiling_paint 10', + recipe = { + 'unifieddyes:white_paint', + 'default:stone', + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft( { + output = 'homedecor:ceiling_tile 10', + recipe = { + { '', 'unifieddyes:white_paint', '' }, + { 'default:steel_ingot', 'default:stone', 'default:steel_ingot' }, + + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + + +-- ======================================================= +-- Items/recipes not requiring smelting of anything new + +minetest.register_craft( { + output = 'homedecor:glass_table_small_round 15', + recipe = { + { '', 'default:glass', '' }, + { 'default:glass', 'default:glass', 'default:glass' }, + { '', 'default:glass', '' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:glass_table_small_square 2', + recipe = { + { 'homedecor:glass_table_small_round', 'homedecor:glass_table_small_round', 'homedecor:glass_table_small_round' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:glass_table_large 2', + recipe = { + { 'homedecor:glass_table_small_square', 'homedecor:glass_table_small_square' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:shingles_asphalt 6', + recipe = { + { 'default:dirt', 'unifieddyes:black', 'default:dirt' }, + { 'default:sand', 'unifieddyes:black', 'default:sand' }, + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:shingles_wood 12', + recipe = { + { 'default:wood', 'default:wood'}, + { 'default:wood', 'default:wood'}, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:shingles_wood', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:skylight 9', + recipe = { + { 'default:glass', 'default:glass' }, + { 'default:glass', 'default:glass' }, + }, +}) + +-- + +minetest.register_craftitem("homedecor:utility_table_legs", { + description = "Legs for Small Utility table", + inventory_image = "homedecor_utility_table_legs.png", +}) + +minetest.register_craft( { + output = 'homedecor:utility_table_legs', + recipe = { + { 'default:stick', 'default:stick', 'default:stick' }, + { 'default:stick', '', 'default:stick' }, + { 'default:stick', '', 'default:stick' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:utility_table_legs', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:wood_table_small_round 15', + recipe = { + { '', 'default:wood', '' }, + { 'default:wood', 'default:wood', 'default:wood' }, + { '', 'default:wood', '' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:wood_table_small_round', + burntime = 30, +}) + +minetest.register_craft( { + output = 'homedecor:wood_table_small_square 2', + recipe = { + { 'homedecor:wood_table_small_round', 'homedecor:wood_table_small_round', 'homedecor:wood_table_small_round' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:wood_table_small_square', + burntime = 30, +}) + +-- + +-- + +minetest.register_craft( { + output = 'homedecor:wood_table_large 2', + recipe = { + { 'homedecor:wood_table_small_square', 'homedecor:wood_table_small_square' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:wood_table_large', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:window_shutter_oak 2', + recipe = { + { 'default:stick', 'default:stick' }, + { 'default:stick', 'default:stick' }, + { 'default:stick', 'default:stick' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_oak', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_black', + recipe = { + 'unifieddyes:black', + 'unifieddyes:black', + 'homedecor:window_shutter_oak' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_black', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_dark_grey', + recipe = { + 'unifieddyes:black', + 'homedecor:window_shutter_oak' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_dark_grey', + burntime = 30, +}) + + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_grey', + recipe = { + 'unifieddyes:black', + 'unifieddyes:white_paint', + 'homedecor:window_shutter_oak' + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_grey', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_forest_green', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:green', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_forest_green', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_white', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:white_paint', + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_white', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:table_legs_wrought_iron 2', + recipe = { + { '', 'default:iron_lump', '' }, + { '', 'default:iron_lump', '' }, + { 'default:iron_lump', 'default:iron_lump', 'default:iron_lump' }, + }, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:pole_wrought_iron 2', + recipe = { + { 'default:iron_lump', }, + { 'default:iron_lump', }, + { 'default:iron_lump', }, + }, +}) + +minetest.register_craft( { + output = 'homedecor:fence_wrought_iron 4', + recipe = { + { 'default:iron_lump','default:iron_lump','default:iron_lump' }, + { 'default:iron_lump','default:iron_lump','default:iron_lump' }, + }, +}) + +-- + +minetest.register_craftitem("homedecor:drawer_small", { + description = "Small Wooden Drawer", + inventory_image = "homedecor_drawer_small.png", +}) + + +minetest.register_craft( { + output = 'homedecor:drawer_small', + recipe = { + { 'default:wood', 'default:steel_ingot', 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:drawer_small', + burntime = 30, +}) + +-- + +minetest.register_craft( { + output = 'homedecor:nightstand_oak_one_drawer', + recipe = { + { 'homedecor:drawer_small' }, + { 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_oak_one_drawer', + burntime = 30, +}) + +minetest.register_craft( { + output = 'homedecor:nightstand_oak_two_drawers', + recipe = { + { 'homedecor:drawer_small' }, + { 'homedecor:drawer_small' }, + { 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_oak_two_drawers', + burntime = 30, +}) + +-- + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:nightstand_mahogany_one_drawer', + recipe = { + 'homedecor:nightstand_oak_one_drawer', + 'unifieddyes:black', + 'unifieddyes:red', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_mahogany_one_drawer', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:nightstand_mahogany_two_drawers', + recipe = { + 'homedecor:nightstand_oak_two_drawers', + 'unifieddyes:black', + 'unifieddyes:red', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:nightstand_mahogany_two_drawers', + burntime = 30, +}) + + +-- + +minetest.register_craftitem("homedecor:drawer_large", { + description = "Large Wooden Drawer", + inventory_image = "homedecor_drawer_large.png", +}) + + +minetest.register_craft( { + output = 'homedecor:drawer_large', + recipe = { + { 'default:wood', 'default:steel_ingot', 'default:wood' }, + { 'default:wood', 'default:wood', 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:drawer_large', + burntime = 30, +}) + + +-- + +minetest.register_craftitem("homedecor:dresser_oak", { + description = "Three-Drawer Oak Dresser", + inventory_image = "homedecor_dresser_oak_inv.png", +}) + + +minetest.register_craft( { + output = 'homedecor:dresser_oak', + recipe = { + { 'default:wood', 'homedecor:drawer_large', 'default:wood' }, + { 'default:wood', 'homedecor:drawer_large', 'default:wood' }, + { 'default:wood', 'homedecor:drawer_large', 'default:wood' }, + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:dresser_oak', + burntime = 30, +}) + +-- + +minetest.register_craftitem("homedecor:dresser_mahogany", { + description = "Three-Drawer Mahogany Dresser", + inventory_image = "homedecor_dresser_mahogany_inv.png", +}) + + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:dresser_mahogany', + recipe = { + 'homedecor:dresser_oak', + 'unifieddyes:red', + 'unifieddyes:red', + 'unifieddyes:black', + 'unifieddyes:black' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:dresser_oak', + burntime = 30, +}) + +-- ========================================================== +-- Recipes that require materials from Calinou's Moreores mod + +minetest.register_craftitem("homedecor:brass_ingot", { + description = "Brass Ingot", + inventory_image = "homedecor_brass_ingot.png", +}) + +if ( minetest.get_modpath("moreores") ) ~= nil then + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:brass_ingot 2', + recipe = { + 'moreores:silver_ingot', + 'moreores:copper_ingot', + }, + }) + + + minetest.register_craft( { + output = 'homedecor:table_legs_brass 2', + recipe = { + { '', 'homedecor:brass_ingot', '' }, + { '', 'homedecor:brass_ingot', '' }, + { 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' } + }, + }) + + minetest.register_craft( { + output = 'homedecor:pole_brass 2', + recipe = { + { '', 'homedecor:brass_ingot', '' }, + { '', 'homedecor:brass_ingot', '' }, + { '', 'homedecor:brass_ingot', '' } + }, + }) + + minetest.register_craft( { + output = 'homedecor:fence_brass 4', + recipe = { + { 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' }, + { 'homedecor:brass_ingot', 'homedecor:brass_ingot', 'homedecor:brass_ingot' }, + }, + }) + +end + + +-- ======================================================== +-- Recipes that require materials from Jeija's Mesecons mod + +if ( minetest.get_modpath("mesecons") ) ~= nil then + + minetest.register_craft( { + output = 'homedecor:television', + recipe = { + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'default:glass', 'homedecor:plastic_sheeting' }, + { 'mesecons_materials:ic', 'mesecons_materials:ic', 'mesecons_materials:ic' }, + }, + }) + + minetest.register_craft( { + output = 'homedecor:stereo', + recipe = { + { 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting' }, + { 'homedecor:plastic_sheeting', 'mesecons_materials:ic', 'homedecor:plastic_sheeting' }, + { 'default:steel_ingot', 'mesecons_materials:ic', 'default:steel_ingot' }, + }, + }) + +end + + +-- ====================================================== +-- Recipes that require materials from Jordach's Wool mod + +if ( minetest.get_modpath("wool") ) ~= nil then + + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:rug_small 8', + recipe = { + 'wool:red', + 'wool:yellow', + 'wool:blue', + 'wool:black' + }, + }) + + minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:rug_small', + burntime = 30, + }) + + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:rug_large 2', + recipe = { + 'homedecor:rug_small', + 'homedecor:rug_small', + }, + }) + + minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:rug_large', + burntime = 30, + }) + +end + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_mahogany', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:red', + 'unifieddyes:black' + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_mahogany', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_purple', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:violet', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_purple', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_red', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:red', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_red', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_yellow', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:yellow', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_yellow', + burntime = 30, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:window_shutter_light_blue', + recipe = { + 'homedecor:window_shutter_oak', + 'unifieddyes:white_paint', + 'unifieddyes:blue', + }, + replacements = { {'unifieddyes:white_paint', 'bucket:bucket_empty'}, }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:window_shutter_light_blue', + burntime = 30, +}) + +-- ================================================================ +-- Speakers require both Jordache's wool and Jeija's mesecons mods. + +if ( minetest.get_modpath("wool") ) ~= nil then + if ( minetest.get_modpath("mesecons") ) ~= nil then + + minetest.register_craft( { + output = 'homedecor:speaker', + recipe = { + { 'default:wood', 'wool:black', 'default:wood' }, + { 'default:wood', 'mesecons:noteblock', 'default:wood' }, + { 'default:wood', 'wool:black', 'default:wood' }, + }, + }) + + minetest.register_craft( { + output = 'homedecor:speaker_small', + recipe = { + { 'default:wood', 'wool:black', 'default:wood' }, + { 'default:wood', 'mesecons:noteblock', 'default:wood' }, + }, + }) + end +end + + + diff --git a/depends.txt b/depends.txt new file mode 100644 index 00000000..4ad96d51 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default diff --git a/exterior_door_fancy.lua b/exterior_door_fancy.lua new file mode 100644 index 00000000..b3fa47a0 --- /dev/null +++ b/exterior_door_fancy.lua @@ -0,0 +1,427 @@ +-- Fancy Exterior doors - part of home decor mod by VanessaE +-- 2012-06-10 +-- +-- Copied and modified from Minetest's default doors mod. +-- +-- Textures derived from... +-- http://commons.wikimedia.org/wiki/File:Front_door_of_Morey_Mansion.jpg +-- ...plus the standard Minetest logo. +-- +-- License: GPL +-- + +local DEBUG = 1 + +local WALLMX = 3 +local WALLMZ = 5 +local WALLPX = 2 +local WALLPZ = 4 + +local WALLMXr = 2 +local WALLMZr = 4 +local WALLPXr = 3 +local WALLPZr = 5 + +local dbg = function(s) + if DEBUG == 1 then + print('[ExteriorDoorFancy] ' .. s) + end +end + +local round = function( n ) + if n >= 0 then + return math.floor( n + 0.5 ) + else + return math.ceil( n - 0.5 ) + end +end + +-- ========================== +-- Regular left-opening doors + +-- Actual nodes that you place + +minetest.register_node('homedecor:exterior_door_fancy', { + description = "Fancy Wood/Glass Exterior Door (Left Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy.png' }, + inventory_image = 'homedecor_exterior_door_fancy.png', + wield_image = 'homedecor_exterior_door_fancy.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + +-- Fancy Exterior door functions + +local on_exterior_door_fancy_placed = function( pos, node, placer ) + if node.name ~= 'homedecor:exterior_door_fancy' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:exterior_door_fancy_b_c', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:exterior_door_fancy_a_c', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:exterior_door_fancy' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_exterior_door_fancy_punched = function( pos, node, puncher ) + if string.find( node.name, 'homedecor:exterior_door_fancy' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c', -2 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZ + elseif node.param2 == WALLMZ then + newparam = WALLMX + elseif node.param2 == WALLMX then + newparam = WALLPZ + elseif node.param2 == WALLPZ then + newparam = WALLPX + end + elseif string.find( node.name, '_o', -2 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPX + elseif node.param2 == WALLMX then + newparam = WALLMZ + elseif node.param2 == WALLPZ then + newparam = WALLMX + elseif node.param2 == WALLPX then + newparam = WALLPZ + end + end + + if ( node.name == 'homedecor:exterior_door_fancy_a_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_a_o', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:exterior_door_fancy_b_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:exterior_door_fancy_b_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_b_o', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:exterior_door_fancy_a_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:exterior_door_fancy_a_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:exterior_door_fancy_b_c', param2 = newparam } ) + + elseif ( node.name == 'homedecor:exterior_door_fancy_b_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:exterior_door_fancy_a_c', param2 = newparam } ) + + end +end + +local on_exterior_door_fancy_digged = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:exterior_door_fancy_a_c' ) or ( node.name == 'homedecor:exterior_door_fancy_a_o' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:exterior_door_fancy_b_c' ) or ( node.name == 'homedecor:exterior_door_fancy_b_o' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_exterior_door_fancy_placed ) +minetest.register_on_punchnode( on_exterior_door_fancy_punched ) +minetest.register_on_dignode( on_exterior_door_fancy_digged ) + + +-- Nodes used to build up Fancy Exterior doors + +minetest.register_node('homedecor:exterior_door_fancy_a_c', { + description = "Fancy Wood/Glass Exterior Door (top, closed)", + tile_images = { 'homedecor_exterior_door_fancy_a.png' }, + inventory_image = 'homedecor_exterior_door_fancy_a.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:exterior_door_fancy', +}) + +minetest.register_node('homedecor:exterior_door_fancy_b_c', { + description = "Fancy Wood/Glass Exterior Door (bottom, closed)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_b.png' }, + inventory_image = 'homedecor_exterior_door_fancy_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:exterior_door_fancy', +}) + +minetest.register_node('homedecor:exterior_door_fancy_a_o', { + description = "Fancy Wood/Glass Exterior Door (top, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_a_r.png' }, + inventory_image = 'homedecor_exterior_door_fancy_a_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:exterior_door_fancy', +}) + +minetest.register_node('homedecor:exterior_door_fancy_b_o', { + description = "Fancy Wood/Glass Exterior Door (bottom, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_b_r.png' }, + inventory_image = 'homedecor_exterior_door_fancy_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:exterior_door_fancy', +}) + + +-- ======================================== +-- Mirrored version for right-opening doors +-- ======================================== + +-- Actual nodes that you place + +minetest.register_node('homedecor:exterior_door_fancy_right', { + description = "Fancy Wood/Glass Exterior Door (Right Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_right.png' }, + inventory_image = 'homedecor_exterior_door_fancy_right.png', + wield_image = 'homedecor_exterior_door_fancy_right.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + + +-- Fancy Exterior door functions + +local on_exterior_door_fancy_placed_right = function( pos, node, placer ) + if node.name ~= 'homedecor:exterior_door_fancy_right' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:exterior_door_fancy_b_c_right', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:exterior_door_fancy_a_c_right', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:exterior_door_fancy_right' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_exterior_door_fancy_punched_right = function( pos, node, puncher ) + + if string.find( node.name, 'homedecor:exterior_door_fancy' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c_right', -8 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZr + elseif node.param2 == WALLMZ then + newparam = WALLMXr + elseif node.param2 == WALLMX then + newparam = WALLPZr + elseif node.param2 == WALLPZ then + newparam = WALLPXr + end + elseif string.find( node.name, '_o_right', -8 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPXr + elseif node.param2 == WALLMX then + newparam = WALLMZr + elseif node.param2 == WALLPZ then + newparam = WALLMXr + elseif node.param2 == WALLPX then + newparam = WALLPZr + end + end + + if ( node.name == 'homedecor:exterior_door_fancy_a_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_a_o_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:exterior_door_fancy_b_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:exterior_door_fancy_b_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_b_o_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:exterior_door_fancy_a_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:exterior_door_fancy_a_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:exterior_door_fancy_b_c_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:exterior_door_fancy_b_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:exterior_door_fancy_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:exterior_door_fancy_a_c_right', param2 = newparam } ) + + end +end + +local on_exterior_door_fancy_digged_right = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:exterior_door_fancy_a_c_right' ) or ( node.name == 'homedecor:exterior_door_fancy_a_o_right' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:exterior_door_fancy_b_c_right' ) or ( node.name == 'homedecor:exterior_door_fancy_b_o_right' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_exterior_door_fancy_placed_right ) +minetest.register_on_punchnode( on_exterior_door_fancy_punched_right ) +minetest.register_on_dignode( on_exterior_door_fancy_digged_right ) + + +-- Nodes used to build up Fancy Exterior doors + +minetest.register_node('homedecor:exterior_door_fancy_a_c_right', { + description = "Fancy Wood/Glass Exterior Door (top, closed, right)", + tile_images = { 'homedecor_exterior_door_fancy_a_r.png' }, + inventory_image = 'homedecor_exterior_door_fancy_a_r.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:exterior_door_fancy_right', +}) + +minetest.register_node('homedecor:exterior_door_fancy_b_c_right', { + description = "Fancy Wood/Glass Exterior Door (bottom, closed, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_b_r.png' }, + inventory_image = 'homedecor_exterior_door_fancy_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:exterior_door_fancy_right', +}) + +minetest.register_node('homedecor:exterior_door_fancy_a_o_right', { + description = "Fancy Wood/Glass Exterior Door (top, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_a.png' }, + inventory_image = 'homedecor_exterior_door_fancy_a.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:exterior_door_fancy_right', +}) + +minetest.register_node('homedecor:exterior_door_fancy_b_o_right', { + description = "Fancy Wood/Glass Exterior Door (bottom, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_exterior_door_fancy_b.png' }, + inventory_image = 'homedecor_exterior_door_fancy_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:exterior_door_fancy_right', +}) + + +-- ================ +-- crafting recipes + +minetest.register_craft( { + output = 'homedecor:exterior_door_fancy', + recipe = { + { 'default:wood', 'default:glass' }, + { 'default:wood', 'default:wood' }, + { 'default:wood', 'default:wood' }, + }, +}) + + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:exterior_door_fancy_right', + recipe = { + 'homedecor:exterior_door_fancy', + }, +}) + +minetest.register_craft({ + type = 'shapeless', + output = 'homedecor:exterior_door_fancy', + recipe = { + 'homedecor:exterior_door_fancy_right', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:exterior_door_fancy', + burntime = 30, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:exterior_door_fancy_right', + burntime = 30, +}) diff --git a/exterior_door_fancy.lua~ b/exterior_door_fancy.lua~ new file mode 100644 index 00000000..3da86c4b --- /dev/null +++ b/exterior_door_fancy.lua~ @@ -0,0 +1,442 @@ +-- Mahogany "folding" doors - part of home decor mod by VanessaE +-- 2012-06-10 +-- +-- Copied and modified from Minetest's default doors mod. +-- +-- License: GPL +-- + +local DEBUG = 1 + +local WALLMX = 3 +local WALLMZ = 5 +local WALLPX = 2 +local WALLPZ = 4 + +local WALLMXr = 2 +local WALLMZr = 4 +local WALLPXr = 3 +local WALLPZr = 5 + +local dbg = function(s) + if DEBUG == 1 then + print('[FOLDINGDOORS] ' .. s) + end +end + +local round = function( n ) + if n >= 0 then + return math.floor( n + 0.5 ) + else + return math.ceil( n - 0.5 ) + end +end + +-- ========================== +-- Regular left-opening doors + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_mahogany', { + description = "Mahogany Folding Door (Left Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany.png' }, + inventory_image = 'homedecor_folding_door_mahogany.png', + wield_image = 'homedecor_folding_door_mahogany.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + +-- Mahogany door functions + +local on_mahogany_folding_door_placed = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_mahogany' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_mahogany' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_mahogany_folding_door_punched = function( pos, node, puncher ) + if string.find( node.name, 'homedecor:folding_door_mahogany' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c', -2 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZ + elseif node.param2 == WALLMZ then + newparam = WALLMX + elseif node.param2 == WALLMX then + newparam = WALLPZ + elseif node.param2 == WALLPZ then + newparam = WALLPX + end + elseif string.find( node.name, '_o', -2 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPX + elseif node.param2 == WALLMX then + newparam = WALLMZ + elseif node.param2 == WALLPZ then + newparam = WALLMX + elseif node.param2 == WALLPX then + newparam = WALLPZ + end + end + + if ( node.name == 'homedecor:folding_door_mahogany_a_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_o', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_o', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_a_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + + end +end + +local on_mahogany_folding_door_digged = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_mahogany_a_c' ) or ( node.name == 'homedecor:folding_door_mahogany_a_o' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c' ) or ( node.name == 'homedecor:folding_door_mahogany_b_o' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_mahogany_folding_door_placed ) +minetest.register_on_punchnode( on_mahogany_folding_door_punched ) +minetest.register_on_dignode( on_mahogany_folding_door_digged ) + + +-- Nodes used to build up mahogany doors + +minetest.register_node('homedecor:folding_door_mahogany_a_c', { + description = "Mahogany Folding Door (top, closed)", + tile_images = { 'homedecor_folding_door_mahogany_a.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_c', { + description = "Mahogany Folding Door (bottom, closed)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_a_o', { + description = "Mahogany Folding Door (top, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_a_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_o', { + description = "Mahogany Folding Door (bottom, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany', +}) + + +-- ======================================== +-- Mirrored version for right-opening doors +-- ======================================== + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_mahogany_right', { + description = "Mahogany Folding Door (Right Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_right.png' }, + inventory_image = 'homedecor_folding_door_mahogany_right.png', + wield_image = 'homedecor_folding_door_mahogany_right.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + + +-- Mahogany door functions + +local on_mahogany_folding_door_placed_right = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_mahogany_right' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_mahogany_right' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_mahogany_folding_door_punched_right = function( pos, node, puncher ) + + if string.find( node.name, 'homedecor:folding_door_mahogany' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c_right', -8 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZr + elseif node.param2 == WALLMZ then + newparam = WALLMXr + elseif node.param2 == WALLMX then + newparam = WALLPZr + elseif node.param2 == WALLPZ then + newparam = WALLPXr + end + elseif string.find( node.name, '_o_right', -8 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPXr + elseif node.param2 == WALLMX then + newparam = WALLMZr + elseif node.param2 == WALLPZ then + newparam = WALLMXr + elseif node.param2 == WALLPX then + newparam = WALLPZr + end + end + + if ( node.name == 'homedecor:folding_door_mahogany_a_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_o_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_o_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_a_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + + end +end + +local on_mahogany_folding_door_digged_right = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_mahogany_a_c_right' ) or ( node.name == 'homedecor:folding_door_mahogany_a_o_right' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c_right' ) or ( node.name == 'homedecor:folding_door_mahogany_b_o_right' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_mahogany_folding_door_placed_right ) +minetest.register_on_punchnode( on_mahogany_folding_door_punched_right ) +minetest.register_on_dignode( on_mahogany_folding_door_digged_right ) + + +-- Nodes used to build up mahogany doors + +minetest.register_node('homedecor:folding_door_mahogany_a_c_right', { + description = "Mahogany Folding Door (top, closed, right)", + tile_images = { 'homedecor_folding_door_mahogany_a_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a_r.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_c_right', { + description = "Mahogany Folding Door (bottom, closed, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_a_o_right', { + description = "Mahogany Folding Door (top, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_a.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_o_right', { + description = "Mahogany Folding Door (bottom, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany_right', +}) + + +-- ======================================= +-- Crafting recipes for all types of doors +-- ======================================= + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany_right', + recipe = { + 'homedecor:folding_door_mahogany', + }, +}) + +minetest.register_craft({ + type = 'shapeless', + output = 'homedecor:folding_door_mahogany', + recipe = { + 'homedecor:folding_door_mahogany_right', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_mahogany', + burntime = 30, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_mahogany_right', + burntime = 30, +}) + + +-- You only need flowers to get the red dye necessary to actually +-- craft a mahogany door (either one), but not to /give or use one. + +if ( minetest.get_modpath("flowers") ) ~= nil then + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany', + recipe = { + 'homedecor:folding_door_oak', + 'unifieddyes:black', + 'unifieddyes:red', + }, + }) + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany_right', + recipe = { + 'homedecor:folding_door_oak_right', + 'unifieddyes:black', + 'unifieddyes:red', + }, + }) + +end diff --git a/foldingdoors_mahogany.lua b/foldingdoors_mahogany.lua new file mode 100644 index 00000000..3da86c4b --- /dev/null +++ b/foldingdoors_mahogany.lua @@ -0,0 +1,442 @@ +-- Mahogany "folding" doors - part of home decor mod by VanessaE +-- 2012-06-10 +-- +-- Copied and modified from Minetest's default doors mod. +-- +-- License: GPL +-- + +local DEBUG = 1 + +local WALLMX = 3 +local WALLMZ = 5 +local WALLPX = 2 +local WALLPZ = 4 + +local WALLMXr = 2 +local WALLMZr = 4 +local WALLPXr = 3 +local WALLPZr = 5 + +local dbg = function(s) + if DEBUG == 1 then + print('[FOLDINGDOORS] ' .. s) + end +end + +local round = function( n ) + if n >= 0 then + return math.floor( n + 0.5 ) + else + return math.ceil( n - 0.5 ) + end +end + +-- ========================== +-- Regular left-opening doors + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_mahogany', { + description = "Mahogany Folding Door (Left Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany.png' }, + inventory_image = 'homedecor_folding_door_mahogany.png', + wield_image = 'homedecor_folding_door_mahogany.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + +-- Mahogany door functions + +local on_mahogany_folding_door_placed = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_mahogany' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_mahogany' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_mahogany_folding_door_punched = function( pos, node, puncher ) + if string.find( node.name, 'homedecor:folding_door_mahogany' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c', -2 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZ + elseif node.param2 == WALLMZ then + newparam = WALLMX + elseif node.param2 == WALLMX then + newparam = WALLPZ + elseif node.param2 == WALLPZ then + newparam = WALLPX + end + elseif string.find( node.name, '_o', -2 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPX + elseif node.param2 == WALLMX then + newparam = WALLMZ + elseif node.param2 == WALLPZ then + newparam = WALLMX + elseif node.param2 == WALLPX then + newparam = WALLPZ + end + end + + if ( node.name == 'homedecor:folding_door_mahogany_a_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_o', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_o', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_a_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + + end +end + +local on_mahogany_folding_door_digged = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_mahogany_a_c' ) or ( node.name == 'homedecor:folding_door_mahogany_a_o' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c' ) or ( node.name == 'homedecor:folding_door_mahogany_b_o' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_mahogany_folding_door_placed ) +minetest.register_on_punchnode( on_mahogany_folding_door_punched ) +minetest.register_on_dignode( on_mahogany_folding_door_digged ) + + +-- Nodes used to build up mahogany doors + +minetest.register_node('homedecor:folding_door_mahogany_a_c', { + description = "Mahogany Folding Door (top, closed)", + tile_images = { 'homedecor_folding_door_mahogany_a.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_c', { + description = "Mahogany Folding Door (bottom, closed)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_a_o', { + description = "Mahogany Folding Door (top, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_a_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_o', { + description = "Mahogany Folding Door (bottom, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany', +}) + + +-- ======================================== +-- Mirrored version for right-opening doors +-- ======================================== + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_mahogany_right', { + description = "Mahogany Folding Door (Right Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_right.png' }, + inventory_image = 'homedecor_folding_door_mahogany_right.png', + wield_image = 'homedecor_folding_door_mahogany_right.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + + +-- Mahogany door functions + +local on_mahogany_folding_door_placed_right = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_mahogany_right' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_mahogany_right' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_mahogany_folding_door_punched_right = function( pos, node, puncher ) + + if string.find( node.name, 'homedecor:folding_door_mahogany' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c_right', -8 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZr + elseif node.param2 == WALLMZ then + newparam = WALLMXr + elseif node.param2 == WALLMX then + newparam = WALLPZr + elseif node.param2 == WALLPZ then + newparam = WALLPXr + end + elseif string.find( node.name, '_o_right', -8 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPXr + elseif node.param2 == WALLMX then + newparam = WALLMZr + elseif node.param2 == WALLPZ then + newparam = WALLMXr + elseif node.param2 == WALLPX then + newparam = WALLPZr + end + end + + if ( node.name == 'homedecor:folding_door_mahogany_a_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_o_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_o_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_a_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + + end +end + +local on_mahogany_folding_door_digged_right = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_mahogany_a_c_right' ) or ( node.name == 'homedecor:folding_door_mahogany_a_o_right' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c_right' ) or ( node.name == 'homedecor:folding_door_mahogany_b_o_right' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_mahogany_folding_door_placed_right ) +minetest.register_on_punchnode( on_mahogany_folding_door_punched_right ) +minetest.register_on_dignode( on_mahogany_folding_door_digged_right ) + + +-- Nodes used to build up mahogany doors + +minetest.register_node('homedecor:folding_door_mahogany_a_c_right', { + description = "Mahogany Folding Door (top, closed, right)", + tile_images = { 'homedecor_folding_door_mahogany_a_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a_r.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_c_right', { + description = "Mahogany Folding Door (bottom, closed, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_a_o_right', { + description = "Mahogany Folding Door (top, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_a.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_o_right', { + description = "Mahogany Folding Door (bottom, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany_right', +}) + + +-- ======================================= +-- Crafting recipes for all types of doors +-- ======================================= + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany_right', + recipe = { + 'homedecor:folding_door_mahogany', + }, +}) + +minetest.register_craft({ + type = 'shapeless', + output = 'homedecor:folding_door_mahogany', + recipe = { + 'homedecor:folding_door_mahogany_right', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_mahogany', + burntime = 30, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_mahogany_right', + burntime = 30, +}) + + +-- You only need flowers to get the red dye necessary to actually +-- craft a mahogany door (either one), but not to /give or use one. + +if ( minetest.get_modpath("flowers") ) ~= nil then + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany', + recipe = { + 'homedecor:folding_door_oak', + 'unifieddyes:black', + 'unifieddyes:red', + }, + }) + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany_right', + recipe = { + 'homedecor:folding_door_oak_right', + 'unifieddyes:black', + 'unifieddyes:red', + }, + }) + +end diff --git a/foldingdoors_mahogany.lua~ b/foldingdoors_mahogany.lua~ new file mode 100644 index 00000000..0cc395ff --- /dev/null +++ b/foldingdoors_mahogany.lua~ @@ -0,0 +1,442 @@ +-- Mahogany "folding" doors - part of home decor mod by VanessaE +-- 2012-06-10 +-- +-- Copied and modified from Minetest's default doors mod. +-- +-- License: GPL +-- + +local DEBUG = 1 + +local WALLMX = 3 +local WALLMZ = 5 +local WALLPX = 2 +local WALLPZ = 4 + +local WALLMXr = 2 +local WALLMZr = 4 +local WALLPXr = 3 +local WALLPZr = 5 + +local dbg = function(s) + if DEBUG == 1 then + print('[FOLDINGDOORS] ' .. s) + end +end + +local round = function( n ) + if n >= 0 then + return math.floor( n + 0.5 ) + else + return math.ceil( n - 0.5 ) + end +end + +-- ========================== +-- Regular left-opening doors + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_mahogany', { + description = "Mahogany Folding Door (Left Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany.png' }, + inventory_image = 'homedecor_folding_door_mahogany.png', + wield_image = 'homedecor_folding_door_mahogany.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + +-- Mahogany door functions + +local on_mahogany_folding_door_placed = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_mahogany' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_mahogany' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_mahogany_folding_door_punched = function( pos, node, puncher ) + if string.find( node.name, 'homedecor:folding_door_mahogany' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c', -2 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZ + elseif node.param2 == WALLMZ then + newparam = WALLMX + elseif node.param2 == WALLMX then + newparam = WALLPZ + elseif node.param2 == WALLPZ then + newparam = WALLPX + end + elseif string.find( node.name, '_o', -2 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPX + elseif node.param2 == WALLMX then + newparam = WALLMZ + elseif node.param2 == WALLPZ then + newparam = WALLMX + elseif node.param2 == WALLPX then + newparam = WALLPZ + end + end + + if ( node.name == 'homedecor:folding_door_mahogany_a_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_o', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_o', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_a_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c', param2 = newparam } ) + + end +end + +local on_mahogany_folding_door_digged = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_mahogany_a_c' ) or ( node.name == 'homedecor:folding_door_mahogany_a_o' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c' ) or ( node.name == 'homedecor:folding_door_mahogany_b_o' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_mahogany_folding_door_placed ) +minetest.register_on_punchnode( on_mahogany_folding_door_punched ) +minetest.register_on_dignode( on_mahogany_folding_door_digged ) + + +-- Nodes used to build up mahogany doors + +minetest.register_node('homedecor:folding_door_mahogany_a_c', { + description = "Mahogany Folding Door (top, closed)", + tile_images = { 'homedecor_folding_door_mahogany_a.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_c', { + description = "Mahogany Folding Door (bottom, closed)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_a_o', { + description = "Mahogany Folding Door (top, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_a_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_o', { + description = "Mahogany Folding Door (bottom, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany', +}) + + +-- ======================================== +-- Mirrored version for right-opening doors +-- ======================================== + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_mahogany_right', { + description = "Mahogany Folding Door (Right Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_right.png' }, + inventory_image = 'homedecor_folding_door_mahogany_right.png', + wield_image = 'homedecor_folding_door_mahogany_right.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + + +-- Mahogany door functions + +local on_mahogany_folding_door_placed_right = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_mahogany_right' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_mahogany_right' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_mahogany_folding_door_punched_right = function( pos, node, puncher ) + + if string.find( node.name, 'homedecor:folding_door_mahogany' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c_right', -8 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZr + elseif node.param2 == WALLMZ then + newparam = WALLMXr + elseif node.param2 == WALLMX then + newparam = WALLPZr + elseif node.param2 == WALLPZ then + newparam = WALLPXr + end + elseif string.find( node.name, '_o_right', -8 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPXr + elseif node.param2 == WALLMX then + newparam = WALLMZr + elseif node.param2 == WALLPZ then + newparam = WALLMXr + elseif node.param2 == WALLPX then + newparam = WALLPZr + end + end + + if ( node.name == 'homedecor:folding_door_mahogany_a_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_o_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_o_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_a_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_mahogany_b_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_mahogany_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_mahogany_a_c_right', param2 = newparam } ) + + end +end + +local on_mahogany_folding_door_digged_right = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_mahogany_a_c_right' ) or ( node.name == 'homedecor:folding_door_mahogany_a_o_right' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_mahogany_b_c_right' ) or ( node.name == 'homedecor:folding_door_mahogany_b_o_right' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_mahogany_folding_door_placed_right ) +minetest.register_on_punchnode( on_mahogany_folding_door_punched_right ) +minetest.register_on_dignode( on_mahogany_folding_door_digged_right ) + + +-- Nodes used to build up mahogany doors + +minetest.register_node('homedecor:folding_door_mahogany_a_c_right', { + description = "Mahogany Folding Door (top, closed, right)", + tile_images = { 'homedecor_folding_door_mahogany_a_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a_r.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_c_right', { + description = "Mahogany Folding Door (bottom, closed, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b_r.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_a_o_right', { + description = "Mahogany Folding Door (top, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_a.png' }, + inventory_image = 'homedecor_folding_door_mahogany_a.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany_right', +}) + +minetest.register_node('homedecor:folding_door_mahogany_b_o_right', { + description = "Mahogany Folding Door (bottom, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_mahogany_b.png' }, + inventory_image = 'homedecor_folding_door_mahogany_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = 'wallmounted', + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_mahogany_right', +}) + + +-- ======================================= +-- Crafting recipes for all types of doors +-- ======================================= + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany_right', + recipe = { + 'homedecor:folding_door_mahogany', + }, +}) + +minetest.register_craft({ + type = 'shapeless', + output = 'homedecor:folding_door_mahogany', + recipe = { + 'homedecor:folding_door_mahogany_right', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_mahogany', + burntime = 30, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_mahogany_right', + burntime = 30, +}) + + +-- You only need flowers to get the red dye necessary to actually +-- craft a mahogany door (either one), but not to /give or use one. + +if ( minetest.get_modpath("flowers") ) ~= nil then + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany', + recipe = { + 'homedecor:folding_door_oak', + 'homedecor:dye_black', + 'homedecor:dye_red', + }, + }) + + minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_mahogany_right', + recipe = { + 'homedecor:folding_door_oak_right', + 'homedecor:dye_black', + 'homedecor:dye_red', + }, + }) + +end diff --git a/foldingdoors_oak.lua b/foldingdoors_oak.lua new file mode 100644 index 00000000..eaf524bd --- /dev/null +++ b/foldingdoors_oak.lua @@ -0,0 +1,420 @@ +-- Oak "folding" doors - part of home decor mod by VanessaE +-- 2012-06-10 +-- +-- Copied and modified from Minetest's default doors mod. +-- +-- License: GPL +-- + +local DEBUG = 1 + +local WALLMX = 3 +local WALLMZ = 5 +local WALLPX = 2 +local WALLPZ = 4 + +local WALLMXr = 2 +local WALLMZr = 4 +local WALLPXr = 3 +local WALLPZr = 5 + +local dbg = function(s) + if DEBUG == 1 then + print('[FOLDINGDOORS] ' .. s) + end +end + +local round = function( n ) + if n >= 0 then + return math.floor( n + 0.5 ) + else + return math.ceil( n - 0.5 ) + end +end + +-- ========================== +-- Regular left-opening doors + +minetest.register_node('homedecor:folding_door_oak', { + description = "Oak Folding Door (Left Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak.png' }, + inventory_image = 'homedecor_folding_door_oak.png', + wield_image = 'homedecor_folding_door_oak.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + + +local on_oak_folding_door_placed = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_oak' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_oak_b_c', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_oak_a_c', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_oak' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_oak_folding_door_punched = function( pos, node, puncher ) + if string.find( node.name, 'homedecor:folding_door_oak' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c', -2 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZ + elseif node.param2 == WALLMZ then + newparam = WALLMX + elseif node.param2 == WALLMX then + newparam = WALLPZ + elseif node.param2 == WALLPZ then + newparam = WALLPX + end + elseif string.find( node.name, '_o', -2 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPX + elseif node.param2 == WALLMX then + newparam = WALLMZ + elseif node.param2 == WALLPZ then + newparam = WALLMX + elseif node.param2 == WALLPX then + newparam = WALLPZ + end + end + + if ( node.name == 'homedecor:folding_door_oak_a_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_a_o', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_oak_b_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_oak_b_c' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_b_o', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_oak_a_o', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_oak_a_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_a_c', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_oak_b_c', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_oak_b_o' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_b_c', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_oak_a_c', param2 = newparam } ) + + end +end + +local on_oak_folding_door_digged = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_oak_a_c' ) or ( node.name == 'homedecor:folding_door_oak_a_o' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_oak_b_c' ) or ( node.name == 'homedecor:folding_door_oak_b_o' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_oak_folding_door_placed ) +minetest.register_on_punchnode( on_oak_folding_door_punched ) +minetest.register_on_dignode( on_oak_folding_door_digged ) + + +-- Nodes to build up oak folding doors + +minetest.register_node('homedecor:folding_door_oak_a_c', { + description = "Oak Folding Door (top, closed)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_a.png' }, + inventory_image = 'homedecor_folding_door_oak_a.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_oak', +}) + +minetest.register_node('homedecor:folding_door_oak_b_c', { + description = "Oak Folding Door (bottom, closed)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_b.png' }, + inventory_image = 'homedecor_folding_door_oak_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_oak', +}) + +minetest.register_node('homedecor:folding_door_oak_a_o', { + description = "Oak Folding Door (top, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_a_r.png' }, + inventory_image = 'homedecor_folding_door_oak_a_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_oak', +}) + +minetest.register_node('homedecor:folding_door_oak_b_o', { + description = "Oak Folding Door (bottom, open)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_b_r.png' }, + inventory_image = 'homedecor_folding_door_oak_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_oak', +}) + + +-- ======================================== +-- Mirrored version for right-opening doors +-- ======================================== + +-- Actual nodes that you place + +minetest.register_node('homedecor:folding_door_oak_right', { + description = "Oak Folding Door (Right Opening)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_right.png' }, + inventory_image = 'homedecor_folding_door_oak_right.png', + wield_image = 'homedecor_folding_door_oak_right.png', + paramtype2 = "wallmounted", + selection_box = { type = "wallmounted" }, + groups = { choppy = 2, dig_immediate=2 }, +}) + +local on_oak_folding_door_placed_right = function( pos, node, placer ) + if node.name ~= 'homedecor:folding_door_oak_right' then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + und = minetest.env:get_node( upos ) + abv = minetest.env:get_node( apos ) + + dir = placer:get_look_dir() + + if round( dir.x ) == 1 then + newparam = WALLMX + elseif round( dir.x ) == -1 then + newparam = WALLPX + elseif round( dir.z ) == 1 then + newparam = WALLMZ + elseif round( dir.z ) == -1 then + newparam = WALLPZ + end + + if und.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_oak_b_c_right', param2 = newparam } ) + elseif abv.name == 'air' then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_oak_a_c_right', param2 = newparam } ) + else + minetest.env:remove_node( pos ) + placer:get_inventory():add_item( "main", 'homedecor:folding_door_oak_right' ) + minetest.chat_send_player( placer:get_player_name(), 'not enough space' ) + end +end + +local on_oak_folding_door_punched_right = function( pos, node, puncher ) + + if string.find( node.name, 'homedecor:folding_door_oak' ) == nil then return end + + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if string.find( node.name, '_c_right', -8 ) ~= nil then + if node.param2 == WALLPX then + newparam = WALLMZr + elseif node.param2 == WALLMZ then + newparam = WALLMXr + elseif node.param2 == WALLMX then + newparam = WALLPZr + elseif node.param2 == WALLPZ then + newparam = WALLPXr + end + + elseif string.find( node.name, '_o_right', -8 ) ~= nil then + if node.param2 == WALLMZ then + newparam = WALLPXr + elseif node.param2 == WALLMX then + newparam = WALLMZr + elseif node.param2 == WALLPZ then + newparam = WALLMXr + elseif node.param2 == WALLPX then + newparam = WALLPZr + end + end + + if ( node.name == 'homedecor:folding_door_oak_a_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_a_o_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_oak_b_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_oak_b_c_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_b_o_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_oak_a_o_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_oak_a_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_a_c_right', param2 = newparam } ) + minetest.env:add_node( upos, { name = 'homedecor:folding_door_oak_b_c_right', param2 = newparam } ) + + elseif ( node.name == 'homedecor:folding_door_oak_b_o_right' ) then + minetest.env:add_node( pos, { name = 'homedecor:folding_door_oak_b_c_right', param2 = newparam } ) + minetest.env:add_node( apos, { name = 'homedecor:folding_door_oak_a_c_right', param2 = newparam } ) + + end +end + +local on_oak_folding_door_digged_right = function( pos, node, digger ) + upos = { x = pos.x, y = pos.y - 1, z = pos.z } + apos = { x = pos.x, y = pos.y + 1, z = pos.z } + + if ( node.name == 'homedecor:folding_door_oak_a_c_right' ) or ( node.name == 'homedecor:folding_door_oak_a_o_right' ) then + minetest.env:remove_node( upos ) + elseif ( node.name == 'homedecor:folding_door_oak_b_c_right' ) or ( node.name == 'homedecor:folding_door_oak_b_o_right' ) then + minetest.env:remove_node( apos ) + end +end + +minetest.register_on_placenode( on_oak_folding_door_placed_right ) +minetest.register_on_punchnode( on_oak_folding_door_punched_right ) +minetest.register_on_dignode( on_oak_folding_door_digged_right ) + + +-- Nodes to build up oak folding doors + +minetest.register_node('homedecor:folding_door_oak_a_c_right', { + description = "Oak Folding Door (top, closed, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_a_r.png' }, + inventory_image = 'homedecor_folding_door_oak_a_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_oak_right', +}) + +minetest.register_node('homedecor:folding_door_oak_b_c_right', { + description = "Oak Folding Door (bottom, closed, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_b_r.png' }, + inventory_image = 'homedecor_folding_door_oak_b_r.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = true, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted" }, + drop = 'homedecor:folding_door_oak_right', +}) + +minetest.register_node('homedecor:folding_door_oak_a_o_right', { + description = "Oak Folding Door (top, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_a.png' }, + inventory_image = 'homedecor_folding_door_oak_a.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_oak_right', +}) + +minetest.register_node('homedecor:folding_door_oak_b_o_right', { + description = "Oak Folding Door (bottom, open, right)", + drawtype = 'signlike', + tile_images = { 'homedecor_folding_door_oak_b.png' }, + inventory_image = 'homedecor_folding_door_oak_b.png', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + groups = { choppy = 2, dig_immediate=2 }, + selection_box = { type = "wallmounted", }, + drop = 'homedecor:folding_door_oak_right', +}) + + + +-- ======================================= +-- Crafting recipes for all types of doors +-- ======================================= + + +minetest.register_craft( { + output = 'homedecor:folding_door_oak', + recipe = { + { 'default:stick', 'default:stick', '' }, + { 'default:stick', 'default:stick', 'default:steel_ingot' }, + { 'default:stick', 'default:stick', '' }, + }, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_oak_right', + recipe = { + 'homedecor:folding_door_oak', + }, +}) + +minetest.register_craft( { + type = 'shapeless', + output = 'homedecor:folding_door_oak', + recipe = { + 'homedecor:folding_door_oak_right', + }, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_oak', + burntime = 30, +}) + +minetest.register_craft({ + type = 'fuel', + recipe = 'homedecor:folding_door_oak_right', + burntime = 30, +}) diff --git a/init.lua b/init.lua new file mode 100644 index 00000000..7b55d1b3 --- /dev/null +++ b/init.lua @@ -0,0 +1,985 @@ +-- Home Decor mod by VanessaE +-- 2012-06-12 +-- +-- Mostly my own code, with bits and pieces lifted from Minetest's default +-- lua files, from ironzorg's flowers mod +-- +-- See also, foldingdoors.lua (borrowed heavily from Minetest's default +-- doors mod) +-- +-- This mod requires the presence of the "unifieddyes" mod, which also +-- supplies ironzorg's flowers mod. +-- +-- License: GPL +-- + +dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua") +dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua") +dofile(minetest.get_modpath("homedecor").."/exterior_door_fancy.lua") +dofile(minetest.get_modpath("homedecor").."/crafts.lua") + +local DEBUG = 1 + +-- Local Functions + +local dbg = function(s) + if DEBUG == 1 then + print('[HomeDecor] ' .. s) + end +end + +-- Nodes + +minetest.register_node('homedecor:shingles_wood', { + description = "Wood Shingles", + drawtype = 'raillike', + tile_images = { 'homedecor_shingles_wood.png' }, + wield_image = 'homedecor_shingles_wood.png', + inventory_image = 'homedecor_shingles_wood.png', + paramtype = 'light', + sunlight_propagates = false, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:skylight', { + description = "Glass Skylight", + drawtype = 'raillike', + tile_images = { 'default_glass.png' }, + wield_image = 'default_glass.png', + inventory_image = 'default_glass.png', + paramtype = 'light', + sunlight_propagates = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:shingles_asphalt', { + description = "Asphalt Shingles", + drawtype = 'raillike', + tile_images = { 'homedecor_shingles_asphalt.png' }, + wield_image = 'homedecor_shingles_asphalt.png', + inventory_image = 'homedecor_shingles_asphalt.png', + paramtype = 'light', + sunlight_propagates = false, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:shingles_terracotta', { + description = "Terracotta Roofing", + drawtype = 'raillike', + tile_images = { 'homedecor_shingles_terracotta.png' }, + wield_image = 'homedecor_shingles_terracotta.png', + inventory_image = 'homedecor_shingles_terracotta.png', + paramtype = 'light', + sunlight_propagates = false, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drop = 'homedecor:roof_tile_terracotta 4', + +}) + +minetest.register_node('homedecor:projection_screen', { + description = "Projection Screen Material", + drawtype = 'signlike', + tile_images = { 'homedecor_projection_screen.png' }, + wield_image = 'homedecor_projection_screen_inv.png', + inventory_image = 'homedecor_projection_screen_inv.png', + sunlight_propagates = false, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:ceiling_paint', { + description = "Textured Ceiling Paint", + drawtype = 'signlike', + tile_images = { 'homedecor_ceiling_paint.png' }, + inventory_image = 'homedecor_ceiling_paint_roller.png', + wield_image = 'homedecor_ceiling_paint_roller.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:ceiling_tile', { + description = "Drop-Ceiling Tile", + drawtype = 'signlike', + tile_images = { 'homedecor_ceiling_tile.png' }, + wield_image = 'homedecor_ceiling_tile.png', + inventory_image = 'homedecor_ceiling_tile.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:rug_small', { + description = "Small Throw Rug", + drawtype = 'signlike', + tile_images = { 'homedecor_rug_small.png' }, + wield_image = 'homedecor_rug_small.png', + inventory_image = 'homedecor_rug_small.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:rug_large', { + description = "Large Area Rug", + drawtype = 'signlike', + tile_images = { 'homedecor_rug_large.png' }, + wield_image = 'homedecor_rug_large.png', + inventory_image = 'homedecor_rug_large.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + }) + +minetest.register_node('homedecor:glass_table_large', { + description = "Large Glass Table Piece", + drawtype = 'signlike', + tile_images = { 'homedecor_glass_table_large.png' }, + wield_image = 'homedecor_glass_table_large.png', + inventory_image = 'homedecor_glass_table_large.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:glass_table_small_round', { + description = "Glass Table (Small, Round)", + drawtype = 'signlike', + tile_images = { 'homedecor_glass_table_small_round.png' }, + wield_image = 'homedecor_glass_table_small_round.png', + inventory_image = 'homedecor_glass_table_small_round.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:glass_table_small_square', { + description = "Glass Table (Small, Square)", + drawtype = 'signlike', + tile_images = { 'homedecor_glass_table_small_square.png' }, + wield_image = 'homedecor_glass_table_small_square.png', + inventory_image = 'homedecor_glass_table_small_square.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node("homedecor:table_legs_brass", { + description = "Brass Table Legs", + drawtype = "plantlike", + tile_images = {"homedecor_table_legs_brass.png"}, + inventory_image = "homedecor_table_legs_brass.png", + wield_image = "homedecor_table_legs_brass.png", + visual_scale = 1.04, + paramtype = "light", + walkable = false, + groups = {snappy=3}, + sounds = default.node_sound_leaves_defaults(), + walkable = true, +}) + +minetest.register_node("homedecor:table_legs_wrought_iron", { + description = "Brass Table Legs", + drawtype = "plantlike", + tile_images = {"homedecor_table_legs_wrought_iron.png"}, + inventory_image = "homedecor_table_legs_wrought_iron.png", + wield_image = "homedecor_table_legs_wrought_iron.png", + visual_scale = 1.04, + paramtype = "light", + walkable = false, + groups = {snappy=3}, + sounds = default.node_sound_leaves_defaults(), + walkable = true, +}) + +minetest.register_node('homedecor:television', { + description = "Small CRT Television", + tile_images = { 'homedecor_television_top.png', + 'homedecor_television_bottom.png', + 'homedecor_television_left.png', + 'homedecor_television_right.png', + 'homedecor_television_back.png', + 'homedecor_television_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + light_source = LIGHT_MAX - 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + + +minetest.register_node('homedecor:stereo', { + description = "Stereo Receiver", + tile_images = { 'homedecor_stereo_top.png', + 'homedecor_stereo_bottom.png', + 'homedecor_stereo_left.png', + 'homedecor_stereo_right.png', + 'homedecor_stereo_back.png', + 'homedecor_stereo_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:nightstand_oak_one_drawer', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_1_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:nightstand_oak_two_drawers', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_2_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) +minetest.register_node('homedecor:nightstand_mahogany_one_drawer', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_1_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:nightstand_mahogany_two_drawers', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_2_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:utility_table_top', { + description = "Utility Table", + tile_images = { 'homedecor_utility_table_top.png' }, + inventory_image = 'homedecor_utility_table_top.png', + wield_image = 'homedecor_utility_table_top.png', + drawtype = "signlike", + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + +}) + +minetest.register_node('homedecor:utility_table_legs', { + description = "Legs for Utility Table", + tile_images = { 'homedecor_utility_table_legs.png' }, + inventory_image = 'homedecor_utility_table_legs_inv.png', + wield_image = 'homedecor_utility_table_legs.png', + visual_scale = 1.04, + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drawtype = "plantlike", +}) + +minetest.register_node('homedecor:flower_pot_terracotta', { + description = "Terracotta Flower Pot", + tile_images = { 'homedecor_flower_pot_terracotta_top.png', + 'homedecor_flower_pot_terracotta_bottom.png', + 'homedecor_flower_pot_terracotta_sides.png', + 'homedecor_flower_pot_terracotta_sides.png', + 'homedecor_flower_pot_terracotta_sides.png', + 'homedecor_flower_pot_terracotta_sides.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:flower_pot_black', { + description = "Black Plastic Flower Pot", + tile_images = { 'homedecor_flower_pot_black_top.png', + 'homedecor_flower_pot_black_bottom.png', + 'homedecor_flower_pot_black_sides.png', + 'homedecor_flower_pot_black_sides.png', + 'homedecor_flower_pot_black_sides.png', + 'homedecor_flower_pot_black_sides.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:flower_pot_green', { + description = "Green Plastic Flower Pot", + tile_images = { 'homedecor_flower_pot_green_top.png', + 'homedecor_flower_pot_green_bottom.png', + 'homedecor_flower_pot_green_sides.png', + 'homedecor_flower_pot_green_sides.png', + 'homedecor_flower_pot_green_sides.png', + 'homedecor_flower_pot_green_sides.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:wood_table_large', { + description = "Wooden Tabletop piece", + tile_images = { 'homedecor_wood_table_large.png' }, + inventory_image = 'homedecor_wood_table_large.png', + wield_image = 'homedecor_wood_table_large.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:wood_table_small_round', { + description = "Wooden Tabletop (Small, Round)", + tile_images = { 'homedecor_wood_table_small_round.png' }, + inventory_image = 'homedecor_wood_table_small_round.png', + wield_image = 'homedecor_wood_table_small_round.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:wood_table_small_square', { + description = "Wooden Tabletop (Small, Square)", + tile_images = { 'homedecor_wood_table_small_square.png' }, + inventory_image = 'homedecor_wood_table_small_square.png', + wield_image = 'homedecor_wood_table_small_square.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:folding_door_mahogany', { + description = "Mahogany Folding Door", + tile_images = { 'homedecor_folding_door_mahogany.png' }, + inventory_image = 'homedecor_folding_door_mahogany.png', + wield_image = 'homedecor_folding_door_mahogany.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:folding_door_oak', { + description = "Oak Folding Door", + tile_images = { 'homedecor_folding_door_oak.png' }, + inventory_image = 'homedecor_folding_door_oak.png', + wield_image = 'homedecor_folding_door_oak.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:dresser_mahogany_left_side', { + description = "Mahogany Dresser (Left Half)", + tile_images = { 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_front_left.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:dresser_mahogany_right_side', { + description = "Mahogany Dresser (Right Half)", + tile_images = { 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_front_right.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:dresser_oak_left_side', { + description = "Oak Dresser (Left Half)", + tile_images = { 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_front_left.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:dresser_oak_right_side', { + description = "Oak Dresser (Right Half)", + tile_images = { 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_front_right.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:shutter_black', { + description = "Wooden Shutter (Black)", + tile_images = { 'homedecor_window_shutter_black.png' }, + inventory_image = 'homedecor_window_shutter_black.png', + wield_image = 'homedecor_window_shutter_black.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_mahogany', { + description = "Wooden Shutter (Unpainted Mahogany)", + tile_images = { 'homedecor_window_shutter_mahogany.png' }, + inventory_image = 'homedecor_window_shutter_mahogany.png', + wield_image = 'homedecor_window_shutter_mahogany.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_oak', { + description = "Wooden Shutter (Unpainted Oak)", + tile_images = { 'homedecor_window_shutter_oak.png' }, + inventory_image = 'homedecor_window_shutter_oak.png', + wield_image = 'homedecor_window_shutter_oak.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_dark_grey', { + description = "Wooden Shutter (Dark Grey)", + tile_images = { 'homedecor_window_shutter_dark_grey.png' }, + inventory_image = 'homedecor_window_shutter_dark_grey.png', + wield_image = 'homedecor_window_shutter_dark_grey.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_forest_green', { + description = "Wooden Shutter (Forest Green)", + tile_images = { 'homedecor_window_shutter_forest_green.png' }, + inventory_image = 'homedecor_window_shutter_forest_green.png', + wield_image = 'homedecor_window_shutter_forest_green.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_grey', { + description = "Wooden Shutter (Grey)", + tile_images = { 'homedecor_window_shutter_grey.png' }, + inventory_image = 'homedecor_window_shutter_grey.png', + wield_image = 'homedecor_window_shutter_grey.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_light_blue', { + description = "Wooden Shutter (Light Blue)", + tile_images = { 'homedecor_window_shutter_light_blue.png' }, + inventory_image = 'homedecor_window_shutter_light_blue.png', + wield_image = 'homedecor_window_shutter_light_blue.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_purple', { + description = "Wooden Shutter (Purple)", + tile_images = { 'homedecor_window_shutter_purple.png' }, + inventory_image = 'homedecor_window_shutter_purple.png', + wield_image = 'homedecor_window_shutter_purple.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_red', { + description = "Wooden Shutter (Red)", + tile_images = { 'homedecor_window_shutter_red.png' }, + inventory_image = 'homedecor_window_shutter_red.png', + wield_image = 'homedecor_window_shutter_red.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_white', { + description = "Wooden Shutter (White)", + tile_images = { 'homedecor_window_shutter_white.png' }, + inventory_image = 'homedecor_window_shutter_white.png', + wield_image = 'homedecor_window_shutter_white.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:shutter_yellow', { + description = "Wooden Shutter (Yellow)", + tile_images = { 'homedecor_window_shutter_yellow.png' }, + inventory_image = 'homedecor_window_shutter_yellow.png', + wield_image = 'homedecor_window_shutter_yellow.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + + +minetest.register_node('homedecor:utilitytable2', { + description = "Utility table mk2", + tile_images = { 'homedecor_utility_table_top.png', + 'homedecor_blanktile.png', + 'homedecor_utility_table_legs.png', + 'homedecor_utility_table_legs.png', + 'homedecor_utility_table_legs.png', + 'homedecor_utility_table_legs.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +-- =================================================== +-- everything after this line is for testing purposes. +-- =================================================== + +-- cylinder-shaped objects courtesy Jeija + +local cylbox = {} +local detail = 50 +local sehne +local size = 0.2 + +for i = 1, detail-1 do + sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2)) + cylbox[i]={((i/detail)-0.5)*size, -0.5, -sehne*size, ((i/detail)+(1/detail)-0.5)*size, 0.5, sehne*size} +end + +minetest.register_node("homedecor:pole_brass", { + description = "Brass Pole", + drawtype = "nodebox", + tile_images = {"homedecor_tile_brass2.png"}, + inventory_image = "homedecor_pole_brass2.png", + wield_image = "homedecor_pole_brass2.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-size/2, -0.5, -size/2, size/2, 0.5, size/2}, + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + node_box = { + type = "fixed", + fixed = cylbox, + } +}) + +minetest.register_node("homedecor:pole_wrought_iron", { + description = "Wrought Iron Pole", + drawtype = "nodebox", + tile_images = {"homedecor_tile_wrought_iron2.png"}, + inventory_image = "homedecor_pole_wrought_iron.png", + wield_image = "homedecor_pole_wrought_iron.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625} + }, + node_box = { + type = "fixed", + fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625} + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("homedecor:fence_brass", { + description = "Brass Fence/railing", + drawtype = "fencelike", + tile_images = {"homedecor_tile_brass.png"}, + inventory_image = "homedecor_fence_brass.png", + wield_image = "homedecor_pole_brass.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("homedecor:fence_wrought_iron", { + description = "Wrought Iron Fence/railing", + drawtype = "fencelike", + tile_images = {"homedecor_tile_wrought_iron.png"}, + inventory_image = "homedecor_fence_wrought_iron.png", + wield_image = "homedecor_pole_wrought_iron.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + + +minetest.register_node('homedecor:speaker', { + description = "Large Stereo Speaker", + tile_images = { 'homedecor_speaker_top.png', + 'homedecor_speaker_bottom.png', + 'homedecor_speaker_left.png', + 'homedecor_speaker_right.png', + 'homedecor_speaker_back.png', + 'homedecor_speaker_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:speaker_small', { + description = "Small Surround Speaker", + drawtype = "nodebox", + tile_images = { 'homedecor_speaker_top.png', + 'homedecor_speaker_bottom.png', + 'homedecor_speaker_left.png', + 'homedecor_speaker_right.png', + 'homedecor_speaker_back.png', + 'homedecor_speaker_front.png'}, + selection_box = { + type = "fixed", + fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } + }, + node_box = { + type = "fixed", + fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } + }, + + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +print("[HomeDecor] Loaded!") diff --git a/init.lua~ b/init.lua~ new file mode 100644 index 00000000..a394335a --- /dev/null +++ b/init.lua~ @@ -0,0 +1,984 @@ +-- Home Decor mod by VanessaE +-- 2012-06-12 +-- +-- Mostly my own code, with bits and pieces lifted from Minetest's default +-- lua files, from ironzorg's flowers mod +-- +-- See also, foldingdoors.lua (borrowed heavily from Minetest's default +-- doors mod) +-- +-- This mod requires the presence of the "unifieddyes" mod, which also +-- supplies ironzorg's flowers mod. +-- +-- License: GPL +-- + +dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua") +dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua") +dofile(minetest.get_modpath("homedecor").."/crafts.lua") + +local DEBUG = 1 + +-- Local Functions + +local dbg = function(s) + if DEBUG == 1 then + print('[HomeDecor] ' .. s) + end +end + +-- Nodes + +minetest.register_node('homedecor:shingles_wood', { + description = "Wood Shingles", + drawtype = 'raillike', + tile_images = { 'homedecor_shingles_wood.png' }, + wield_image = 'homedecor_shingles_wood.png', + inventory_image = 'homedecor_shingles_wood.png', + paramtype = 'light', + sunlight_propagates = false, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:skylight', { + description = "Glass Skylight", + drawtype = 'raillike', + tile_images = { 'default_glass.png' }, + wield_image = 'default_glass.png', + inventory_image = 'default_glass.png', + paramtype = 'light', + sunlight_propagates = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:shingles_asphalt', { + description = "Asphalt Shingles", + drawtype = 'raillike', + tile_images = { 'homedecor_shingles_asphalt.png' }, + wield_image = 'homedecor_shingles_asphalt.png', + inventory_image = 'homedecor_shingles_asphalt.png', + paramtype = 'light', + sunlight_propagates = false, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:shingles_terracotta', { + description = "Terracotta Roofing", + drawtype = 'raillike', + tile_images = { 'homedecor_shingles_terracotta.png' }, + wield_image = 'homedecor_shingles_terracotta.png', + inventory_image = 'homedecor_shingles_terracotta.png', + paramtype = 'light', + sunlight_propagates = false, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drop = 'homedecor:roof_tile_terracotta 4', + +}) + +minetest.register_node('homedecor:projection_screen', { + description = "Projection Screen Material", + drawtype = 'signlike', + tile_images = { 'homedecor_projection_screen.png' }, + wield_image = 'homedecor_projection_screen_inv.png', + inventory_image = 'homedecor_projection_screen_inv.png', + sunlight_propagates = false, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:ceiling_paint', { + description = "Textured Ceiling Paint", + drawtype = 'signlike', + tile_images = { 'homedecor_ceiling_paint.png' }, + inventory_image = 'homedecor_ceiling_paint_roller.png', + wield_image = 'homedecor_ceiling_paint_roller.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:ceiling_tile', { + description = "Drop-Ceiling Tile", + drawtype = 'signlike', + tile_images = { 'homedecor_ceiling_tile.png' }, + wield_image = 'homedecor_ceiling_tile.png', + inventory_image = 'homedecor_ceiling_tile.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:rug_small', { + description = "Small Throw Rug", + drawtype = 'signlike', + tile_images = { 'homedecor_rug_small.png' }, + wield_image = 'homedecor_rug_small.png', + inventory_image = 'homedecor_rug_small.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:rug_large', { + description = "Large Area Rug", + drawtype = 'signlike', + tile_images = { 'homedecor_rug_large.png' }, + wield_image = 'homedecor_rug_large.png', + inventory_image = 'homedecor_rug_large.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + }) + +minetest.register_node('homedecor:glass_table_large', { + description = "Large Glass Table Piece", + drawtype = 'signlike', + tile_images = { 'homedecor_glass_table_large.png' }, + wield_image = 'homedecor_glass_table_large.png', + inventory_image = 'homedecor_glass_table_large.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:glass_table_small_round', { + description = "Glass Table (Small, Round)", + drawtype = 'signlike', + tile_images = { 'homedecor_glass_table_small_round.png' }, + wield_image = 'homedecor_glass_table_small_round.png', + inventory_image = 'homedecor_glass_table_small_round.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:glass_table_small_square', { + description = "Glass Table (Small, Square)", + drawtype = 'signlike', + tile_images = { 'homedecor_glass_table_small_square.png' }, + wield_image = 'homedecor_glass_table_small_square.png', + inventory_image = 'homedecor_glass_table_small_square.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node("homedecor:table_legs_brass", { + description = "Brass Table Legs", + drawtype = "plantlike", + tile_images = {"homedecor_table_legs_brass.png"}, + inventory_image = "homedecor_table_legs_brass.png", + wield_image = "homedecor_table_legs_brass.png", + visual_scale = 1.04, + paramtype = "light", + walkable = false, + groups = {snappy=3}, + sounds = default.node_sound_leaves_defaults(), + walkable = true, +}) + +minetest.register_node("homedecor:table_legs_wrought_iron", { + description = "Brass Table Legs", + drawtype = "plantlike", + tile_images = {"homedecor_table_legs_wrought_iron.png"}, + inventory_image = "homedecor_table_legs_wrought_iron.png", + wield_image = "homedecor_table_legs_wrought_iron.png", + visual_scale = 1.04, + paramtype = "light", + walkable = false, + groups = {snappy=3}, + sounds = default.node_sound_leaves_defaults(), + walkable = true, +}) + +minetest.register_node('homedecor:television', { + description = "Small CRT Television", + tile_images = { 'homedecor_television_top.png', + 'homedecor_television_bottom.png', + 'homedecor_television_left.png', + 'homedecor_television_right.png', + 'homedecor_television_back.png', + 'homedecor_television_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + light_source = LIGHT_MAX - 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + + +minetest.register_node('homedecor:stereo', { + description = "Stereo Receiver", + tile_images = { 'homedecor_stereo_top.png', + 'homedecor_stereo_bottom.png', + 'homedecor_stereo_left.png', + 'homedecor_stereo_right.png', + 'homedecor_stereo_back.png', + 'homedecor_stereo_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:nightstand_oak_one_drawer', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_1_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:nightstand_oak_two_drawers', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_sides.png', + 'homedecor_nightstand_oak_2_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) +minetest.register_node('homedecor:nightstand_mahogany_one_drawer', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_1_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:nightstand_mahogany_two_drawers', { + description = "Oak Nightstand with One Drawer", + tile_images = { 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_sides.png', + 'homedecor_nightstand_mahogany_2_drawer_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:utility_table_top', { + description = "Utility Table", + tile_images = { 'homedecor_utility_table_top.png' }, + inventory_image = 'homedecor_utility_table_top.png', + wield_image = 'homedecor_utility_table_top.png', + drawtype = "signlike", + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + +}) + +minetest.register_node('homedecor:utility_table_legs', { + description = "Legs for Utility Table", + tile_images = { 'homedecor_utility_table_legs.png' }, + inventory_image = 'homedecor_utility_table_legs_inv.png', + wield_image = 'homedecor_utility_table_legs.png', + visual_scale = 1.04, + sunlight_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drawtype = "plantlike", +}) + +minetest.register_node('homedecor:flower_pot_terracotta', { + description = "Terracotta Flower Pot", + tile_images = { 'homedecor_flower_pot_terracotta_top.png', + 'homedecor_flower_pot_terracotta_bottom.png', + 'homedecor_flower_pot_terracotta_sides.png', + 'homedecor_flower_pot_terracotta_sides.png', + 'homedecor_flower_pot_terracotta_sides.png', + 'homedecor_flower_pot_terracotta_sides.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:flower_pot_black', { + description = "Black Plastic Flower Pot", + tile_images = { 'homedecor_flower_pot_black_top.png', + 'homedecor_flower_pot_black_bottom.png', + 'homedecor_flower_pot_black_sides.png', + 'homedecor_flower_pot_black_sides.png', + 'homedecor_flower_pot_black_sides.png', + 'homedecor_flower_pot_black_sides.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:flower_pot_green', { + description = "Green Plastic Flower Pot", + tile_images = { 'homedecor_flower_pot_green_top.png', + 'homedecor_flower_pot_green_bottom.png', + 'homedecor_flower_pot_green_sides.png', + 'homedecor_flower_pot_green_sides.png', + 'homedecor_flower_pot_green_sides.png', + 'homedecor_flower_pot_green_sides.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:wood_table_large', { + description = "Wooden Tabletop piece", + tile_images = { 'homedecor_wood_table_large.png' }, + inventory_image = 'homedecor_wood_table_large.png', + wield_image = 'homedecor_wood_table_large.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:wood_table_small_round', { + description = "Wooden Tabletop (Small, Round)", + tile_images = { 'homedecor_wood_table_small_round.png' }, + inventory_image = 'homedecor_wood_table_small_round.png', + wield_image = 'homedecor_wood_table_small_round.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:wood_table_small_square', { + description = "Wooden Tabletop (Small, Square)", + tile_images = { 'homedecor_wood_table_small_square.png' }, + inventory_image = 'homedecor_wood_table_small_square.png', + wield_image = 'homedecor_wood_table_small_square.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = "wallmounted", + is_ground_content = true, + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, +}) + +minetest.register_node('homedecor:folding_door_mahogany', { + description = "Mahogany Folding Door", + tile_images = { 'homedecor_folding_door_mahogany.png' }, + inventory_image = 'homedecor_folding_door_mahogany.png', + wield_image = 'homedecor_folding_door_mahogany.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:folding_door_oak', { + description = "Oak Folding Door", + tile_images = { 'homedecor_folding_door_oak.png' }, + inventory_image = 'homedecor_folding_door_oak.png', + wield_image = 'homedecor_folding_door_oak.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:dresser_mahogany_left_side', { + description = "Mahogany Dresser (Left Half)", + tile_images = { 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_front_left.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:dresser_mahogany_right_side', { + description = "Mahogany Dresser (Right Half)", + tile_images = { 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_sides.png', + 'homedecor_dresser_mahogany_front_right.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:dresser_oak_left_side', { + description = "Oak Dresser (Left Half)", + tile_images = { 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_front_left.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:dresser_oak_right_side', { + description = "Oak Dresser (Right Half)", + tile_images = { 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_sides.png', + 'homedecor_dresser_oak_front_right.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:window_shutter_black', { + description = "Wooden Shutter (Black)", + tile_images = { 'homedecor_window_shutter_black.png' }, + inventory_image = 'homedecor_window_shutter_black.png', + wield_image = 'homedecor_window_shutter_black.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_mahogany', { + description = "Wooden Shutter (Unpainted Mahogany)", + tile_images = { 'homedecor_window_shutter_mahogany.png' }, + inventory_image = 'homedecor_window_shutter_mahogany.png', + wield_image = 'homedecor_window_shutter_mahogany.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_oak', { + description = "Wooden Shutter (Unpainted Oak)", + tile_images = { 'homedecor_window_shutter_oak.png' }, + inventory_image = 'homedecor_window_shutter_oak.png', + wield_image = 'homedecor_window_shutter_oak.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_dark_grey', { + description = "Wooden Shutter (Dark Grey)", + tile_images = { 'homedecor_window_shutter_dark_grey.png' }, + inventory_image = 'homedecor_window_shutter_dark_grey.png', + wield_image = 'homedecor_window_shutter_dark_grey.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_forest_green', { + description = "Wooden Shutter (Forest Green)", + tile_images = { 'homedecor_window_shutter_forest_green.png' }, + inventory_image = 'homedecor_window_shutter_forest_green.png', + wield_image = 'homedecor_window_shutter_forest_green.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_grey', { + description = "Wooden Shutter (Grey)", + tile_images = { 'homedecor_window_shutter_grey.png' }, + inventory_image = 'homedecor_window_shutter_grey.png', + wield_image = 'homedecor_window_shutter_grey.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_light_blue', { + description = "Wooden Shutter (Light Blue)", + tile_images = { 'homedecor_window_shutter_light_blue.png' }, + inventory_image = 'homedecor_window_shutter_light_blue.png', + wield_image = 'homedecor_window_shutter_light_blue.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_purple', { + description = "Wooden Shutter (Purple)", + tile_images = { 'homedecor_window_shutter_purple.png' }, + inventory_image = 'homedecor_window_shutter_purple.png', + wield_image = 'homedecor_window_shutter_purple.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_red', { + description = "Wooden Shutter (Red)", + tile_images = { 'homedecor_window_shutter_red.png' }, + inventory_image = 'homedecor_window_shutter_red.png', + wield_image = 'homedecor_window_shutter_red.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_white', { + description = "Wooden Shutter (White)", + tile_images = { 'homedecor_window_shutter_white.png' }, + inventory_image = 'homedecor_window_shutter_white.png', + wield_image = 'homedecor_window_shutter_white.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + +minetest.register_node('homedecor:window_shutter_yellow', { + description = "Wooden Shutter (Yellow)", + tile_images = { 'homedecor_window_shutter_yellow.png' }, + inventory_image = 'homedecor_window_shutter_yellow.png', + wield_image = 'homedecor_window_shutter_yellow.png', + drawtype = 'signlike', + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + paramtype2 = 'wallmounted', + selection_box = { + type = "wallmounted", + --wall_side = = + }, +}) + + +minetest.register_node('homedecor:utilitytable2', { + description = "Utility table mk2", + tile_images = { 'homedecor_utility_table_top.png', + 'homedecor_blanktile.png', + 'homedecor_utility_table_legs.png', + 'homedecor_utility_table_legs.png', + 'homedecor_utility_table_legs.png', + 'homedecor_utility_table_legs.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +-- =================================================== +-- everything after this line is for testing purposes. +-- =================================================== + +-- cylinder-shaped objects courtesy Jeija + +local cylbox = {} +local detail = 50 +local sehne +local size = 0.2 + +for i = 1, detail-1 do + sehne = math.sqrt(0.25 - (((i/detail)-0.5)^2)) + cylbox[i]={((i/detail)-0.5)*size, -0.5, -sehne*size, ((i/detail)+(1/detail)-0.5)*size, 0.5, sehne*size} +end + +minetest.register_node("homedecor:pole_brass", { + description = "Brass Pole", + drawtype = "nodebox", + tile_images = {"homedecor_tile_brass2.png"}, + inventory_image = "homedecor_pole_brass2.png", + wield_image = "homedecor_pole_brass2.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-size/2, -0.5, -size/2, size/2, 0.5, size/2}, + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, + node_box = { + type = "fixed", + fixed = cylbox, + } +}) + +minetest.register_node("homedecor:pole_wrought_iron", { + description = "Wrought Iron Pole", + drawtype = "nodebox", + tile_images = {"homedecor_tile_wrought_iron2.png"}, + inventory_image = "homedecor_pole_wrought_iron.png", + wield_image = "homedecor_pole_wrought_iron.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625} + }, + node_box = { + type = "fixed", + fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625} + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("homedecor:fence_brass", { + description = "Brass Fence/railing", + drawtype = "fencelike", + tile_images = {"homedecor_tile_brass.png"}, + inventory_image = "homedecor_fence_brass.png", + wield_image = "homedecor_pole_brass.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("homedecor:fence_wrought_iron", { + description = "Wrought Iron Fence/railing", + drawtype = "fencelike", + tile_images = {"homedecor_tile_wrought_iron.png"}, + inventory_image = "homedecor_fence_wrought_iron.png", + wield_image = "homedecor_pole_wrought_iron.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + + +minetest.register_node('homedecor:speaker', { + description = "Large Stereo Speaker", + tile_images = { 'homedecor_speaker_top.png', + 'homedecor_speaker_bottom.png', + 'homedecor_speaker_left.png', + 'homedecor_speaker_right.png', + 'homedecor_speaker_back.png', + 'homedecor_speaker_front.png'}, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node('homedecor:speaker_small', { + description = "Small Surround Speaker", + drawtype = "nodebox", + tile_images = { 'homedecor_speaker_top.png', + 'homedecor_speaker_bottom.png', + 'homedecor_speaker_left.png', + 'homedecor_speaker_right.png', + 'homedecor_speaker_back.png', + 'homedecor_speaker_front.png'}, + selection_box = { + type = "fixed", + fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } + }, + node_box = { + type = "fixed", + fixed = { -0.2, -0.5, 0, 0.2, 0, 0.4 } + }, + + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + +print("[HomeDecor] Loaded!") diff --git a/listnodes.sh b/listnodes.sh new file mode 100755 index 00000000..23320801 --- /dev/null +++ b/listnodes.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "Node listing as of "`date` > nodes.txt + +for i in *.lua; do + echo -e "\nIn $i:\n" >> nodes.txt + cat $i | grep "minetest.register_node(" | \ + sed "s/minetest.register_node(.homedecor:/homedecor:/; s/., {//" | \ + sort >> nodes.txt +done + +less nodes.txt +rm -f nodes.txt diff --git a/textures/Untitled.png b/textures/Untitled.png new file mode 100644 index 00000000..e3fc95f1 Binary files /dev/null and b/textures/Untitled.png differ diff --git a/textures/homedecor_blanktile.png b/textures/homedecor_blanktile.png new file mode 100644 index 00000000..54da3c2c Binary files /dev/null and b/textures/homedecor_blanktile.png differ diff --git a/textures/homedecor_brass_ingot.png b/textures/homedecor_brass_ingot.png new file mode 100644 index 00000000..91323ae0 Binary files /dev/null and b/textures/homedecor_brass_ingot.png differ diff --git a/textures/homedecor_ceiling_paint.png b/textures/homedecor_ceiling_paint.png new file mode 100644 index 00000000..04b7cb6f Binary files /dev/null and b/textures/homedecor_ceiling_paint.png differ diff --git a/textures/homedecor_ceiling_paint_roller.png b/textures/homedecor_ceiling_paint_roller.png new file mode 100644 index 00000000..f31317e6 Binary files /dev/null and b/textures/homedecor_ceiling_paint_roller.png differ diff --git a/textures/homedecor_ceiling_tile.png b/textures/homedecor_ceiling_tile.png new file mode 100644 index 00000000..00a20558 Binary files /dev/null and b/textures/homedecor_ceiling_tile.png differ diff --git a/textures/homedecor_drawer_large.png b/textures/homedecor_drawer_large.png new file mode 100644 index 00000000..d45cf174 Binary files /dev/null and b/textures/homedecor_drawer_large.png differ diff --git a/textures/homedecor_drawer_small.png b/textures/homedecor_drawer_small.png new file mode 100644 index 00000000..4b550333 Binary files /dev/null and b/textures/homedecor_drawer_small.png differ diff --git a/textures/homedecor_dresser_mahogany_front_left.png b/textures/homedecor_dresser_mahogany_front_left.png new file mode 100644 index 00000000..f837da30 Binary files /dev/null and b/textures/homedecor_dresser_mahogany_front_left.png differ diff --git a/textures/homedecor_dresser_mahogany_front_right.png b/textures/homedecor_dresser_mahogany_front_right.png new file mode 100644 index 00000000..7783cfce Binary files /dev/null and b/textures/homedecor_dresser_mahogany_front_right.png differ diff --git a/textures/homedecor_dresser_mahogany_inv.png b/textures/homedecor_dresser_mahogany_inv.png new file mode 100644 index 00000000..47102655 Binary files /dev/null and b/textures/homedecor_dresser_mahogany_inv.png differ diff --git a/textures/homedecor_dresser_mahogany_sides.png b/textures/homedecor_dresser_mahogany_sides.png new file mode 100644 index 00000000..5698cce4 Binary files /dev/null and b/textures/homedecor_dresser_mahogany_sides.png differ diff --git a/textures/homedecor_dresser_oak_front_left.png b/textures/homedecor_dresser_oak_front_left.png new file mode 100644 index 00000000..afe50a01 Binary files /dev/null and b/textures/homedecor_dresser_oak_front_left.png differ diff --git a/textures/homedecor_dresser_oak_front_right.png b/textures/homedecor_dresser_oak_front_right.png new file mode 100644 index 00000000..eee5b51c Binary files /dev/null and b/textures/homedecor_dresser_oak_front_right.png differ diff --git a/textures/homedecor_dresser_oak_inv.png b/textures/homedecor_dresser_oak_inv.png new file mode 100644 index 00000000..57cdd830 Binary files /dev/null and b/textures/homedecor_dresser_oak_inv.png differ diff --git a/textures/homedecor_dresser_oak_sides.png b/textures/homedecor_dresser_oak_sides.png new file mode 100644 index 00000000..d149c989 Binary files /dev/null and b/textures/homedecor_dresser_oak_sides.png differ diff --git a/textures/homedecor_exterior_door_fancy.png b/textures/homedecor_exterior_door_fancy.png new file mode 100644 index 00000000..3684fba7 Binary files /dev/null and b/textures/homedecor_exterior_door_fancy.png differ diff --git a/textures/homedecor_exterior_door_fancy_a.png b/textures/homedecor_exterior_door_fancy_a.png new file mode 100644 index 00000000..3875cf52 Binary files /dev/null and b/textures/homedecor_exterior_door_fancy_a.png differ diff --git a/textures/homedecor_exterior_door_fancy_a_r.png b/textures/homedecor_exterior_door_fancy_a_r.png new file mode 100644 index 00000000..53e01de8 Binary files /dev/null and b/textures/homedecor_exterior_door_fancy_a_r.png differ diff --git a/textures/homedecor_exterior_door_fancy_b.png b/textures/homedecor_exterior_door_fancy_b.png new file mode 100644 index 00000000..6a2a0784 Binary files /dev/null and b/textures/homedecor_exterior_door_fancy_b.png differ diff --git a/textures/homedecor_exterior_door_fancy_b_r.png b/textures/homedecor_exterior_door_fancy_b_r.png new file mode 100644 index 00000000..a7305252 Binary files /dev/null and b/textures/homedecor_exterior_door_fancy_b_r.png differ diff --git a/textures/homedecor_exterior_door_fancy_right.png b/textures/homedecor_exterior_door_fancy_right.png new file mode 100644 index 00000000..18d1c180 Binary files /dev/null and b/textures/homedecor_exterior_door_fancy_right.png differ diff --git a/textures/homedecor_fence_brass.png b/textures/homedecor_fence_brass.png new file mode 100644 index 00000000..02c2559a Binary files /dev/null and b/textures/homedecor_fence_brass.png differ diff --git a/textures/homedecor_fence_wrought_iron.png b/textures/homedecor_fence_wrought_iron.png new file mode 100644 index 00000000..e3865df5 Binary files /dev/null and b/textures/homedecor_fence_wrought_iron.png differ diff --git a/textures/homedecor_flower_pot_black_bottom.png b/textures/homedecor_flower_pot_black_bottom.png new file mode 100644 index 00000000..2e5344f3 Binary files /dev/null and b/textures/homedecor_flower_pot_black_bottom.png differ diff --git a/textures/homedecor_flower_pot_black_sides.png b/textures/homedecor_flower_pot_black_sides.png new file mode 100644 index 00000000..86c591a5 Binary files /dev/null and b/textures/homedecor_flower_pot_black_sides.png differ diff --git a/textures/homedecor_flower_pot_black_top.png b/textures/homedecor_flower_pot_black_top.png new file mode 100644 index 00000000..a112cb11 Binary files /dev/null and b/textures/homedecor_flower_pot_black_top.png differ diff --git a/textures/homedecor_flower_pot_green_bottom.png b/textures/homedecor_flower_pot_green_bottom.png new file mode 100644 index 00000000..c3d7778c Binary files /dev/null and b/textures/homedecor_flower_pot_green_bottom.png differ diff --git a/textures/homedecor_flower_pot_green_sides.png b/textures/homedecor_flower_pot_green_sides.png new file mode 100644 index 00000000..575360f4 Binary files /dev/null and b/textures/homedecor_flower_pot_green_sides.png differ diff --git a/textures/homedecor_flower_pot_green_top.png b/textures/homedecor_flower_pot_green_top.png new file mode 100644 index 00000000..4a4c502e Binary files /dev/null and b/textures/homedecor_flower_pot_green_top.png differ diff --git a/textures/homedecor_flower_pot_terracotta_bottom.png b/textures/homedecor_flower_pot_terracotta_bottom.png new file mode 100644 index 00000000..e2ba0f82 Binary files /dev/null and b/textures/homedecor_flower_pot_terracotta_bottom.png differ diff --git a/textures/homedecor_flower_pot_terracotta_sides.png b/textures/homedecor_flower_pot_terracotta_sides.png new file mode 100644 index 00000000..d1e9153d Binary files /dev/null and b/textures/homedecor_flower_pot_terracotta_sides.png differ diff --git a/textures/homedecor_flower_pot_terracotta_top.png b/textures/homedecor_flower_pot_terracotta_top.png new file mode 100644 index 00000000..730919bb Binary files /dev/null and b/textures/homedecor_flower_pot_terracotta_top.png differ diff --git a/textures/homedecor_folding_door_mahogany.png b/textures/homedecor_folding_door_mahogany.png new file mode 100644 index 00000000..0e281543 Binary files /dev/null and b/textures/homedecor_folding_door_mahogany.png differ diff --git a/textures/homedecor_folding_door_mahogany_a.png b/textures/homedecor_folding_door_mahogany_a.png new file mode 100644 index 00000000..44eaaa71 Binary files /dev/null and b/textures/homedecor_folding_door_mahogany_a.png differ diff --git a/textures/homedecor_folding_door_mahogany_a_r.png b/textures/homedecor_folding_door_mahogany_a_r.png new file mode 100644 index 00000000..d7281fa1 Binary files /dev/null and b/textures/homedecor_folding_door_mahogany_a_r.png differ diff --git a/textures/homedecor_folding_door_mahogany_b.png b/textures/homedecor_folding_door_mahogany_b.png new file mode 100644 index 00000000..4375bc97 Binary files /dev/null and b/textures/homedecor_folding_door_mahogany_b.png differ diff --git a/textures/homedecor_folding_door_mahogany_b_r.png b/textures/homedecor_folding_door_mahogany_b_r.png new file mode 100644 index 00000000..b32a36cd Binary files /dev/null and b/textures/homedecor_folding_door_mahogany_b_r.png differ diff --git a/textures/homedecor_folding_door_mahogany_right.png b/textures/homedecor_folding_door_mahogany_right.png new file mode 100644 index 00000000..61267bb3 Binary files /dev/null and b/textures/homedecor_folding_door_mahogany_right.png differ diff --git a/textures/homedecor_folding_door_oak.png b/textures/homedecor_folding_door_oak.png new file mode 100644 index 00000000..58f75f6b Binary files /dev/null and b/textures/homedecor_folding_door_oak.png differ diff --git a/textures/homedecor_folding_door_oak_a.png b/textures/homedecor_folding_door_oak_a.png new file mode 100644 index 00000000..b04bb995 Binary files /dev/null and b/textures/homedecor_folding_door_oak_a.png differ diff --git a/textures/homedecor_folding_door_oak_a_r.png b/textures/homedecor_folding_door_oak_a_r.png new file mode 100644 index 00000000..1b6099c4 Binary files /dev/null and b/textures/homedecor_folding_door_oak_a_r.png differ diff --git a/textures/homedecor_folding_door_oak_b.png b/textures/homedecor_folding_door_oak_b.png new file mode 100644 index 00000000..a6b8a73d Binary files /dev/null and b/textures/homedecor_folding_door_oak_b.png differ diff --git a/textures/homedecor_folding_door_oak_b_r.png b/textures/homedecor_folding_door_oak_b_r.png new file mode 100644 index 00000000..bb6e0c30 Binary files /dev/null and b/textures/homedecor_folding_door_oak_b_r.png differ diff --git a/textures/homedecor_folding_door_oak_right.png b/textures/homedecor_folding_door_oak_right.png new file mode 100644 index 00000000..0e27705e Binary files /dev/null and b/textures/homedecor_folding_door_oak_right.png differ diff --git a/textures/homedecor_glass_table_large.png b/textures/homedecor_glass_table_large.png new file mode 100644 index 00000000..6d441164 Binary files /dev/null and b/textures/homedecor_glass_table_large.png differ diff --git a/textures/homedecor_glass_table_small_round.png b/textures/homedecor_glass_table_small_round.png new file mode 100644 index 00000000..29b2d734 Binary files /dev/null and b/textures/homedecor_glass_table_small_round.png differ diff --git a/textures/homedecor_glass_table_small_square.png b/textures/homedecor_glass_table_small_square.png new file mode 100644 index 00000000..3b4b32fb Binary files /dev/null and b/textures/homedecor_glass_table_small_square.png differ diff --git a/textures/homedecor_nightstand_mahogany_1_drawer_front.png b/textures/homedecor_nightstand_mahogany_1_drawer_front.png new file mode 100644 index 00000000..fe49707e Binary files /dev/null and b/textures/homedecor_nightstand_mahogany_1_drawer_front.png differ diff --git a/textures/homedecor_nightstand_mahogany_2_drawer_front.png b/textures/homedecor_nightstand_mahogany_2_drawer_front.png new file mode 100644 index 00000000..b34c821c Binary files /dev/null and b/textures/homedecor_nightstand_mahogany_2_drawer_front.png differ diff --git a/textures/homedecor_nightstand_mahogany_sides.png b/textures/homedecor_nightstand_mahogany_sides.png new file mode 100644 index 00000000..cd81902f Binary files /dev/null and b/textures/homedecor_nightstand_mahogany_sides.png differ diff --git a/textures/homedecor_nightstand_oak_1_drawer_front.png b/textures/homedecor_nightstand_oak_1_drawer_front.png new file mode 100644 index 00000000..25894b32 Binary files /dev/null and b/textures/homedecor_nightstand_oak_1_drawer_front.png differ diff --git a/textures/homedecor_nightstand_oak_2_drawer_front.png b/textures/homedecor_nightstand_oak_2_drawer_front.png new file mode 100644 index 00000000..14c643bc Binary files /dev/null and b/textures/homedecor_nightstand_oak_2_drawer_front.png differ diff --git a/textures/homedecor_nightstand_oak_sides.png b/textures/homedecor_nightstand_oak_sides.png new file mode 100644 index 00000000..bec19aaf Binary files /dev/null and b/textures/homedecor_nightstand_oak_sides.png differ diff --git a/textures/homedecor_plastic_sheeting.png b/textures/homedecor_plastic_sheeting.png new file mode 100644 index 00000000..810ea2aa Binary files /dev/null and b/textures/homedecor_plastic_sheeting.png differ diff --git a/textures/homedecor_pole_brass.png b/textures/homedecor_pole_brass.png new file mode 100644 index 00000000..9658c1ad Binary files /dev/null and b/textures/homedecor_pole_brass.png differ diff --git a/textures/homedecor_pole_brass2.png b/textures/homedecor_pole_brass2.png new file mode 100644 index 00000000..e673fb01 Binary files /dev/null and b/textures/homedecor_pole_brass2.png differ diff --git a/textures/homedecor_pole_wrought_iron.png b/textures/homedecor_pole_wrought_iron.png new file mode 100644 index 00000000..23bd25da Binary files /dev/null and b/textures/homedecor_pole_wrought_iron.png differ diff --git a/textures/homedecor_projection_screen.png b/textures/homedecor_projection_screen.png new file mode 100644 index 00000000..71334037 Binary files /dev/null and b/textures/homedecor_projection_screen.png differ diff --git a/textures/homedecor_projection_screen_inv.png b/textures/homedecor_projection_screen_inv.png new file mode 100644 index 00000000..7ba41d28 Binary files /dev/null and b/textures/homedecor_projection_screen_inv.png differ diff --git a/textures/homedecor_roof_tile_terracotta.png b/textures/homedecor_roof_tile_terracotta.png new file mode 100644 index 00000000..d9ad782f Binary files /dev/null and b/textures/homedecor_roof_tile_terracotta.png differ diff --git a/textures/homedecor_rug_large.png b/textures/homedecor_rug_large.png new file mode 100644 index 00000000..9b12b6c0 Binary files /dev/null and b/textures/homedecor_rug_large.png differ diff --git a/textures/homedecor_rug_small.png b/textures/homedecor_rug_small.png new file mode 100644 index 00000000..7d53edb9 Binary files /dev/null and b/textures/homedecor_rug_small.png differ diff --git a/textures/homedecor_shingles_asphalt.png b/textures/homedecor_shingles_asphalt.png new file mode 100644 index 00000000..057546ce Binary files /dev/null and b/textures/homedecor_shingles_asphalt.png differ diff --git a/textures/homedecor_shingles_terracotta.png b/textures/homedecor_shingles_terracotta.png new file mode 100644 index 00000000..3f42cca5 Binary files /dev/null and b/textures/homedecor_shingles_terracotta.png differ diff --git a/textures/homedecor_shingles_wood.png b/textures/homedecor_shingles_wood.png new file mode 100644 index 00000000..b982747a Binary files /dev/null and b/textures/homedecor_shingles_wood.png differ diff --git a/textures/homedecor_speaker_back.png b/textures/homedecor_speaker_back.png new file mode 100644 index 00000000..a3ffb02c Binary files /dev/null and b/textures/homedecor_speaker_back.png differ diff --git a/textures/homedecor_speaker_bottom.png b/textures/homedecor_speaker_bottom.png new file mode 100644 index 00000000..b99091c4 Binary files /dev/null and b/textures/homedecor_speaker_bottom.png differ diff --git a/textures/homedecor_speaker_front.png b/textures/homedecor_speaker_front.png new file mode 100644 index 00000000..76efdbf8 Binary files /dev/null and b/textures/homedecor_speaker_front.png differ diff --git a/textures/homedecor_speaker_left.png b/textures/homedecor_speaker_left.png new file mode 100644 index 00000000..3411505e Binary files /dev/null and b/textures/homedecor_speaker_left.png differ diff --git a/textures/homedecor_speaker_right.png b/textures/homedecor_speaker_right.png new file mode 100644 index 00000000..4d87102a Binary files /dev/null and b/textures/homedecor_speaker_right.png differ diff --git a/textures/homedecor_speaker_top.png b/textures/homedecor_speaker_top.png new file mode 100644 index 00000000..b2d4c88f Binary files /dev/null and b/textures/homedecor_speaker_top.png differ diff --git a/textures/homedecor_stereo_back.png b/textures/homedecor_stereo_back.png new file mode 100644 index 00000000..1fbd885b Binary files /dev/null and b/textures/homedecor_stereo_back.png differ diff --git a/textures/homedecor_stereo_bottom.png b/textures/homedecor_stereo_bottom.png new file mode 100644 index 00000000..83f07be7 Binary files /dev/null and b/textures/homedecor_stereo_bottom.png differ diff --git a/textures/homedecor_stereo_front.png b/textures/homedecor_stereo_front.png new file mode 100644 index 00000000..81f7eab0 Binary files /dev/null and b/textures/homedecor_stereo_front.png differ diff --git a/textures/homedecor_stereo_left.png b/textures/homedecor_stereo_left.png new file mode 100644 index 00000000..99d65be7 Binary files /dev/null and b/textures/homedecor_stereo_left.png differ diff --git a/textures/homedecor_stereo_right.png b/textures/homedecor_stereo_right.png new file mode 100644 index 00000000..f7d5c9ca Binary files /dev/null and b/textures/homedecor_stereo_right.png differ diff --git a/textures/homedecor_stereo_top.png b/textures/homedecor_stereo_top.png new file mode 100644 index 00000000..a81c597d Binary files /dev/null and b/textures/homedecor_stereo_top.png differ diff --git a/textures/homedecor_table_legs_brass.png b/textures/homedecor_table_legs_brass.png new file mode 100644 index 00000000..1491b9af Binary files /dev/null and b/textures/homedecor_table_legs_brass.png differ diff --git a/textures/homedecor_table_legs_wrought_iron.png b/textures/homedecor_table_legs_wrought_iron.png new file mode 100644 index 00000000..8b571c08 Binary files /dev/null and b/textures/homedecor_table_legs_wrought_iron.png differ diff --git a/textures/homedecor_television_back.png b/textures/homedecor_television_back.png new file mode 100644 index 00000000..792f0dd1 Binary files /dev/null and b/textures/homedecor_television_back.png differ diff --git a/textures/homedecor_television_bottom.png b/textures/homedecor_television_bottom.png new file mode 100644 index 00000000..b7e58d1d Binary files /dev/null and b/textures/homedecor_television_bottom.png differ diff --git a/textures/homedecor_television_front.png b/textures/homedecor_television_front.png new file mode 100644 index 00000000..023f336d Binary files /dev/null and b/textures/homedecor_television_front.png differ diff --git a/textures/homedecor_television_left.png b/textures/homedecor_television_left.png new file mode 100644 index 00000000..e07f1e09 Binary files /dev/null and b/textures/homedecor_television_left.png differ diff --git a/textures/homedecor_television_right.png b/textures/homedecor_television_right.png new file mode 100644 index 00000000..f8713960 Binary files /dev/null and b/textures/homedecor_television_right.png differ diff --git a/textures/homedecor_television_top.png b/textures/homedecor_television_top.png new file mode 100644 index 00000000..b34a5f5a Binary files /dev/null and b/textures/homedecor_television_top.png differ diff --git a/textures/homedecor_tile_brass.png b/textures/homedecor_tile_brass.png new file mode 100644 index 00000000..f84b2db5 Binary files /dev/null and b/textures/homedecor_tile_brass.png differ diff --git a/textures/homedecor_tile_brass2.png b/textures/homedecor_tile_brass2.png new file mode 100644 index 00000000..4c6e1e98 Binary files /dev/null and b/textures/homedecor_tile_brass2.png differ diff --git a/textures/homedecor_tile_wrought_iron.png b/textures/homedecor_tile_wrought_iron.png new file mode 100644 index 00000000..a6a054db Binary files /dev/null and b/textures/homedecor_tile_wrought_iron.png differ diff --git a/textures/homedecor_tile_wrought_iron2.png b/textures/homedecor_tile_wrought_iron2.png new file mode 100644 index 00000000..3761fb8c Binary files /dev/null and b/textures/homedecor_tile_wrought_iron2.png differ diff --git a/textures/homedecor_utility_table_legs.png b/textures/homedecor_utility_table_legs.png new file mode 100644 index 00000000..74d4cfa5 Binary files /dev/null and b/textures/homedecor_utility_table_legs.png differ diff --git a/textures/homedecor_utility_table_legs_inv.png b/textures/homedecor_utility_table_legs_inv.png new file mode 100644 index 00000000..b6d2f5ba Binary files /dev/null and b/textures/homedecor_utility_table_legs_inv.png differ diff --git a/textures/homedecor_utility_table_top.png b/textures/homedecor_utility_table_top.png new file mode 100644 index 00000000..d8a74a07 Binary files /dev/null and b/textures/homedecor_utility_table_top.png differ diff --git a/textures/homedecor_window_shutter_black.png b/textures/homedecor_window_shutter_black.png new file mode 100644 index 00000000..81583aa4 Binary files /dev/null and b/textures/homedecor_window_shutter_black.png differ diff --git a/textures/homedecor_window_shutter_dark_grey.png b/textures/homedecor_window_shutter_dark_grey.png new file mode 100644 index 00000000..7c67cc79 Binary files /dev/null and b/textures/homedecor_window_shutter_dark_grey.png differ diff --git a/textures/homedecor_window_shutter_forest_green.png b/textures/homedecor_window_shutter_forest_green.png new file mode 100644 index 00000000..ae3d81d8 Binary files /dev/null and b/textures/homedecor_window_shutter_forest_green.png differ diff --git a/textures/homedecor_window_shutter_grey.png b/textures/homedecor_window_shutter_grey.png new file mode 100644 index 00000000..0c4435bb Binary files /dev/null and b/textures/homedecor_window_shutter_grey.png differ diff --git a/textures/homedecor_window_shutter_light_blue.png b/textures/homedecor_window_shutter_light_blue.png new file mode 100644 index 00000000..f27c5c2a Binary files /dev/null and b/textures/homedecor_window_shutter_light_blue.png differ diff --git a/textures/homedecor_window_shutter_mahogany.png b/textures/homedecor_window_shutter_mahogany.png new file mode 100644 index 00000000..bfc130a1 Binary files /dev/null and b/textures/homedecor_window_shutter_mahogany.png differ diff --git a/textures/homedecor_window_shutter_oak.png b/textures/homedecor_window_shutter_oak.png new file mode 100644 index 00000000..bd8db7f5 Binary files /dev/null and b/textures/homedecor_window_shutter_oak.png differ diff --git a/textures/homedecor_window_shutter_purple.png b/textures/homedecor_window_shutter_purple.png new file mode 100644 index 00000000..0e48b1d4 Binary files /dev/null and b/textures/homedecor_window_shutter_purple.png differ diff --git a/textures/homedecor_window_shutter_red.png b/textures/homedecor_window_shutter_red.png new file mode 100644 index 00000000..948d5000 Binary files /dev/null and b/textures/homedecor_window_shutter_red.png differ diff --git a/textures/homedecor_window_shutter_white.png b/textures/homedecor_window_shutter_white.png new file mode 100644 index 00000000..e0f4b190 Binary files /dev/null and b/textures/homedecor_window_shutter_white.png differ diff --git a/textures/homedecor_window_shutter_yellow.png b/textures/homedecor_window_shutter_yellow.png new file mode 100644 index 00000000..fc46a00c Binary files /dev/null and b/textures/homedecor_window_shutter_yellow.png differ diff --git a/textures/homedecor_wood_table_large.png b/textures/homedecor_wood_table_large.png new file mode 100644 index 00000000..2c5205f2 Binary files /dev/null and b/textures/homedecor_wood_table_large.png differ diff --git a/textures/homedecor_wood_table_small_round.png b/textures/homedecor_wood_table_small_round.png new file mode 100644 index 00000000..b681a00f Binary files /dev/null and b/textures/homedecor_wood_table_small_round.png differ diff --git a/textures/homedecor_wood_table_small_square.png b/textures/homedecor_wood_table_small_square.png new file mode 100644 index 00000000..c3c0ae08 Binary files /dev/null and b/textures/homedecor_wood_table_small_square.png differ