first commit
49
README
Normal file
|
@ -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.
|
6
copyright.txt
Normal file
|
@ -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.
|
BIN
crafting-guide/brass-ingot.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
crafting-guide/drawer-large.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
crafting-guide/drawer-small.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
crafting-guide/drop-ceiling-tile.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
crafting-guide/fancy-exterior-door.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
crafting-guide/fence-brass.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
crafting-guide/fence-wrought-iron.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
crafting-guide/flowerpot-black.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
crafting-guide/flowerpot-terracotta.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
crafting-guide/flowerpot_green.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
crafting-guide/folding-door-mahogany.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
crafting-guide/folding-door-oak.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
crafting-guide/glass-table-large.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
crafting-guide/glass-table-small-round.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
crafting-guide/glass-table-small-square.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
crafting-guide/nightstand-mahogany-one-drawer.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
crafting-guide/nightstand-mahogany-two-drawers.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
crafting-guide/nightstand-oak-one-drawer.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
crafting-guide/nightstand-oak-two-drawers.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
crafting-guide/nightstand-one-drawer.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
crafting-guide/nightstand-two-drawers.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
crafting-guide/plastic-sheeting.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
crafting-guide/pole-brass.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
crafting-guide/pole-wrought-iron.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
crafting-guide/projection-screen-material.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
crafting-guide/rug-large.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/rug-small.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
crafting-guide/shingles-asphalt.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
crafting-guide/shingles-terracotta.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
crafting-guide/shingles-wood.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
crafting-guide/shutter-black.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
crafting-guide/shutter-dark-grey.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/shutter-green.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
crafting-guide/shutter-grey.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/shutter-light-blue.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
crafting-guide/shutter-mahogany.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/shutter-oak.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
crafting-guide/shutter-purple.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/shutter-red.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/shutter-white.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/shutter-yellow.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
crafting-guide/skylight.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
crafting-guide/speaker-small.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
crafting-guide/speaker.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
crafting-guide/stereo.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
crafting-guide/table-legs-brass.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
crafting-guide/table-legs-wrought-iron.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
crafting-guide/television.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
crafting-guide/terracotta-tile.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
crafting-guide/textured-ceiling-paint.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
crafting-guide/utility-table-legs.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
crafting-guide/wood-tabletop-large.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
crafting-guide/wood-tabletop-small-round.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
crafting-guide/wood-tabletop-small-square.png
Normal file
After Width: | Height: | Size: 28 KiB |
766
crafts.lua
Normal file
|
@ -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
|
||||
|
||||
|
||||
|
766
crafts.lua~
Normal file
|
@ -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
|
||||
|
||||
|
||||
|
1
depends.txt
Normal file
|
@ -0,0 +1 @@
|
|||
default
|
427
exterior_door_fancy.lua
Normal file
|
@ -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,
|
||||
})
|
442
exterior_door_fancy.lua~
Normal file
|
@ -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
|
442
foldingdoors_mahogany.lua
Normal file
|
@ -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
|
442
foldingdoors_mahogany.lua~
Normal file
|
@ -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
|
420
foldingdoors_oak.lua
Normal file
|
@ -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,
|
||||
})
|
985
init.lua
Normal file
|
@ -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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
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!")
|
984
init.lua~
Normal file
|
@ -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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = <default>
|
||||
--wall_bottom = <default>
|
||||
--wall_side = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
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 = = <default>
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
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!")
|
13
listnodes.sh
Executable file
|
@ -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
|
BIN
textures/Untitled.png
Normal file
After Width: | Height: | Size: 561 B |
BIN
textures/homedecor_blanktile.png
Normal file
After Width: | Height: | Size: 115 B |
BIN
textures/homedecor_brass_ingot.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
textures/homedecor_ceiling_paint.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
textures/homedecor_ceiling_paint_roller.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
textures/homedecor_ceiling_tile.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
textures/homedecor_drawer_large.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
textures/homedecor_drawer_small.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
textures/homedecor_dresser_mahogany_front_left.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_dresser_mahogany_front_right.png
Normal file
After Width: | Height: | Size: 641 B |
BIN
textures/homedecor_dresser_mahogany_inv.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
textures/homedecor_dresser_mahogany_sides.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
textures/homedecor_dresser_oak_front_left.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
textures/homedecor_dresser_oak_front_right.png
Normal file
After Width: | Height: | Size: 763 B |
BIN
textures/homedecor_dresser_oak_inv.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
textures/homedecor_dresser_oak_sides.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/homedecor_exterior_door_fancy.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
textures/homedecor_exterior_door_fancy_a.png
Normal file
After Width: | Height: | Size: 753 B |
BIN
textures/homedecor_exterior_door_fancy_a_r.png
Normal file
After Width: | Height: | Size: 749 B |
BIN
textures/homedecor_exterior_door_fancy_b.png
Normal file
After Width: | Height: | Size: 719 B |
BIN
textures/homedecor_exterior_door_fancy_b_r.png
Normal file
After Width: | Height: | Size: 719 B |
BIN
textures/homedecor_exterior_door_fancy_right.png
Normal file
After Width: | Height: | Size: 515 B |
BIN
textures/homedecor_fence_brass.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
textures/homedecor_fence_wrought_iron.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
textures/homedecor_flower_pot_black_bottom.png
Normal file
After Width: | Height: | Size: 292 B |
BIN
textures/homedecor_flower_pot_black_sides.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
textures/homedecor_flower_pot_black_top.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
textures/homedecor_flower_pot_green_bottom.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
textures/homedecor_flower_pot_green_sides.png
Normal file
After Width: | Height: | Size: 447 B |
BIN
textures/homedecor_flower_pot_green_top.png
Normal file
After Width: | Height: | Size: 699 B |
BIN
textures/homedecor_flower_pot_terracotta_bottom.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
textures/homedecor_flower_pot_terracotta_sides.png
Normal file
After Width: | Height: | Size: 458 B |
BIN
textures/homedecor_flower_pot_terracotta_top.png
Normal file
After Width: | Height: | Size: 700 B |