Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2022-05-27 18:34:18 +02:00
commit d667e39851
125 changed files with 2630 additions and 2635 deletions

11
.github/workflows/luacheck.yml vendored Normal file
View File

@ -0,0 +1,11 @@
name: luacheck
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: Roang-zero1/factorio-mod-luacheck@master
with:
luacheckrc_url: ""

42
.luacheckrc Normal file
View File

@ -0,0 +1,42 @@
unused_args = false
globals = {
"homedecor",
"homedecor_lighting",
"homedecor_windows_and_treatments",
"homedecor_roofing",
"homedecor_misc",
"homedecor_exterior",
"homedecor_electrical",
"homedecor_cobweb",
"lavalamp",
"lrfurn",
"signs_lib",
"homedecor_doors_and_gates",
-- mod-deps
"armor"
}
read_globals = {
"minetest", "core",
"vector", "ItemStack",
"dump",
-- Stdlib
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},
-- mod-deps
"default",
"unifieddyes",
"player_api",
"screwdriver",
"hopper",
"mesecon",
"skins",
"stairsplus",
"creative",
"doors",
"i3",
}

8
README
View File

@ -1,8 +0,0 @@
This is what I consider to be a fairly feature-filled home decor modpack.
See the forum thread at
https://forum.minetest.net/viewtopic.php?f=11&t=2041 for details about
this modpack.
Dependencies: unifieddyes and a Minetest engine build newer than 2017-01-23.
Recommends: signs_lib, windmill, moreblocks, unified_inventory.

31
README.md Normal file
View File

@ -0,0 +1,31 @@
# Minetest Homedecor Modpack
[![ContentDB](https://content.minetest.net/packages/VanessaE/homedecor_modpack/shields/downloads/)](https://content.minetest.net/packages/VanessaE/homedecor_modpack/)
A fairly feature-filled home decor modpack that is game agnostic.
## About
first class support for:
* Minetest Game
* Farlands Reloaded
* Hades
* Mineclone2, Mineclone5
## Links
* [Github](https://github.com/mt-mods/homedecor_modpack)
* [Contentdb](https://content.minetest.net/packages/VanessaE/homedecor_modpack/)
* [Forums](https://forum.minetest.net/viewtopic.php?f=11&t=2041)
# Setup
required:
* [Unifieddyes](https://github.com/mt-mods/unifieddyes)
* [Basic Materials](https://github.com/mt-mods/basic_materials)
optional:
* [Sound Api](https://github.com/mt-mods/sound_api) - note: needed for sound support

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"stairsplus",
"default",
"stairs",
}
globals = {
}

View File

@ -40,8 +40,10 @@ if not minetest.get_modpath("technic") then
description = S("Granite"),
tiles = { "technic_granite.png" },
is_ground_content = true,
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=1, dig_stone=2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
minetest.register_craft({
output = "technic:granite 9",

View File

@ -1,3 +1,3 @@
name = building_blocks
depends = default
optional_depends = moreblocks, gloopblocks, stairs
depends = homedecor_common
optional_depends = moreblocks, gloopblocks, stairs, default

View File

@ -21,8 +21,10 @@ building_blocks_stairs("building_blocks:grate", {
sunlight_propagates = true,
is_ground_content = true,
use_texture_alpha = "clip",
groups = {cracky=1},
sounds = default.node_sound_metal_defaults(),
groups = {cracky=1, dig_generic=3},
_sound_def = {
key = "node_sound_metal_defaults",
},
})
building_blocks_stairs("building_blocks:smoothglass", {
drawtype = "glasslike",
@ -33,7 +35,9 @@ building_blocks_stairs("building_blocks:smoothglass", {
is_ground_content = true,
use_texture_alpha = "clip",
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
})
building_blocks_stairs("building_blocks:woodglass", {
drawtype = "glasslike",
@ -44,52 +48,68 @@ building_blocks_stairs("building_blocks:woodglass", {
is_ground_content = true,
use_texture_alpha = "clip",
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
})
building_blocks_stairs("building_blocks:Adobe", {
tiles = {"building_blocks_Adobe.png"},
description = S("Adobe"),
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_stone_defaults(),
groups = {crumbly=3, dig_stone=2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
local grasstex = {"[combine:16x16^[noalpha^[colorize:#006400"}
if minetest.get_modpath("default") then
grasstex = minetest.registered_nodes["default:dirt_with_grass"].tiles
end
building_blocks_stairs("building_blocks:fakegrass", {
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
tiles = grasstex,
description = S("Fake Grass"),
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
groups = {crumbly=3, dig_sand=3},
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
building_blocks_stairs("building_blocks:hardwood", {
tiles = {"building_blocks_hardwood.png"},
is_ground_content = true,
description = S("Hardwood"),
groups = {choppy=1,flammable=1},
sounds = default.node_sound_wood_defaults(),
groups = {choppy=1,flammable=1, dig_tree=1},
_sound_def = {
key = "node_sound_wood_defaults",
},
})
building_blocks_stairs("building_blocks:Roofing", {
tiles = {"building_blocks_Roofing.png"},
is_ground_content = true,
description = S("Roof block"),
groups = {snappy=3},
sounds = default.node_sound_stone_defaults(),
groups = {snappy=3, dig_generic=4},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
building_blocks_stairs("building_blocks:Tar", {
description = S("Tar"),
tiles = {"building_blocks_tar.png"},
is_ground_content = true,
groups = {crumbly=1, tar_block = 1},
sounds = default.node_sound_stone_defaults(),
groups = {crumbly=1, tar_block = 1, dig_generic=4},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
building_blocks_stairs("building_blocks:Marble", {
description = S("Marble"),
tiles = {"building_blocks_marble.png"},
is_ground_content = true,
groups = {cracky=3, marble = 1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, marble = 1, dig_stone=2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
minetest.register_node("building_blocks:brobble_spread", {
@ -103,34 +123,37 @@ minetest.register_node("building_blocks:brobble_spread", {
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, dig_generic=4},
})
if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopblocks") then
local graveltex = "[combine:16x16^[noalpha^[colorize:#3a3b3c"
if minetest.get_modpath("default") then
graveltex = "default_gravel.png"
end
minetest.register_node("building_blocks:gravel_spread", {
drawtype = "raillike",
description = S("Gravel Spread"),
tiles = {"default_gravel.png"},
tiles = {graveltex},
inventory_image = "building_blocks_gravel_spread_inv.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=2},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0},
}),
groups = {crumbly=2, dig_generic=4},
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
end
@ -143,13 +166,15 @@ minetest.register_node("building_blocks:Tarmac_spread", {
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_dirt_defaults(),
groups = {cracky=3, dig_generic=4},
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
minetest.register_node("building_blocks:terrycloth_towel", {
drawtype = "raillike",
@ -160,12 +185,12 @@ minetest.register_node("building_blocks:terrycloth_towel", {
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, dig_generic=4},
})
minetest.register_node("building_blocks:BWtile", {
@ -188,7 +213,7 @@ minetest.register_node("building_blocks:BWtile", {
},
sunlight_propagates = true,
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, dig_generic=4},
})
minetest.register_node("building_blocks:Fireplace", {
@ -201,9 +226,11 @@ minetest.register_node("building_blocks:Fireplace", {
},
paramtype = "light",
paramtype2 = "facedir",
light_source = default.LIGHT_MAX,
light_source = minetest.LIGHT_MAX,
sunlight_propagates = true,
is_ground_content = true,
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=2, dig_generic=4},
_sound_def = {
key = "node_sound_stone_defaults",
},
})

View File

@ -1,3 +1,5 @@
local materials = homedecor.materials
if minetest.get_modpath("moreblocks") then
minetest.register_craft({
output = 'building_blocks:sticks 2',
@ -20,15 +22,15 @@ end
minetest.register_craft({
output = 'building_blocks:Adobe 3',
recipe = {
{"default:sand"},
{"default:clay"},
{materials.sand},
{materials.clay_lump},
{"group:stick"},
}
})
minetest.register_craft({
output = 'building_blocks:brobble_spread 4',
recipe = {
{"default:brick", "default:cobble", "default:brick"},
{materials.brick, materials.cobble, materials.brick},
}
})
minetest.register_craft({
@ -42,20 +44,20 @@ minetest.register_craft({
output = 'building_blocks:fakegrass 2',
recipe = {
{'group:leaves'},
{"default:dirt"},
{materials.dirt},
}
})
minetest.register_craft({
output = 'building_blocks:Fireplace 1',
recipe = {
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
{materials.steel_ingot, "building_blocks:sticks", materials.steel_ingot},
}
})
minetest.register_craft({
output = 'building_blocks:grate 1',
recipe = {
{"default:steel_ingot", "default:steel_ingot"},
{"default:glass", "default:glass"},
{materials.steel_ingot, materials.steel_ingot},
{materials.glass_block, materials.glass_block},
}
})
@ -63,25 +65,27 @@ if not minetest.get_modpath("moreblocks") or not minetest.get_modpath("gloopbloc
minetest.register_craft({
output = 'building_blocks:gravel_spread 4',
recipe = {
{"default:gravel", "default:gravel", "default:gravel"},
{materials.gravel, materials.gravel, materials.gravel},
}
})
end
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:wood", "default:junglewood"},
{"default:junglewood", "default:wood"},
}
})
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:junglewood", "default:wood"},
{"default:wood", "default:junglewood"},
}
})
if minetest.get_modpath("default") then
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:wood", "default:junglewood"},
{"default:junglewood", "default:wood"},
}
})
minetest.register_craft({
output = 'building_blocks:hardwood 2',
recipe = {
{"default:junglewood", "default:wood"},
{"default:wood", "default:junglewood"},
}
})
end
minetest.register_craft({
output = 'building_blocks:knife 1',
recipe = {
@ -92,9 +96,9 @@ minetest.register_craft({
minetest.register_craft({
output = "building_blocks:Marble 9",
recipe = {
{"default:clay", "group:tar_block", "default:clay"},
{"group:tar_block","default:clay", "group:tar_block"},
{"default:clay", "group:tar_block","default:clay"},
{materials.clay_lump, "group:tar_block", materials.clay_lump},
{"group:tar_block",materials.clay_lump, "group:tar_block"},
{materials.clay_lump, "group:tar_block",materials.clay_lump},
}
})
minetest.register_craft({
@ -113,15 +117,15 @@ minetest.register_craft({
minetest.register_craft({
output = 'building_blocks:tar_base 4',
recipe = {
{"default:coal_lump", "default:gravel"},
{"default:gravel", "default:coal_lump"}
{materials.coal_lump, materials.gravel},
{materials.gravel, materials.coal_lump}
}
})
minetest.register_craft({
output = 'building_blocks:tar_base 4',
recipe = {
{"default:gravel", "default:coal_lump"},
{"default:coal_lump", "default:gravel"}
{materials.gravel, materials.coal_lump},
{materials.coal_lump, materials.gravel}
}
})
minetest.register_craft({
@ -140,14 +144,14 @@ minetest.register_craft({
output = 'building_blocks:woodglass 1',
recipe = {
{"group:wood"},
{"default:glass"},
{materials.glass_block},
}
})
minetest.register_craft({
type = "cooking",
output = "building_blocks:smoothglass",
recipe = "default:glass"
recipe = materials.glass_block
})
minetest.register_craft({
type = "cooking",

View File

@ -1,19 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
}
globals = {
}

View File

@ -142,7 +142,7 @@ minetest.register_node("fake_fire:ice_fire", {
drawtype = "plantlike",
paramtype = "light",
paramtype2 = "facedir",
groups = {dig_immediate=3, not_in_creative_inventory=1},
groups = {dig_immediate=3, not_in_creative_inventory=1, dig_generic=3},
sunlight_propagates = true,
buildable_to = true,
walkable = false,
@ -172,6 +172,8 @@ local sbox = {
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16},
}
local wtex = homedecor.textures.default_junglewood
minetest.register_node("fake_fire:fancy_fire", {
inventory_image = "fancy_fire_inv.png",
description = S("Fancy Fire"),
@ -189,7 +191,7 @@ minetest.register_node("fake_fire:fancy_fire", {
selection_box = sbox,
tiles = {
"basic_materials_concrete_block.png",
"default_junglewood.png",
wtex,
"fake_fire_empty_tile.png"
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
@ -224,25 +226,41 @@ minetest.register_node("fake_fire:embers", {
aspect_w=16, aspect_h=16, length=2}},
},
light_source = 9,
groups = {crumbly=3},
groups = {crumbly=3, dig_stone=2},
paramtype = "light",
sounds = default.node_sound_dirt_defaults(),
_sound_def = {
key = "node_sound_dirt_defaults",
},
})
local sandstone_tex = "default_sandstone.png"
if not minetest.get_modpath("default") then
local sname = minetest.registered_nodes["mapgen_stone"].name
local names = sname:split(":")
local nitem = names[2] and string.gsub(names[2], "stone", "sandstone") or nil
if nitem and minetest.registered_nodes[names[1]..":"..nitem] then
sandstone_tex = minetest.registered_nodes[names[1]..":"..nitem].tiles[1]
else
sandstone_tex = "[combine:16x16^[noalpha^[colorize:#fefebe"
end
end
-- CHIMNEYS
local materials = {
{ "stone", S("Stone chimney top") },
{ "sandstone", S("Sandstone chimney top") },
{ "stone", S("Stone chimney top"), minetest.registered_nodes["mapgen_stone"].tiles[1] },
{ "sandstone", S("Sandstone chimney top"), sandstone_tex },
}
for _, mat in ipairs(materials) do
local name, desc = unpack(mat)
local name, desc, tex = unpack(mat)
minetest.register_node("fake_fire:chimney_top_"..name, {
description = desc,
tiles = {"default_"..name..".png^chimney_top.png", "default_"..name..".png"},
groups = {snappy=3},
tiles = {tex.."^chimney_top.png", tex},
groups = {snappy=3, dig_stone=2},
paramtype = "light",
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
drawtype = "nodebox",
node_box = {
type = "fixed",
@ -258,37 +276,42 @@ for _, mat in ipairs(materials) do
end
})
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:chimney_top_'..name,
recipe = {"default:torch", "stairs:slab_"..name}
})
if minetest.get_modpath("default") then
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:chimney_top_'..name,
recipe = {"default:torch", "stairs:slab_"..name}
})
end
end
minetest.register_alias("fake_fire:flint_and_steel", "fire:flint_and_steel")
minetest.override_item("default:ice", {
on_ignite = function(pos, igniter)
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
if minetest.get_node(flame_pos).name == "air" then
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"})
if minetest.get_modpath("default") then
minetest.override_item("default:ice", {
on_ignite = function(pos, igniter)
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
if minetest.get_node(flame_pos).name == "air" then
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"})
end
end
end
})
})
end
-- CRAFTS
if minetest.get_modpath("default") then
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:embers',
recipe = {"default:torch", "group:wood", "default:torch"}
})
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:embers',
recipe = {"default:torch", "group:wood", "default:torch"}
})
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:fancy_fire',
recipe = {"default:torch", "building_blocks:sticks", "default:torch" }
})
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:fancy_fire',
recipe = {"default:torch", "building_blocks:sticks", "default:torch" }
})
end
-- ALIASES

View File

@ -1,2 +1,2 @@
name = fake_fire
depends = default, basic_materials
depends = homedecor_common

View File

@ -1,18 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
}
globals = {
}

View File

@ -1,14 +1,16 @@
minetest.override_item("default:bookshelf", {
drawtype = "mesh",
mesh = "homedecor_3d_bookshelf.obj",
tiles = {
"default_wood.png",
"default_wood.png^homedecor_3d_bookshelf_inside_back.png",
"homedecor_3d_bookshelf_books.png",
},
paramtype = "light",
paramtype2 = "facedir",
})
if minetest.get_modpath("default") then
minetest.override_item("default:bookshelf", {
drawtype = "mesh",
mesh = "homedecor_3d_bookshelf.obj",
tiles = {
"default_wood.png",
"default_wood.png^homedecor_3d_bookshelf_inside_back.png",
"homedecor_3d_bookshelf_books.png",
},
paramtype = "light",
paramtype2 = "facedir",
})
end
if minetest.get_modpath("vessels") then
minetest.override_item("vessels:shelf", {

View File

@ -1,4 +1,3 @@
name = homedecor_3d_extras
description = Homedecor Mod: 3d extras
depends = default
optional_depends = vessels, moreblocks, doors
optional_depends = vessels, moreblocks, doors, default

View File

@ -1,22 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"screwdriver",
"unifieddyes",
}
globals = {
}

View File

@ -2,7 +2,10 @@ local S = minetest.get_translator("homedecor_bathroom")
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
minetest.register_node(":homedecor:bathroom_tiles_dark", {
local wood_tex = homedecor.textures.default_wood
local water_tex = homedecor.textures.water
homedecor.register("bathroom_tiles_dark", {
description = S("Bathroom/kitchen tiles (dark)"),
tiles = {
"homedecor_bathroom_tiles_bg.png"
@ -13,13 +16,24 @@ minetest.register_node(":homedecor:bathroom_tiles_dark", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, ud_param2_colorable = 1, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
crafts = {
{
output = "homedecor:bathroom_tiles_dark 4",
recipe = {
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye_dark_grey" }
},
}
}
})
minetest.register_node(":homedecor:bathroom_tiles_medium", {
homedecor.register("bathroom_tiles_medium", {
description = S("Bathroom/kitchen tiles (medium)"),
tiles = {
"homedecor_bathroom_tiles_bg.png"
@ -30,13 +44,24 @@ minetest.register_node(":homedecor:bathroom_tiles_medium", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, ud_param2_colorable = 1, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
crafts = {
{
output = "homedecor:bathroom_tiles_medium 4",
recipe = {
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye_grey" }
},
}
}
})
minetest.register_node(":homedecor:bathroom_tiles_light", {
homedecor.register("bathroom_tiles_light", {
description = S("Bathroom/kitchen tiles (light)"),
tiles = {
"homedecor_bathroom_tiles_bg.png"
@ -47,10 +72,21 @@ minetest.register_node(":homedecor:bathroom_tiles_light", {
paramtype = "light",
paramtype2 = "color",
palette = "unifieddyes_palette_extended.png",
groups = {cracky=3, ud_param2_colorable = 1},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, ud_param2_colorable = 1, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig,
crafts = {
{
output = "homedecor:bathroom_tiles_light 4",
recipe = {
{ "group:marble", "group:marble" },
{ "group:marble", "group:marble" }
},
}
}
})
local tr_cbox = {
@ -63,20 +99,30 @@ homedecor.register("towel_rod", {
mesh = "homedecor_towel_rod.obj",
tiles = {
"homedecor_generic_terrycloth.png",
"default_wood.png",
wood_tex,
},
inventory_image = "homedecor_towel_rod_inv.png",
selection_box = tr_cbox,
walkable = false,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
sounds = default.node_sound_defaults(),
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,dig_tree=2},
_sound_def = {
key = "node_sound_defaults",
},
crafts = {
{
recipe = {
{ "group:wood", "group:stick", "group:wood" },
{ "", "building_blocks:terrycloth_towel", "" },
},
}
}
})
homedecor.register("medicine_cabinet", {
description = S("Medicine cabinet"),
mesh = "homedecor_medicine_cabinet.obj",
tiles = {
'default_wood.png',
wood_tex,
'homedecor_medicine_cabinet_mirror.png'
},
inventory_image = "homedecor_medicine_cabinet_inv.png",
@ -85,8 +131,10 @@ homedecor.register("medicine_cabinet", {
fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
},
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_stone = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
on_punch = function(pos, node, puncher, pointed_thing)
node.name = "homedecor:medicine_cabinet_open"
minetest.swap_node(pos, node)
@ -99,12 +147,21 @@ homedecor.register("medicine_cabinet", {
inventory = {
size=6,
},
crafts = {
{
recipe = {
{ "group:stick", "glass_block", "group:stick" },
{ "group:stick", "glass_block", "group:stick" },
{ "group:stick", "glass_block", "group:stick" }
},
}
}
})
homedecor.register("medicine_cabinet_open", {
mesh = "homedecor_medicine_cabinet_open.obj",
tiles = {
'default_wood.png',
wood_tex,
'homedecor_medicine_cabinet_mirror.png',
'homedecor_medicine_cabinet_inside.png'
},
@ -113,7 +170,7 @@ homedecor.register("medicine_cabinet_open", {
fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
},
walkable = false,
groups = { snappy = 3, not_in_creative_inventory=1 },
groups = { snappy = 3, not_in_creative_inventory=1, dig_stone = 2 },
drop = "homedecor:medicine_cabinet",
on_punch = function(pos, node, puncher, pointed_thing)
node.name = "homedecor:medicine_cabinet"
@ -151,12 +208,23 @@ homedecor.register("toilet", {
},
selection_box = toilet_sbox,
node_box = toilet_cbox,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "homedecor:toilet_open"
minetest.set_node(pos, node)
end
end,
crafts = {
{
recipe = {
{ "","","water_bucket"},
{ "group:marble","group:marble", "group:marble" },
{ "", "empty_bucket", "" },
},
}
}
})
homedecor.register("toilet_open", {
@ -165,14 +233,17 @@ homedecor.register("toilet_open", {
"building_blocks_marble.png",
"building_blocks_marble.png",
"building_blocks_marble.png",
"default_water.png",
water_tex,
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
},
selection_box = toilet_sbox,
collision_box = toilet_cbox,
drop = "homedecor:toilet",
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
use_texture_alpha = "blend",
groups = {cracky=3, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "homedecor:toilet"
minetest.set_node(pos, node)
@ -196,13 +267,24 @@ homedecor.register("toilet_paper", {
mesh = "homedecor_toilet_paper.obj",
tiles = {
"homedecor_generic_quilted_paper.png",
"default_wood.png"
wood_tex
},
inventory_image = "homedecor_toilet_paper_inv.png",
selection_box = tp_cbox,
walkable = false,
groups = {snappy=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_defaults(),
groups = {snappy=3,oddly_breakable_by_hand=3, dig_stone = 2},
_sound_def = {
key = "node_sound_defaults",
},
crafts = {
{
recipe = {
{ "", "paper", "paper" },
{ "group:wood", "group:stick", "paper" },
{ "", "paper", "paper" },
},
}
}
})
--Sink
@ -229,16 +311,27 @@ homedecor.register("sink", {
tiles = {
"building_blocks_marble.png",
"building_blocks_marble.png",
"default_water.png"
water_tex
},
use_texture_alpha = "blend",
inventory_image="homedecor_bathroom_sink_inv.png",
selection_box = sink_sbox,
collision_box = sink_cbox,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_destruct = function(pos)
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z})
end
end,
crafts = {
{
recipe = {
{ "group:marble","empty_bucket", "group:marble" },
{ "", "group:marble", "" }
},
}
}
})
--Taps
@ -277,11 +370,20 @@ homedecor.register("taps", {
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
},
walkable = false,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = taps_on_rightclick,
on_destruct = homedecor.stop_particle_spawner,
on_rotate = sc_disallow or nil
on_rotate = sc_disallow or nil,
crafts = {
{
recipe = {
{ "steel_ingot","water_bucket", "steel_ingot" },
},
}
}
})
homedecor.register("taps_brass", {
@ -300,11 +402,20 @@ homedecor.register("taps_brass", {
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
},
walkable = false,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = taps_on_rightclick,
on_destruct = homedecor.stop_particle_spawner,
on_rotate = sc_disallow or nil,
crafts = {
{
recipe = {
{ "basic_materials:brass_ingot","water_bucket", "basic_materials:brass_ingot" },
},
}
}
})
--Shower Tray
@ -326,12 +437,21 @@ homedecor.register("shower_tray", {
},
},
selection_box = homedecor.nodebox.slab_y(0.1),
groups = {cracky=2},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=2, dig_stone = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
on_destruct = function(pos)
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+2, z=pos.z}) -- the showerhead
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z}) -- the taps, if any
end
end,
crafts = {
{
recipe = {
{ "group:marble","empty_bucket", "group:marble" },
},
}
}
})
--Shower Head
@ -351,7 +471,7 @@ homedecor.register("shower_head", {
},
inventory_image = "homedecor_shower_head_inv.png",
description = S("Shower Head"),
groups = {snappy=3},
groups = {snappy=3, dig_stone = 2},
selection_box = sh_cbox,
walkable = false,
on_rotate = sc_disallow or nil,
@ -374,7 +494,14 @@ homedecor.register("shower_head", {
end,
on_destruct = function(pos)
homedecor.stop_particle_spawner(pos)
end
end,
crafts = {
{
recipe = {
{"steel_ingot", "water_bucket"},
},
}
}
})
local tub_sbox = {
@ -410,10 +537,21 @@ homedecor.register("bathtub_clawfoot_brass_taps", {
"homedecor_bathtub_clawfoot_bottom_inside.png",
},
description = S("Bathtub, clawfoot, with brass taps"),
groups = {cracky=3},
groups = {cracky=3, dig_stone = 2},
selection_box = tub_sbox,
node_box = tub_cbox,
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
crafts = {
{
recipe = {
{ "homedecor:taps_brass", "", "" },
{ "group:marble", "", "group:marble" },
{ "steel_ingot", "group:marble", "steel_ingot"},
},
}
}
})
homedecor.register("bathtub_clawfoot_chrome_taps", {
@ -428,10 +566,21 @@ homedecor.register("bathtub_clawfoot_chrome_taps", {
"homedecor_bathtub_clawfoot_bottom_inside.png",
},
description = S("Bathtub, clawfoot, with chrome taps"),
groups = {cracky=3},
groups = {cracky=3, dig_stone = 2},
selection_box = tub_sbox,
node_box = tub_cbox,
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
crafts = {
{
recipe = {
{ "homedecor:taps", "", "" },
{ "group:marble", "", "group:marble" },
{"steel_ingot", "group:marble", "steel_ingot"},
},
}
}
})
local bs_cbox = {
@ -451,10 +600,21 @@ homedecor.register("bathroom_set", {
},
inventory_image = "homedecor_bathroom_set_inv.png",
description = S("Bathroom sundries set"),
groups = {snappy=3},
groups = {snappy=3, dig_stone = 2},
selection_box = bs_cbox,
walkable = false,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
crafts = {
{
recipe = {
{ "", "homedecor:glass_table_small_round", "" },
{ "basic_materials:plastic_sheet", "homedecor:glass_table_small_round", "basic_materials:plastic_sheet" },
{ "group:stick", "basic_materials:plastic_sheet", "group:stick" }
},
}
}
})
-- aliases
@ -526,45 +686,7 @@ minetest.register_lbm({
end
})
-- crafting
minetest.register_craft({
output = "homedecor:towel_rod",
recipe = {
{ "group:wood", "group:stick", "group:wood" },
{ "", "building_blocks:terrycloth_towel", "" },
},
})
minetest.register_craft({
output = "homedecor:toilet_paper",
recipe = {
{ "", "default:paper", "default:paper" },
{ "group:wood", "group:stick", "default:paper" },
{ "", "default:paper", "default:paper" },
},
})
minetest.register_craft({
output = "homedecor:medicine_cabinet",
recipe = {
{ "group:stick", "default:glass", "group:stick" },
{ "group:stick", "default:glass", "group:stick" },
{ "group:stick", "default:glass", "group:stick" }
},
})
-- bathroom/kitchen tiles
minetest.register_craft( {
output = "homedecor:bathroom_tiles_light 4",
recipe = {
{ "group:marble", "group:marble" },
{ "group:marble", "group:marble" }
},
})
-- color crafting
unifieddyes.register_color_craft({
output = "homedecor:bathroom_tiles_light",
@ -577,14 +699,6 @@ unifieddyes.register_color_craft({
}
})
minetest.register_craft( {
output = "homedecor:bathroom_tiles_medium 4",
recipe = {
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye:grey" }
},
})
unifieddyes.register_color_craft({
output = "homedecor:bathroom_tiles_medium",
palette = "extended",
@ -596,14 +710,6 @@ unifieddyes.register_color_craft({
}
})
minetest.register_craft( {
output = "homedecor:bathroom_tiles_dark 4",
recipe = {
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye:dark_grey" }
},
})
unifieddyes.register_color_craft({
output = "homedecor:bathroom_tiles_dark",
palette = "extended",
@ -615,75 +721,3 @@ unifieddyes.register_color_craft({
}
})
minetest.register_craft({
output = "homedecor:bathroom_set",
recipe = {
{ "", "homedecor:glass_table_small_round", "" },
{ "basic_materials:plastic_sheet", "homedecor:glass_table_small_round", "basic_materials:plastic_sheet" },
{ "group:stick", "basic_materials:plastic_sheet", "group:stick" }
},
})
minetest.register_craft({
output = "homedecor:toilet",
recipe = {
{ "","","bucket:bucket_water"},
{ "group:marble","group:marble", "group:marble" },
{ "", "bucket:bucket_empty", "" },
},
})
minetest.register_craft({
output = "homedecor:sink",
recipe = {
{ "group:marble","bucket:bucket_empty", "group:marble" },
{ "", "group:marble", "" }
},
})
minetest.register_craft({
output = "homedecor:taps",
recipe = {
{ "default:steel_ingot","bucket:bucket_water", "default:steel_ingot" },
},
})
minetest.register_craft({
output = "homedecor:taps_brass",
recipe = {
{ "basic_materials:brass_ingot","bucket:bucket_water", "basic_materials:brass_ingot" },
},
})
minetest.register_craft({
output = "homedecor:shower_tray",
recipe = {
{ "group:marble","bucket:bucket_empty", "group:marble" },
},
})
minetest.register_craft({
output = "homedecor:shower_head",
recipe = {
{"default:steel_ingot", "bucket:bucket_water"},
},
})
minetest.register_craft({
output = "homedecor:bathtub_clawfoot_brass_taps",
recipe = {
{ "homedecor:taps_brass", "", "" },
{ "group:marble", "", "group:marble" },
{ "default:steel_ingot", "group:marble", "default:steel_ingot"},
},
})
minetest.register_craft({
output = "homedecor:bathtub_clawfoot_chrome_taps",
recipe = {
{ "homedecor:taps", "", "" },
{ "group:marble", "", "group:marble" },
{"default:steel_ingot", "group:marble", "default:steel_ingot"},
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_bathroom
description = Homedecor mod: bathroom
depends = homedecor_common, default, basic_materials, unifieddyes, building_blocks
optional_depends = bucket, homedecor_fences, screwdriver
depends = homedecor_common
optional_depends = bucket, homedecor_fences, screwdriver, default, basic_materials, unifieddyes, building_blocks

View File

@ -1,22 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"screwdriver",
"unifieddyes",
}
globals = {
}

View File

@ -2,6 +2,8 @@ local S = minetest.get_translator("homedecor_bedroom")
local sc_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
local wood_tex, wool_tex = homedecor.textures.default_wood, homedecor.textures.wool_white
local bed_sbox = {
type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, 0.5, 0.5, 1.5 }
@ -31,26 +33,29 @@ local kbed_cbox = {
}
local bed_on_rightclick = minetest.registered_nodes["beds:bed"].on_rightclick
local bed_def = minetest.registered_nodes["beds:bed"]
local bed_on_rightclick = bed_def and bed_def.on_rightclick or nil
homedecor.register("bed_regular", {
mesh = "homedecor_bed_regular.obj",
tiles = {
{ name = "homedecor_bed_frame.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff },
{ name = "wool_white.png", color = 0xffffffff },
"wool_white.png",
{ name = wood_tex, color = 0xffffffff },
{ name = wool_tex, color = 0xffffffff },
wool_tex,
{ name = "homedecor_bed_bottom.png", color = 0xffffffff },
"wool_white.png^[brighten", -- pillow
wool_tex.."^[brighten", -- pillow
},
inventory_image = "homedecor_bed_inv.png",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
description = S("Bed"),
groups = {snappy=3, ud_param2_colorable = 1},
groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2},
selection_box = bed_sbox,
node_box = bed_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = sc_disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
@ -66,30 +71,40 @@ homedecor.register("bed_regular", {
local itemname = itemstack:get_name()
if itemname == "homedecor:bed_regular" then
homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true)
return itemstack
else
elseif bed_on_rightclick then
bed_on_rightclick(pos, node, clicker)
return itemstack
end
end
return itemstack
end,
crafts = {
{
recipe = {
{ "group:stick", "", "group:stick" },
{ "wool_white", "wool_white", "wool_white" },
{ "group:wood", "", "group:wood" },
},
}
}
})
homedecor.register("bed_extended", {
mesh = "homedecor_bed_extended.obj",
tiles = {
{ name = "homedecor_bed_frame.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff },
{ name = "wool_white.png", color = 0xffffffff },
"wool_white.png",
{ name = wood_tex, color = 0xffffffff },
{ name = wool_tex, color = 0xffffffff },
wool_tex,
{ name = "homedecor_bed_bottom.png", color = 0xffffffff },
"wool_white.png^[brighten",
wool_tex.."^[brighten",
},
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = bed_sbox,
node_box = bed_cbox,
groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
expand = { forward = "air" },
on_rotate = sc_disallow or nil,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@ -97,7 +112,9 @@ homedecor.register("bed_extended", {
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
bed_on_rightclick(pos, node, clicker)
if bed_on_rightclick then
bed_on_rightclick(pos, node, clicker)
end
return itemstack
end,
drop = "homedecor:bed_regular"
@ -107,20 +124,22 @@ homedecor.register("bed_kingsize", {
mesh = "homedecor_bed_kingsize.obj",
tiles = {
{ name = "homedecor_bed_frame.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff },
{ name = "wool_white.png", color = 0xffffffff },
"wool_white.png",
{ name = wood_tex, color = 0xffffffff },
{ name = wool_tex, color = 0xffffffff },
wool_tex,
{ name = "homedecor_bed_bottom.png", color = 0xffffffff },
"wool_white.png^[brighten",
wool_tex.."^[brighten",
},
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
inventory_image = "homedecor_bed_kingsize_inv.png",
description = S("Bed (king sized)"),
groups = {snappy=3, ud_param2_colorable = 1},
groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2},
selection_box = kbed_sbox,
node_box = kbed_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = sc_disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
@ -134,9 +153,18 @@ homedecor.register("bed_kingsize", {
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
bed_on_rightclick(pos, node, clicker)
if bed_on_rightclick then
bed_on_rightclick(pos, node, clicker)
end
return itemstack
end,
crafts = {
{
recipe = {
{ "homedecor:bed_regular", "homedecor:bed_regular" }
},
}
}
})
for w, d in pairs({ ["mahogany"] = S("mahogany"), ["oak"] = S("oak") }) do
@ -159,8 +187,10 @@ for w, d in pairs({ ["mahogany"] = S("mahogany"), ["oak"] = S("oak") }) do
{ -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
}
},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = { type = "regular" },
infotext=S("One-drawer Nightstand"),
inventory = {
@ -185,8 +215,10 @@ for w, d in pairs({ ["mahogany"] = S("mahogany"), ["oak"] = S("oak") }) do
{ -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
}
},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = { type = "regular" },
infotext=S("Two-drawer Nightstand"),
inventory = {
@ -318,7 +350,7 @@ minetest.register_craft( {
output = "homedecor:nightstand_mahogany_one_drawer",
recipe = {
"homedecor:nightstand_oak_one_drawer",
"dye:brown",
homedecor.materials.dye_brown,
},
})
@ -333,7 +365,7 @@ minetest.register_craft( {
output = "homedecor:nightstand_mahogany_two_drawers",
recipe = {
"homedecor:nightstand_oak_two_drawers",
"dye:brown",
homedecor.materials.dye_brown,
},
})
@ -343,16 +375,6 @@ minetest.register_craft({
burntime = 30,
})
minetest.register_craft( {
output = "homedecor:bed_regular",
recipe = {
{ "group:stick", "", "group:stick" },
{ "wool:white", "wool:white", "wool:white" },
{ "group:wood", "", "group:wood" },
},
})
unifieddyes.register_color_craft({
output = "homedecor:bed_regular",
palette = "wallmounted",
@ -364,13 +386,6 @@ unifieddyes.register_color_craft({
}
})
minetest.register_craft( {
output = "homedecor:bed_kingsize",
recipe = {
{ "homedecor:bed_regular", "homedecor:bed_regular" }
},
})
unifieddyes.register_color_craft({
output = "homedecor:bed_kingsize",
palette = "wallmounted",

View File

@ -1,4 +1,4 @@
name = homedecor_bedroom
description = Homedecor mod: bedroom
depends = homedecor_common, default, basic_materials, unifieddyes, creative, beds
optional_depends = screwdriver
depends = homedecor_common
optional_depends = screwdriver, default, basic_materials, unifieddyes, creative, beds

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"creative",
"default",
"homedecor",
}
globals = {
}

View File

@ -97,7 +97,7 @@ for _, c in ipairs(bookcolors) do
if data.title and data.title ~= "" then
meta:set_string("infotext", data.title)
end
if not creative.is_enabled_for(plname) then
if not minetest.is_creative_enabled(plname) then
itemstack:take_item()
end
return itemstack
@ -128,16 +128,15 @@ for _, c in ipairs(bookcolors) do
local owner = meta:get_string("owner") or ""
local formspec
if owner == "" or owner == player_name then
formspec = "size[8,8]"..default.gui_bg..default.gui_bg_img..
formspec = "size[8,8]"..
"field[0.5,1;7.5,0;title;Book title :;"..
minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;text;Book content :;"..
minetest.formspec_escape(text).."]"..
"button_exit[2.5,7.5;3,1;save;Save]"
else
formspec = "size[8,8]"..default.gui_bg..
formspec = "size[8,8]"..
"button_exit[7,0.25;1,0.5;close;X]"..
default.gui_bg_img..
"label[0.5,0.5;by "..owner.."]"..
"label[0.5,0;"..minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text)..";]"
@ -167,7 +166,7 @@ for _, c in ipairs(bookcolors) do
output = "homedecor:book_"..color,
recipe = {
"dye:"..color,
"default:book"
homedecor.materials.book
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_books
description = Homedecor mod: books
depends = homedecor_common, default, creative
optional_depends = unifieddyes
depends = homedecor_common
optional_depends = unifieddyes, default, creative

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -7,12 +7,30 @@ homedecor.register("air_conditioner", {
mesh = "homedecor_ac.obj",
tiles = {
"homedecor_ac.png",
"default_glass.png"
homedecor.textures.glass
},
groups = { snappy = 3 },
groups = { snappy = 3, dig_stone = 3 },
use_texture_alpha = "clip",
sounds = default.node_sound_leaves_defaults(),
_sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type="regular" },
crafts = {
{
recipe = {
{ "steel_ingot", "building_blocks:grate", "steel_ingot" },
{ "steel_ingot", "homedecor:fan_blades", "basic_materials:motor" },
{ "steel_ingot", "basic_materials:motor", "steel_ingot" },
},
},
{
recipe = {
{ "steel_ingot", "building_blocks:grate", "steel_ingot" },
{ "steel_ingot", "basic_materials:motor", "steel_ingot" },
{ "steel_ingot", "basic_materials:motor", "steel_ingot" },
},
}
}
})
-- fans
@ -75,6 +93,14 @@ homedecor.register("desk_fan", {
local entities = minetest.get_objects_inside_radius(pos, 0.1)
if entities[1] then entities[1]:remove() end
end,
crafts = {
{
recipe = {
{"steel_ingot", "homedecor:fan_blades", "basic_materials:motor"},
{"", "steel_ingot", ""}
},
}
}
})
-- ceiling fan
@ -97,9 +123,27 @@ homedecor.register("ceiling_fan", {
}
},
use_texture_alpha = "clip",
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(),
groups = { snappy = 3, dig_stone = 3 },
light_source = minetest.LIGHT_MAX-1,
_sound_def = {
key = "node_sound_glass_defaults",
},
crafts = {
{
recipe = {
{ "basic_materials:motor" },
{ "homedecor:fan_blades" },
{ "homedecor:glowlight_small_cube" }
}
},
{
recipe = {
{ "basic_materials:motor" },
{ "homedecor:fan_blades" },
{ "homedecor:glowlight_small_cube" }
}
}
}
})
-- heating devices
@ -115,8 +159,10 @@ homedecor.register("space_heater", {
},
inventory_image = "homedecor_heater_inv.png",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_stone = 3 },
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = {
type = "fixed",
fixed = {
@ -126,6 +172,15 @@ homedecor.register("space_heater", {
selection_box = {
type = "fixed",
fixed = {-0.1875, -0.5, 0.0625, 0.1875, 0, 0.3125}
},
crafts = {
{
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "homedecor:fan_blades", "basic_materials:motor"},
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
},
}
}
})
@ -138,10 +193,21 @@ homedecor.register("radiator", {
},
inventory_image = "homedecor_radiator_inv.png",
description = S("Radiator heater"),
groups = {snappy=3},
groups = {snappy=3, dig_stone = 3},
selection_box = r_cbox,
collision_box = r_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
recipe = {
{ "steel_ingot", "basic_materials:heating_element", "steel_ingot" },
{ "basic_materials:ic", "basic_materials:heating_element", "" },
{ "steel_ingot", "basic_materials:heating_element", "steel_ingot" }
},
}
}
})
-- crafting
@ -154,70 +220,7 @@ minetest.register_craft( {
output = "homedecor:fan_blades 2",
recipe = {
{ "", "basic_materials:plastic_sheet", "" },
{ "", "default:steel_ingot", "" },
{ "", homedecor.materials.steel_ingot, "" },
{ "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" }
},
})
minetest.register_craft({
output = "homedecor:air_conditioner",
recipe = {
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
{ "default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
},
})
minetest.register_craft({
output = "homedecor:air_conditioner",
recipe = {
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
},
})
minetest.register_craft({
output = "homedecor:ceiling_fan",
recipe = {
{ "basic_materials:motor" },
{ "homedecor:fan_blades" },
{ "homedecor:glowlight_small_cube" }
}
})
minetest.register_craft({
output = "homedecor:ceiling_fan",
recipe = {
{ "basic_materials:motor" },
{ "homedecor:fan_blades" },
{ "homedecor:glowlight_small_cube" }
}
})
minetest.register_craft( {
output = "homedecor:desk_fan",
recipe = {
{"default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor"},
{"", "default:steel_ingot", ""}
},
})
minetest.register_craft( {
output = "homedecor:space_heater",
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "homedecor:fan_blades", "basic_materials:motor"},
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
},
})
minetest.register_craft( {
output = "homedecor:radiator",
recipe = {
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" },
{ "basic_materials:ic", "basic_materials:heating_element", "" },
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_climate_control
description = Homedecor mod: climate control
depends = homedecor_common, default, basic_materials
optional_depends = building_blocks, screwdriver
depends = homedecor_common
optional_depends = building_blocks, screwdriver, default

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -1,18 +1,43 @@
local S = minetest.get_translator("homedecor_clocks")
local wood
if minetest.get_modpath("default") then
wood = "default_wood.png"
else
wood = "[combine:16x16^[noalpha^[colorize:#563d2d"
end
local plastic_craft = {
output = "homedecor:analog_clock_plastic 2",
recipe = {
{ "basic_materials:plastic_sheet", "dye_black", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "dye_black", "basic_materials:plastic_sheet" },
},
}
local wood_craft = {
output = "homedecor:analog_clock_wood 2",
recipe = {
{ "group:stick", "dye_black", "group:stick" },
{ "group:stick", "basic_materials:ic", "group:stick" },
{ "group:stick", "dye_black", "group:stick" },
},
}
local clock_sbox = {
type = "fixed",
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
}
local clock_materials = {
{ "plastic", S("Plastic analog clock"), "homedecor_generic_plastic.png" },
{ "wood", S("Wooden analog clock"), "default_wood.png" }
{"plastic", S("Plastic analog clock"), "homedecor_generic_plastic.png", plastic_craft},
{"wood", S("Wooden analog clock"), wood, wood_craft}
}
for _, mat in ipairs(clock_materials) do
local name, desc, tex = unpack(mat)
local name, desc, tex, craft = unpack(mat)
homedecor.register("analog_clock_"..name, {
description = desc,
mesh = "homedecor_analog_clock.obj",
@ -24,8 +49,13 @@ for _, mat in ipairs(clock_materials) do
inventory_image = "homedecor_analog_clock_"..name.."_inv.png",
walkable = false,
selection_box = clock_sbox,
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
craft
}
})
end
@ -47,8 +77,20 @@ homedecor.register("digital_clock", {
}
},
walkable = false,
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
groups = {snappy=3, dig_tree=2},
crafts = {
{
output = "homedecor:digital_clock 2",
recipe = {
{ "basic_materials:plastic_sheet", "paper", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal_simple", "basic_materials:plastic_sheet" },
},
}
}
})
homedecor.register("alarm_clock", {
@ -69,8 +111,19 @@ homedecor.register("alarm_clock", {
}
},
walkable = false,
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
groups = {snappy=3, dig_tree=2},
crafts = {
{
recipe = {
{ "basic_materials:plastic_sheet", "homedecor:speaker_driver", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "homedecor:digital_clock", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal_simple", "basic_materials:plastic_sheet" },
},
}
}
})
local gf_cbox = {
@ -82,7 +135,7 @@ homedecor.register("grandfather_clock", {
description = S("Grandfather Clock"),
mesh = "homedecor_grandfather_clock.obj",
tiles = {
"default_glass.png",
homedecor.textures.glass,
"homedecor_grandfather_clock_face.png",
homedecor.lux_wood,
"homedecor_grandfather_clock_face_edge.png",
@ -90,60 +143,23 @@ homedecor.register("grandfather_clock", {
},
use_texture_alpha = "clip",
inventory_image = "homedecor_grandfather_clock_inv.png",
groups = { snappy = 3 },
groups = {snappy = 3, dig_tree=2},
selection_box = gf_cbox,
collision_box = gf_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
expand = { top="placeholder" },
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
})
-- crafting
minetest.register_craft({
output = "homedecor:analog_clock_plastic 2",
recipe = {
{ "basic_materials:plastic_sheet", "dye:black", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "dye:black", "basic_materials:plastic_sheet" },
},
})
minetest.register_craft({
output = "homedecor:analog_clock_wood 2",
recipe = {
{ "group:stick", "dye:black", "group:stick" },
{ "group:stick", "basic_materials:ic", "group:stick" },
{ "group:stick", "dye:black", "group:stick" },
},
})
minetest.register_craft({
output = "homedecor:digital_clock 2",
recipe = {
{ "basic_materials:plastic_sheet", "default:paper", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal_simple", "basic_materials:plastic_sheet" },
},
})
minetest.register_craft({
output = "homedecor:alarm_clock",
recipe = {
{ "basic_materials:plastic_sheet", "homedecor:speaker_driver", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "homedecor:digital_clock", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:energy_crystal_simple", "basic_materials:plastic_sheet" },
},
})
minetest.register_craft({
output = "homedecor:grandfather_clock",
recipe = {
{ "building_blocks:slab_hardwood","homedecor:analog_clock_wood","building_blocks:slab_hardwood" },
{ "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" },
{ "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" }
},
crafts = {
{
recipe = {
{ "building_blocks:slab_hardwood","homedecor:analog_clock_wood","building_blocks:slab_hardwood" },
{ "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" },
{ "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" }
},
}
}
})
-- aliases

View File

@ -1,4 +1,4 @@
name = homedecor_clocks
description = Homedecor mod: clocks
depends = homedecor_common, default, basic_materials, dye
optional_depends = building_blocks, screwdriver
depends = homedecor_common
optional_depends = building_blocks, screwdriver, default, basic_materials, dye

View File

@ -1,18 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
}
globals = {
}

View File

@ -1,7 +1,7 @@
local S = minetest.get_translator("homedecor_cobweb")
homedecor_cobweb = {}
minetest.register_node(":homedecor:cobweb_corner", {
homedecor.register("cobweb_corner", {
description = S("Cobweb"),
drawtype = "torchlike",
tiles = { "homedecor_cobweb_torchlike.png" },
@ -19,13 +19,23 @@ minetest.register_node(":homedecor:cobweb_corner", {
walkable = false,
selection_box = { type = "regular" },
visual_scale = 1.4,
groups = { snappy = 3, liquid=3 },
groups = { snappy = 3, liquid=3, dig_glass = 1 },
after_place_node = function(pos, placer, itemstack, pointed_thing)
homedecor_cobweb.rotate(pos)
end
end,
crafts = {
{
output = "homedecor:cobweb_corner 5",
recipe = {
{"string", "", "string"},
{"", "string", ""},
{"string", "", "string"}
},
}
}
})
minetest.register_node(":homedecor:cobweb_centered", {
homedecor.register("cobweb_centered", {
description = S("Cobweb"),
drawtype = "nodebox",
tiles = { "homedecor_cobweb.png" },
@ -49,11 +59,11 @@ minetest.register_node(":homedecor:cobweb_centered", {
type = "fixed",
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0 }
},
groups = { snappy = 3, liquid=3, not_in_creative_inventory = 1 },
groups = { snappy = 3, liquid=3, dig_glass = 1, not_in_creative_inventory = 1 },
drop = "homedecor:cobweb_corner"
})
minetest.register_node(":homedecor:cobweb_flat", {
homedecor.register("cobweb_flat", {
description = S("Cobweb"),
drawtype = "nodebox",
tiles = { "homedecor_cobweb.png" },
@ -77,11 +87,11 @@ minetest.register_node(":homedecor:cobweb_flat", {
type = "fixed",
fixed = { -0.5, -0.5, 0.495, 0.5, 0.5, 0.495 }
},
groups = { snappy = 3, liquid=3, not_in_creative_inventory = 1 },
groups = { snappy = 3, liquid=3, dig_glass = 1, not_in_creative_inventory = 1 },
drop = "homedecor:cobweb_corner"
})
minetest.register_node(":homedecor:cobweb_plantlike", {
homedecor.register("cobweb_plantlike", {
description = S("Cobweb"),
drawtype = "plantlike",
tiles = { "homedecor_cobweb_plantlike.png" },
@ -98,7 +108,7 @@ minetest.register_node(":homedecor:cobweb_plantlike", {
walkable = false,
selection_box = { type = "regular" },
visual_scale = 1.189,
groups = { snappy = 3, liquid=3, not_in_creative_inventory = 1 },
groups = { snappy = 3, liquid=3, dig_glass = 1, not_in_creative_inventory = 1 },
drop = "homedecor:cobweb_corner"
})
@ -159,14 +169,3 @@ function homedecor_cobweb.rotate(pos)
end
end
-- crafting
minetest.register_craft( {
output = "homedecor:cobweb_corner 5",
recipe = {
{ "farming:string", "", "farming:string" },
{ "", "farming:string", "" },
{ "farming:string", "", "farming:string" }
},
})

View File

@ -1,3 +1,4 @@
name = homedecor_cobweb
description = Homedecor mod: cobweb
depends = homedecor_common, default
depends = homedecor_common
optional_depends = default

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"creative",
"default",
"screwdriver",
}
globals = {
}

View File

@ -103,7 +103,7 @@ local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2, poin
ctrl_node_def.after_place_node(pos, placer, itemstack, pointed_thing)
end
if not creative.is_enabled_for(placer_name) then
if not minetest.is_creative_enabled(placer_name) then
itemstack:take_item()
end
end
@ -133,7 +133,8 @@ function homedecor.stack_vertically(itemstack, placer, pointed_thing, node1, nod
end
-- Stack one door node above another
-- like homedecor.stack_vertically but tests first if it was placed as a right wing, then uses node1_right and node2_right instead
-- like homedecor.stack_vertically but tests first if it was placed as a right wing,
-- then uses node1_right and node2_right instead
function homedecor.stack_wing(itemstack, placer, pointed_thing, node1, node2, node1_right, node2_right)
local rightclick_result = rightclick_pointed_thing(pointed_thing.under, placer, itemstack, pointed_thing)
@ -230,8 +231,9 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
if trybunks and is_buildable_to(placer_name, toppos, topposfwd) then
local newname = string.gsub(thisnode.name, "_regular", "_extended")
local newparam2 = param2 % 8
-- FIXME: is newparam2 a legacy unused variable from a8729575abfbd15cc622b413b71976c9157fbab4? or should this variable be used somewhere?
-- local newparam2 = param2 % 8
-- FIXME: is newparam2 a legacy unused variable from a8729575abfbd15cc622b413b71976c9157fbab4?
-- or should this variable be used somewhere?
minetest.swap_node(toppos, { name = thisnode.name, param2 = param2})
minetest.swap_node(pos, { name = newname, param2 = param2})
itemstack:take_item()

View File

@ -143,7 +143,10 @@ function homedecor.register_furnace(name, furnacedef)
description = description,
tiles = make_tiles(furnacedef.tiles, furnacedef.tile_format, false),
groups = furnacedef.groups or {cracky=2},
sounds = furnacedef.sounds or default.node_sound_wood_defaults(),
sounds = furnacedef.sounds,
_sound_def = {
key = "node_sound_wood_defaults",
},
on_construct = furnace_construct,
can_dig = furnace_can_dig,
allow_metadata_inventory_put = furnace_allow_put,
@ -158,7 +161,10 @@ function homedecor.register_furnace(name, furnacedef)
light_source = 8,
drop = "homedecor:" .. name,
groups = furnacedef.groups or {cracky=2, not_in_creative_inventory=1},
sounds = furnacedef.sounds or default.node_sound_stone_defaults(),
sounds = furnacedef.sounds,
_sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = furnace_construct,
can_dig = furnace_can_dig,
allow_metadata_inventory_put = furnace_allow_put,

View File

@ -49,17 +49,13 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
return isceiling, pos
end
homedecor.plain_wood = { name = "homedecor_generic_wood_plain.png", color = 0xffa76820 }
homedecor.mahogany_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff7d2506 }
homedecor.white_wood = "homedecor_generic_wood_plain.png"
homedecor.dark_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff39240f }
homedecor.lux_wood = { name = "homedecor_generic_wood_luxury.png", color = 0xff643f23 }
homedecor.color_black = 0xff303030
homedecor.color_dark_grey = 0xff606060
homedecor.color_med_grey = 0xffa0a0a0
-- load different handler subsystems
dofile(modpath.."/textures.lua")
dofile(modpath.."/materials.lua")
dofile(modpath.."/nodeboxes.lua")
dofile(modpath.."/expansion.lua")
dofile(modpath.."/furnaces.lua")

View File

@ -12,47 +12,46 @@ local default_can_dig = function(pos,player)
return meta:get_inventory():is_empty("main")
end
local background = default.gui_bg .. default.gui_bg_img .. default.gui_slots
local default_inventory_formspecs = {
["4"]="size[8,6]".. background ..
["4"]="size[8,6]"..
"list[context;main;2,0;4,1;]" ..
"list[current_player;main;0,2;8,4;]" ..
"listring[]",
["6"]="size[8,6]".. background ..
["6"]="size[8,6]"..
"list[context;main;1,0;6,1;]"..
"list[current_player;main;0,2;8,4;]" ..
"listring[]",
["8"]="size[8,6]".. background ..
["8"]="size[8,6]"..
"list[context;main;0,0;8,1;]"..
"list[current_player;main;0,2;8,4;]" ..
"listring[]",
["12"]="size[8,7]".. background ..
["12"]="size[8,7]"..
"list[context;main;1,0;6,2;]"..
"list[current_player;main;0,3;8,4;]" ..
"listring[]",
["16"]="size[8,7]".. background ..
["16"]="size[8,7]"..
"list[context;main;0,0;8,2;]"..
"list[current_player;main;0,3;8,4;]" ..
"listring[]",
["24"]="size[8,8]".. background ..
["24"]="size[8,8]"..
"list[context;main;0,0;8,3;]"..
"list[current_player;main;0,4;8,4;]" ..
"listring[]",
["32"]="size[8,9]".. background ..
["32"]="size[8,9]"..
"list[context;main;0,0.3;8,4;]"..
"list[current_player;main;0,4.85;8,1;]"..
"list[current_player;main;0,6.08;8,3;8]"..
"listring[context;main]" ..
"listring[current_player;main]" ..
default.get_hotbar_bg(0,4.85),
"listring[current_player;main]",
["50"]="size[10,10]".. background ..
["50"]="size[10,10]"..
"list[context;main;0,0;10,5;]"..
"list[current_player;main;1,6;8,4;]" ..
"listring[]",

View File

@ -0,0 +1,212 @@
homedecor.materials = {
dirt = "default:dirt",
sand = "default:sand",
gravel = "default:gravel",
copper_ingot = "default:copper_ingot",
steel_ingot = "default:steel_ingot",
gold_ingot = "default:gold_ingot",
tin_ingot = "default:tin_ingot",
mese_crystal_fragment = "default:mese_crystal_fragment",
torch = "default:torch",
diamond = "default:diamond",
clay_lump = "default:clay_lump",
water_bucket = "bucket:bucket_water",
empty_bucket = "bucket:bucket_empty",
dye_dark_grey = "dye:dark_grey",
dye_black = "dye:black",
dye_white = "dye:white",
dye_green = "dye:green",
dye_red = "dye:red",
dye_yellow = "dye:yellow",
dye_brown = "dye:brown",
dye_blue = "dye:blue",
dye_violet = "dye:violet",
dye_grey = "dye:grey",
dye_dark_green = "dye:dark_green",
dye_orange = "dye:orange",
dye_pink = "dye:pink",
silicon = "mesecons_materials:silicon",
string = "farming:string",
paper = "default:paper",
book = "default:book",
iron_lump = "default:iron_lump",
wool_grey = "wool:grey",
wool_green = "wool:green",
wool_dark_green = "wool:dark_green",
wool_brown = "wool:brown",
wool_black = "wool:black",
wool_white = "wool:white",
slab_stone = "stairs:slab_stone",
slab_wood = "stairs:slab_wood",
glass_block = "default:glass",
glass_bottle = "vessels:glass_bottle",
coal_lump = "default:coal_lump",
stone = "default:stone",
cobble = "default:cobble",
brick = "default:brick",
}
if minetest.get_modpath("moreores") then
homedecor.materials.silver_ingot = "moreores:silver_ingot"
end
if minetest.get_modpath("mcl_core") then
homedecor.materials = {
dirt = "mcl_core:dirt",
sand = "mcl_core:sand",
gravel = "mcl_core:gravel",
copper_ingot = "mcl_copper:copper_ingot",
steel_ingot = "mcl_core:iron_ingot",
gold_ingot = "mcl_core:gold_ingot",
tin_ingot = "mcl_core:iron_ingot",
mese_crystal_fragment = "mcl_core:iron_ingot",
torch = "mcl_torches:torch",
diamond = "mcl_core:diamond",
clay_lump = "default:clay_lump",
water_bucket = "mcl_buckets:bucket:bucket_water",
empty_bucket = "mcl_buckets:bucket_empty",
dye_dark_grey = "mcl_dyes:dark_grey",
dye_black = "mcl_dyes:black",
dye_white = "mcl_dyes:white",
dye_green = "mcl_dyes:green",
dye_red = "mcl_dyes:red",
dye_yellow = "mcl_dyes:yellow",
dye_brown = "mcl_dyes:brown",
dye_blue = "mcl_dyes:blue",
dye_violet = "mcl_dyes:violet",
dye_grey = "mcl_dyes:grey",
dye_dark_green = "mcl_dyes:dark_green",
dye_orange = "mcl_dyes:orange",
dye_pink = "mcl_dyes:pink",
silicon = "mcl_core:iron_ingot",
string = "mcl_mobitems:string",
paper = "mcl_core:paper",
book = "mcl_core:book",
iron_lump = "mcl_core:stone_with_iron",
wool_grey = "mcl_wool:grey",
wool_green = "mcl_wool:green",
wool_dark_green = "mcl_wool:dark_green",
wool_brown = "mcl_wool:brown",
wool_black = "mcl_wool:black",
wool_white = "mcl_wool:white",
slab_stone = "mcl_stairs:slab_stone",
slab_wood = "mcl_stairs:slab_wood",
glass_block = "mcl_core:glass",
glass_bottle = "mcl_core:glass_bottle",
coal_lump = "mcl_core:coal",
stone = "mcl_core:stone",
cobble = "mcl_core:cobble",
brick = "mcl_core:brick",
}
elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then
homedecor.materials = {
dirt = "fl_topsoil:dirt",
sand = "fl_stone:sand",
gravel = "fl_topsoil:gravel",
steel_ingot = "fl_ores:iron_ingot",
gold_ingot = "fl_ores:gold_ingot",
mese_crystal_fragment = "fl_ores:iron_ingot",
torch = "fl_light_sources:torch",
diamond = "fl_ores:diamond",
clay_lump = "fl_bricks:clay_lump",
water_bucket = "fl_bucket:bucket_water",
empty_bucket = "fl_bucket:bucket",
dye_dark_grey = "fl_dyes:dark_grey_dye",
dye_black = "fl_dyes:black_dye",
dye_white = "fl_dyes:white_dye",
dye_green = "fl_dyes:green_dye",
dye_red = "fl_dyes:red_dye",
dye_yellow = "fl_dyes:yellow_dye",
dye_brown = "fl_dyes:brown_dye",
dye_blue = "fl_dyes:blue_dye",
dye_violet = "fl_dyes:violet_dye",
dye_grey = "fl_dyes:grey_dye",
dye_dark_green = "fl_dyes:dark_green_dye",
dye_orange = "fl_dyes:orange_dye",
dye_pink = "fl_dyes:pink_dye",
copper_ingot = "fl_ores:copper_ingot",
tin_ingot = "fl_ores:tin_ingot",
silver_ingot = "fl_ores:iron_ingot",
silicon = "mesecons_materials:silicon",
string = "fl_plantlife:oxeye_daisy",
paper = "basic_materials:plastic_sheet",
iron_lump = "fl_ores:iron_ore",
wool_grey = "",
wool_green = "",
wool_dark_green = "",
wool_brown = "",
wool_black = "",
wool_white = "",
slab_stone = "fl_stone:stone_slab",
slab_wood = "fl_trees:apple_plank_slab",
glass_block = "fl_glass:framed_glass",
glass_bottle = "fl_bottles:bottle",
coal_lump = "fl_ores:coal_ore",
stone = "fl_stone:stone",
cobble = "fl_stone:stone_rubble",
brick = "",
}
elseif minetest.get_modpath("hades_core") then
homedecor.materials = {
sand = "hades_core:fertile_sand",
gravel = "hades_core:gravel",
copper_ingot = "hades_core:copper_ingot",
steel_ingot = "hades_core:steel_ingot",
gold_ingot = "hades_core:gold_ingot",
tin_ingot = "hades_core:tin_ingot",
silver_ingot = "--unknown--",
mese_crystal_fragment = "hades_core:mese_crystal_fragment",
torch = "hades_torches:torch",
diamond = "hades_core:diamond",
clay_lump = "hades_core:clay_lump",
clay_brick = "hades_core:clay_brick",
--[[
Since hades doesnt have buckets or water for the user,
using dirt from near water to pull the water out
]]
water_bucket = "hades_core:dirt",
empty_bucket = "hades_core:fertile_sand",
dye_dark_grey = "dye:dark_grey",
dye_black = "dye:black",
dye_white = "dye:white",
dye_green = "dye:green",
dye_red = "dye:red",
dye_yellow = "dye:yellow",
dye_brown = "dye:brown",
dye_blue = "dye:blue",
dye_violet = "dye:violet",
dye_grey = "dye:grey",
dye_dark_green = "dye:dark_green",
dye_orange = "dye:orange",
dye_pink = "dye:pink",
silicon = "hades_materials:silicon",
string = "hades_farming:string",
paper = "hades_core:paper",
book = "hades_core:book",
iron_lump = "hades_core:iron_lump",
wool_grey = "wool:grey",
wool_green = "wool:green",
wool_dark_green = "wool:dark_green",
wool_brown = "wool:brown",
wool_black = "wool:black",
wool_white = "wool:white",
slab_stone = "stairs:slab_stone",
slab_wood = "stairs:slab_wood",
glass_block = "hades_core:glass",
glass_bottle = "vessels:glass_bottle",
obsidian_glass = "hades_core:obsidian_glass",
coal_lump = "hades_core:coal_lump",
stone = "hades_core:stone",
cobble = "hades_core:cobble",
brick = "hades_core:brick"
}
if minetest.get_modpath("hades_bucket") then
homedecor.materials["water_bucket"] = "hades_bucket:bucket_water"
homedecor.materials["empty_bucket"] = "hades_bucket:bucket_empty"
end
if minetest.get_modpath("hades_extraores") then
homedecor.materials["silver_ingot"] = "hades_extraores:silver_ingot"
end
end

View File

@ -1,4 +1,4 @@
name = homedecor_common
description = Homedecor mod: common
depends = default, creative
optional_depends = screwdriver, hopper
depends = basic_materials, unifieddyes
optional_depends = screwdriver, hopper, default, creative, sound_api, fl_stone, fl_mapgen, i3, mcl_core, mcl_mapgen_core, void_essential, mapgen

View File

@ -10,7 +10,7 @@ homedecor.box = {
slab_y = function(height, shift) return { -0.5, -0.5+(shift or 0), -0.5, 0.5, -0.5+height+(shift or 0), 0.5 } end,
-- slab starting from -z (+z with negative depth)
slab_z = function(depth, shift)
-- for consistency with the other functions here, we have to assume that a "z" slab starts from -z and extends by depth,
-- for consistency with the other functions here, we have to assume that a z slab starts from -z and extends by depth,
-- but since conventionally a lot of nodes place slabs against +z for player convenience, we define
-- a "negative" depth as a depth extending from the other side, i.e. +z
local s = shift or 0

View File

@ -46,9 +46,12 @@ function homedecor.register(name, original_def)
if expand then
-- dissallow rotating only half the expanded node by default
-- unless we know better
def.on_rotate = def.on_rotate
or (minetest.get_modpath("screwdriver") and (def.mesh and expand.top and screwdriver.rotate_simple)
or screwdriver.disallow) or nil
def.on_rotate = def.on_rotate or (
minetest.get_modpath("screwdriver") and (
(def.mesh and expand.top and screwdriver.rotate_simple) or
screwdriver.disallow
)
)
def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
if expand.top then
@ -96,6 +99,31 @@ function homedecor.register(name, original_def)
end
end
local crafts = def.crafts and table.copy(def.crafts) or {}
def.crafts = nil
-- register the actual minetest node
minetest.register_node(":homedecor:" .. name, def)
for _, cdef in pairs(crafts) do
if cdef.recipe then
for k, row in pairs(cdef.recipe) do
if type(row) == "string" and homedecor.materials[row] then
cdef.recipe[k] = homedecor.materials[row]
elseif type(row) == "table" then
for i, item in pairs(row) do
if homedecor.materials[item] then
cdef.recipe[k][i] = homedecor.materials[item]
end
end
end
end
end
if cdef.type ~= "toolrepair" and not cdef.output then
cdef.output = "homedecor:" .. name
end
minetest.register_craft(cdef)
end
end

View File

@ -0,0 +1,34 @@
homedecor.plain_wood = { name = "homedecor_generic_wood_plain.png", color = 0xffa76820 }
homedecor.mahogany_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff7d2506 }
homedecor.white_wood = "homedecor_generic_wood_plain.png"
homedecor.dark_wood = { name = "homedecor_generic_wood_plain.png", color = 0xff39240f }
homedecor.lux_wood = { name = "homedecor_generic_wood_luxury.png", color = 0xff643f23 }
homedecor.textures = {
glass =
"[combine:16x16:" ..
"0,0=\\[combine\\:1x16\\^[noalpha\\^[colorize\\:#ffffff:" ..
"0,0=\\[combine\\:16x1\\^[noalpha\\^[colorize\\:#ffffff:" ..
"0,15=\\[combine\\:16x1\\^[noalpha\\^[colorize\\:#ffffff:" ..
"15,0=\\[combine\\:1x16\\^[noalpha\\^[colorize\\:#ffffff",
default_wood = "[combine:16x16^[noalpha^[colorize:#654321",
default_junglewood = "[combine:16x16^[noalpha^[colorize:#563d2d",
water = "[combine:16x16^[noalpha^[colorize:#00008b",
wool_white = "[combine:16x16^[noalpha^[colorize:#ffffff",
wool_black = "[combine:16x16^[noalpha^[colorize:#000000",
wool_grey = "[combine:16x16^[noalpha^[colorize:#313b3c",
wool_dark_grey = "[combine:16x16^[noalpha^[colorize:#313b3c",
}
if minetest.get_modpath("default") then
homedecor.textures = {
glass = "default_glass.png",
default_wood = "default_wood.png",
default_junglewood = "default_junglewood.png",
water = "default_water.png",
wool_white = "wool_white.png",
wool_black = "wool_black.png",
wool_grey = "wool_grey.png",
wool_dark_grey = "wool_dark_grey.png",
}
end

View File

@ -1,23 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"doors",
"mesecon",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -1,5 +1,13 @@
-- Node definitions for Homedecor doors
if not minetest.get_modpath("doors") or not minetest.get_modpath("default") then
minetest.log(
"action",
"[homedecor_doors_and_gates]: minetest game not detected, disabling as this mod is minetest game only at this time"
)
return
end
local S = minetest.get_translator("homedecor_doors_and_gates")
local mesecons_mp = minetest.get_modpath("mesecons")
homedecor_doors_and_gates = {}
@ -102,7 +110,7 @@ local function generate_door(def)
local door = doors.get(pos)
if door then door:close() end
end,
rules = mesecon and mesecon.rules.pplate or nil
rules = minetest.global_exists("mesecon") and mesecon.rules.pplate or nil
}
},
}

View File

@ -1,4 +1,4 @@
name = homedecor_doors_and_gates
description = Homedecor mod: doors and gates
depends = homedecor_common, default, basic_materials, dye, doors
optional_depends = homedecor_misc, homedecor_3d_extras, mesecons, screwdriver
depends = homedecor_common
optional_depends = homedecor_misc, homedecor_3d_extras, mesecons, screwdriver, default, doors

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"homedecor",
"mesecon",
}
globals = {
}

View File

@ -53,7 +53,16 @@ homedecor.register("power_outlet", {
}
},
groups = {cracky=3,dig_immediate=2},
walkable = false
walkable = false,
crafts = {
{
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:copper_strip"},
{"basic_materials:plastic_sheet", ""},
{"basic_materials:plastic_sheet", "basic_materials:copper_strip"}
},
}
}
})
for _, onoff in ipairs ({"on", "off"}) do
@ -120,7 +129,7 @@ homedecor.register("doorbell", {
tiles = { "homedecor_doorbell.png" },
inventory_image = "homedecor_doorbell_inv.png",
description = S("Doorbell"),
groups = {snappy=3},
groups = {snappy=3, dig_tree = 3},
walkable = false,
node_box = {
type = "fixed",
@ -135,20 +144,18 @@ homedecor.register("doorbell", {
gain = 1.0,
max_hear_distance = 15
})
end
end,
crafts = {
{
recipe = {
{ "homedecor:light_switch_off", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
},
}
}
})
-- crafting
minetest.register_craft( {
output = "homedecor:power_outlet",
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:copper_strip"},
{"basic_materials:plastic_sheet", ""},
{"basic_materials:plastic_sheet", "basic_materials:copper_strip"}
},
})
minetest.register_craft( {
output = "homedecor:light_switch_off",
recipe = {
@ -158,13 +165,6 @@ minetest.register_craft( {
},
})
minetest.register_craft( {
output = "homedecor:doorbell",
recipe = {
{ "homedecor:light_switch_off", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
},
})
-- aliases
minetest.register_alias("homedecor:light_switch", "homedecor:light_switch_on")

View File

@ -1,4 +1,4 @@
name = homedecor_electrical
description = Homedecor mod: electrical
depends = homedecor_common, default, basic_materials
depends = homedecor_common
optional_depends = mesecons, mesecons_receiver

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
}
globals = {
}

View File

@ -9,11 +9,29 @@ homedecor.register("speaker", {
"homedecor_speaker_sides.png",
"homedecor_speaker_front.png"
},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:speaker_open", param2 = node.param2})
end
end,
crafts = {
{
recipe = {
{ "wool_black", "homedecor:speaker_driver", "group:wood" },
{ "wool_black", "homedecor:speaker_driver", "group:wood" },
{ "wool_black", "group:wood", "group:wood" },
},
},
{
recipe = {
{ "cotton:black", "homedecor:speaker_driver", "group:wood" },
{ "cotton:black", "homedecor:speaker_driver", "group:wood" },
{ "cotton:black", "group:wood", "group:wood" },
},
}
}
})
homedecor.register("speaker_open", {
@ -25,8 +43,10 @@ homedecor.register("speaker_open", {
"homedecor_speaker_open_front.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
},
groups = { snappy = 3, not_in_creative_inventory=1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory=1, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:speaker", param2 = node.param2})
end
@ -46,8 +66,22 @@ homedecor.register("speaker_small", {
},
selection_box = spk_cbox,
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
recipe = {
{ "wool_black", "homedecor:speaker_driver", "group:wood" },
},
},
{
recipe = {
{ "cotton:black", "homedecor:speaker_driver", "group:wood" },
},
}
}
})
homedecor.register("stereo", {
@ -58,8 +92,19 @@ homedecor.register("stereo", {
'homedecor_stereo_left.png',
'homedecor_stereo_back.png',
'homedecor_stereo_front.png'},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
{ "steel_ingot", "basic_materials:ic", "steel_ingot" },
},
}
}
})
homedecor.register("projection_screen", {
@ -69,13 +114,25 @@ homedecor.register("projection_screen", {
wield_image = 'homedecor_projection_screen_inv.png',
inventory_image = 'homedecor_projection_screen_inv.png',
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_leaves_defaults",
},
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
crafts = {
{
output = "homedecor:projection_screen 3",
recipe = {
{ "", "glass_block", "" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
},
},
}
})
homedecor.register("television", {
@ -94,9 +151,27 @@ homedecor.register("television", {
}
}
},
light_source = default.LIGHT_MAX - 1,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
light_source = minetest.LIGHT_MAX - 1,
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "glass_block", "basic_materials:plastic_sheet" },
{ "basic_materials:ic", "basic_materials:energy_crystal_simple", "basic_materials:ic" },
},
},
{
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "moreblocks:glow_glass", "basic_materials:plastic_sheet" },
{ "basic_materials:ic", "basic_materials:ic", "basic_materials:ic" },
},
}
}
})
homedecor.register("dvd_vcr", {
@ -117,8 +192,28 @@ homedecor.register("dvd_vcr", {
{-0.25, -0.5, -0.25, 0.25, -0.1875, 0.125},
}
},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
output = "homedecor:dvd_player 2",
recipe = {
{ "", "basic_materials:plastic_sheet", "" },
{ "obsidian_glass", "basic_materials:motor", "basic_materials:motor" },
{ "mese_crystal_fragment", "basic_materials:ic", "basic_materials:energy_crystal_simple" },
},
},
{
type = "shapeless",
output = "homedecor:dvd_vcr",
recipe = {
"homedecor:vcr",
"homedecor:dvd_player"
},
}
}
})
local tel_cbox = {
@ -136,13 +231,24 @@ homedecor.register("telephone", {
},
inventory_image = "homedecor_telephone_inv.png",
description = S("Telephone"),
groups = {snappy=3},
groups = {snappy=3, dig_tree = 2},
selection_box = tel_cbox,
walkable = false,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
recipe = {
{ "homedecor:speaker_driver", "basic_materials:copper_wire", "homedecor:speaker_driver" },
{ "basic_materials:plastic_sheet", "steel_ingot", "basic_materials:plastic_sheet" },
{ "steel_ingot", "steel_ingot", "steel_ingot" }
},
}
}
})
-- crafting
-- craft items
minetest.register_craftitem(":homedecor:vcr", {
description = S("VCR"),
@ -159,21 +265,7 @@ minetest.register_craftitem(":homedecor:speaker_driver", {
inventory_image = "homedecor_speaker_driver_inv.png"
})
minetest.register_craft( {
output = "homedecor:projection_screen 3",
recipe = {
{ "", "default:glass", "" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:projection_screen",
burntime = 30,
})
--crafts
minetest.register_craft( {
output = "basic_materials:ic 4",
@ -183,110 +275,26 @@ minetest.register_craft( {
},
})
minetest.register_craft( {
output = "homedecor:television",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "moreblocks:glow_glass", "basic_materials:plastic_sheet" },
{ "basic_materials:ic", "basic_materials:ic", "basic_materials:ic" },
},
})
minetest.register_craft( {
output = "homedecor:television",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet" },
{ "basic_materials:ic", "basic_materials:energy_crystal_simple", "basic_materials:ic" },
},
})
minetest.register_craft( {
output = "homedecor:stereo",
recipe = {
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:ic", "basic_materials:plastic_sheet" },
{ "default:steel_ingot", "basic_materials:ic", "default:steel_ingot" },
},
})
minetest.register_craft( {
output = "homedecor:speaker_driver 2",
recipe = {
{ "", "default:steel_ingot", "" },
{ "default:paper", "basic_materials:copper_wire", "default:iron_lump" },
{ "", "default:steel_ingot", "" },
{ "", homedecor.materials["steel_ingot"], "" },
{ homedecor.materials["paper"], "basic_materials:copper_wire", homedecor.materials["iron_lump"] },
{ "", homedecor.materials["steel_ingot"], "" },
},
})
minetest.register_craft( {
output = "homedecor:speaker_small",
recipe = {
{ "wool:black", "homedecor:speaker_driver", "group:wood" },
},
})
minetest.register_craft( {
output = "homedecor:speaker",
recipe = {
{ "wool:black", "homedecor:speaker_driver", "group:wood" },
{ "wool:black", "homedecor:speaker_driver", "group:wood" },
{ "wool:black", "group:wood", "group:wood" },
},
})
-- cotton version
minetest.register_craft( {
output = "homedecor:speaker_small",
recipe = {
{ "cotton:black", "homedecor:speaker_driver", "group:wood" },
},
})
minetest.register_craft( {
output = "homedecor:speaker",
recipe = {
{ "cotton:black", "homedecor:speaker_driver", "group:wood" },
{ "cotton:black", "homedecor:speaker_driver", "group:wood" },
{ "cotton:black", "group:wood", "group:wood" },
},
})
minetest.register_craft({
output = "homedecor:vcr 2",
recipe = {
{ "basic_materials:ic", "default:steel_ingot", "basic_materials:plastic_sheet" },
{ "default:iron_lump", "default:iron_lump", "default:iron_lump" },
{ "basic_materials:ic", homedecor.materials["steel_ingot"], "basic_materials:plastic_sheet" },
{ homedecor.materials["iron_lump"], homedecor.materials["iron_lump"], homedecor.materials["iron_lump"] },
{ "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" },
},
})
minetest.register_craft({
output = "homedecor:dvd_player 2",
recipe = {
{ "", "basic_materials:plastic_sheet", "" },
{ "default:obsidian_glass", "basic_materials:motor", "basic_materials:motor" },
{ "default:mese_crystal_fragment", "basic_materials:ic", "basic_materials:energy_crystal_simple" },
},
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:dvd_vcr",
recipe = {
"homedecor:vcr",
"homedecor:dvd_player"
},
})
minetest.register_craft( {
output = "homedecor:telephone",
recipe = {
{ "homedecor:speaker_driver", "basic_materials:copper_wire", "homedecor:speaker_driver" },
{ "basic_materials:plastic_sheet", "default:steel_ingot", "basic_materials:plastic_sheet" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }
},
})
type = "fuel",
recipe = "homedecor:projection_screen",
burntime = 30,
})

View File

@ -1,4 +1,4 @@
name = homedecor_electronics
description = Homedecor mod: electronics
depends = homedecor_common, default, basic_materials
depends = homedecor_common
optional_depends = moreblocks

View File

@ -1,22 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"creative",
"default",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -21,32 +21,56 @@ homedecor.register("barbecue", {
},
"homedecor_barbecue_meat.png",
},
groups = { snappy=3 },
groups = { snappy=3, dig_tree = 2 },
light_source = 9,
selection_box = bbq_cbox,
collision_box = bbq_cbox,
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
-- no need for placeholder it appears
expand = { top="air" },
crafts = {
{
recipe = {
{ "","homedecor:fence_chainlink","" },
{ "steel_ingot","fake_fire:embers","steel_ingot" },
{ "basic_materials:steel_bar","steel_ingot","basic_materials:steel_bar" }
},
}
}
})
minetest.register_alias("homedecor:barbecue_meat", "air")
local wood_tex = homedecor.textures.default_wood
homedecor.register("doghouse", {
mesh = "homedecor_doghouse.obj",
tiles = {
"homedecor_shingles_terracotta.png",
"default_wood.png",
wood_tex,
"building_blocks_towel.png"
},
description = S("Doghouse"),
inventory_image = "homedecor_doghouse_inv.png",
selection_box = homedecor.nodebox.slab_y(1.5),
collision_box = homedecor.nodebox.slab_y(1.5),
groups = {snappy=3},
groups = {snappy=3, dig_tree = 2},
expand = { top="placeholder" },
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
crafts = {
{
recipe = {
{"homedecor:shingles_terracotta", "homedecor:shingles_terracotta", "homedecor:shingles_terracotta"},
{"group:wood", "", "group:wood"},
{"group:wood", "building_blocks:terrycloth_towel", "group:wood"}
},
}
}
})
minetest.register_alias("homedecor:doghouse_roof", "air")
@ -55,10 +79,10 @@ minetest.register_alias("homedecor:doghouse_base", "homedecor:doghouse")
homedecor.register("stonepath", {
description = S("Garden stone path"),
tiles = {
"default_stone.png"
minetest.registered_nodes["mapgen_stone"].tiles[1],
},
inventory_image = "homedecor_stonepath_inv.png",
groups = { snappy=3 },
groups = { snappy=3, dig_stone = 2 },
node_box = {
type = "fixed",
fixed = {
@ -76,7 +100,35 @@ homedecor.register("stonepath", {
type = "fixed",
fixed = { -0.4375, -0.5, -0.4375, 0.4375, -0.4, 0.4375 }
},
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
crafts = {
{
output = "homedecor:stonepath 16",
recipe = {
{ "slab_stone","","slab_stone" },
{ "","slab_stone","" },
{ "slab_stone","","slab_stone" }
},
},
{
output = "homedecor:stonepath 16",
recipe = {
{ "moreblocks:slab_stone","","moreblocks:slab_stone" },
{ "","moreblocks:slab_stone","" },
{ "moreblocks:slab_stone","","moreblocks:slab_stone" }
},
},
{
output = "homedecor:stonepath 3",
recipe = {
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" },
{ "","moreblocks:micro_stone_1","" },
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" }
},
}
}
})
local lattice_colors = {
@ -95,7 +147,7 @@ homedecor.register("lattice_"..name, {
tiles = {"homedecor_lattice"..texture},
inventory_image = "homedecor_lattice"..texture,
use_texture_alpha = "clip",
groups = { snappy=3 },
groups = { snappy=3, dig_tree = 2 },
node_box = {
type = "fixed",
fixed = {
@ -110,7 +162,9 @@ homedecor.register("lattice_"..name, {
type = "fixed",
fixed = {-0.5, -0.5, 0.44, 0.5, 0.5, 0.5}
},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
end
@ -123,8 +177,10 @@ homedecor.register("swing", {
},
inventory_image = "homedecor_swing_inv.png",
use_texture_alpha = "clip",
groups = { snappy=3, oddly_breakable_by_hand=3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy=3, oddly_breakable_by_hand=3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
node_box = {
@ -172,7 +228,7 @@ homedecor.register("swing", {
minetest.set_node({ x=pos.x, y=pos.y-height, z=pos.z }, { name = "homedecor:swing", param2 = fdir })
if not creative.is_enabled_for(placer_name) then
if not minetest.is_creative_enabled(placer_name) then
itemstack:take_item()
end
else
@ -190,7 +246,30 @@ homedecor.register("swing", {
return
end
end
end
end,
crafts = {
{
recipe = {
{ "string","","string" },
{ "string","","string" },
{ "string","slab_wood","string" }
},
},
{
recipe = {
{ "string","","string" },
{ "string","","string" },
{ "string","moreblocks:slab_wood","string" }
},
},
{
recipe = {
{ "string","","string" },
{ "string","","string" },
{ "string","moreblocks:panel_wood_1","string" }
},
}
}
})
homedecor.register("swing_rope", {
@ -209,28 +288,50 @@ homedecor.register("swing_rope", {
selection_box = homedecor.nodebox.null
})
local water_tex = "default_water.png"
if not minetest.get_modpath("default") then water_tex = "[combine:16x16^[noalpha^[colorize:#00008b" end
local cobble_tex = minetest.registered_nodes["mapgen_stone"].tiles[1]
local stone_drop = minetest.registered_nodes["mapgen_stone"].drop
if stone_drop and type(stone_drop) == "string" then
cobble_tex = minetest.registered_nodes[stone_drop].tiles[1]
elseif stone_drop and type(stone_drop) == "table" then
cobble_tex = minetest.registered_nodes[stone_drop.items[1].items[1]].tiles[1]
end
homedecor.register("well", {
mesh = "homedecor_well.obj",
tiles = {
"homedecor_rope_texture.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
"default_water.png",
"default_cobble.png",
"default_wood.png",
water_tex,
cobble_tex,
wood_tex,
"homedecor_shingles_wood.png"
},
inventory_image = "homedecor_well_inv.png",
description = S("Water well"),
use_texture_alpha = "clip",
groups = { snappy = 3 },
groups = { snappy = 3, dig_stone = 1 },
selection_box = homedecor.nodebox.slab_y(2),
collision_box = homedecor.nodebox.slab_y(2),
expand = { top="placeholder" },
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
crafts = {
{
recipe = {
{ "homedecor:shingles_wood", "homedecor:shingles_wood", "homedecor:shingles_wood" },
{ "group:wood", "group:stick", "group:wood" },
{ "group:stone", "", "group:stone" }
},
}
}
})
if minetest.get_modpath("bucket") then
--because the engine of all people cant follow right to a name, need to verify bucket empty
if minetest.get_modpath("bucket") and minetest.registered_items["bucket:bucket_empty"] then
local original_bucket_on_use = minetest.registered_items["bucket:bucket_empty"].on_use
minetest.override_item("bucket:bucket_empty", {
on_use = function(itemstack, user, pointed_thing)
@ -269,8 +370,18 @@ for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
paramtype = "light",
is_ground_content = false,
use_texture_alpha = "clip",
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
groups = {snappy=3, flammable=2, dig_tree = 3},
_sound_def = {
key = "node_sound_leaves_defaults",
},
crafts = {
{
type = "shapeless",
recipe = {
"homedecor:shrubbery_"..color
}
}
}
})
minetest.register_node(":homedecor:shrubbery_"..color, {
@ -285,105 +396,46 @@ for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
paramtype = "light",
is_ground_content = false,
use_texture_alpha = "clip",
groups = {snappy=3, flammable=2},
sounds = default.node_sound_leaves_defaults(),
groups = {snappy=3, flammable=2, dig_tree = 3},
_sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = shrub_cbox,
collision_box = shrub_cbox,
crafts = {
{
type = "shapeless",
recipe = {
"homedecor:shrubbery_large_"..color
}
}
}
})
if color ~= "green" then
minetest.register_craft({
type = "shapeless",
output = "homedecor:shrubbery_large_"..color,
recipe = {
"homedecor:shrubbery_large_green",
homedecor.materials["dye_"..color]
}
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:shrubbery_"..color,
recipe = {
"homedecor:shrubbery_green",
homedecor.materials["dye_"..color]
}
})
end
end
-- crafting
minetest.register_craft({
output = "homedecor:chimney 2",
recipe = {
{ "default:clay_brick", "", "default:clay_brick" },
{ "default:clay_brick", "", "default:clay_brick" },
{ "default:clay_brick", "", "default:clay_brick" },
},
})
minetest.register_craft( {
output = "homedecor:doghouse",
recipe = {
{"homedecor:shingles_terracotta", "homedecor:shingles_terracotta", "homedecor:shingles_terracotta"},
{"group:wood", "", "group:wood"},
{"group:wood", "building_blocks:terrycloth_towel", "group:wood"}
},
})
minetest.register_craft( {
output = "homedecor:well",
recipe = {
{ "homedecor:shingles_wood", "homedecor:shingles_wood", "homedecor:shingles_wood" },
{ "group:wood", "group:stick", "group:wood" },
{ "group:stone", "", "group:stone" }
},
})
minetest.register_craft({
output = "homedecor:stonepath 16",
recipe = {
{ "stairs:slab_stone","","stairs:slab_stone" },
{ "","stairs:slab_stone","" },
{ "stairs:slab_stone","","stairs:slab_stone" }
},
})
minetest.register_craft({
output = "homedecor:stonepath 16",
recipe = {
{ "moreblocks:slab_stone","","moreblocks:slab_stone" },
{ "","moreblocks:slab_stone","" },
{ "moreblocks:slab_stone","","moreblocks:slab_stone" }
},
})
minetest.register_craft({
output = "homedecor:stonepath 3",
recipe = {
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" },
{ "","moreblocks:micro_stone_1","" },
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" }
},
})
minetest.register_craft({
output = "homedecor:barbecue",
recipe = {
{ "","homedecor:fence_chainlink","" },
{ "default:steel_ingot","fake_fire:embers","default:steel_ingot" },
{ "basic_materials:steel_bar","default:steel_ingot","basic_materials:steel_bar" }
},
})
minetest.register_craft({
output = "homedecor:swing",
recipe = {
{ "farming:string","","farming:string" },
{ "farming:string","","farming:string" },
{ "farming:string","stairs:slab_wood","farming:string" }
},
})
minetest.register_craft({
output = "homedecor:swing",
recipe = {
{ "farming:string","","farming:string" },
{ "farming:string","","farming:string" },
{ "farming:string","moreblocks:slab_wood","farming:string" }
},
})
minetest.register_craft({
output = "homedecor:swing",
recipe = {
{ "farming:string","","farming:string" },
{ "farming:string","","farming:string" },
{ "farming:string","moreblocks:panel_wood_1","farming:string" }
},
})
minetest.register_craft({
output = "homedecor:lattice_wood 8",
recipe = {
@ -397,7 +449,7 @@ minetest.register_craft({
output = "homedecor:lattice_white_wood 8",
recipe = {
{"group:stick", "group:wood", "group:stick"},
{"group:wood", "dye:white", "group:wood"},
{"group:wood", homedecor.materials["dye_white"], "group:wood"},
{"group:stick", "group:wood", "group:stick"},
},
})
@ -416,7 +468,7 @@ minetest.register_craft({
recipe = {
{"group:stick", "group:wood", "group:stick"},
{"group:wood", "group:leaves", "group:wood"},
{"group:stick", "dye:white", "group:stick"},
{"group:stick", homedecor.materials["dye_white"], "group:stick"},
},
})
@ -430,46 +482,6 @@ minetest.register_craft({
}
})
for color, _ in pairs(homedecor_exterior.shrub_colors) do
minetest.register_craft({
type = "shapeless",
output = "homedecor:shrubbery_large_"..color,
recipe = {
"homedecor:shrubbery_"..color
}
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:shrubbery_"..color,
recipe = {
"homedecor:shrubbery_large_"..color
}
})
if color ~= "green" then
minetest.register_craft({
type = "shapeless",
output = "homedecor:shrubbery_large_"..color,
recipe = {
"homedecor:shrubbery_large_green",
"dye:"..color
}
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:shrubbery_"..color,
recipe = {
"homedecor:shrubbery_green",
"dye:"..color
}
})
end
end
-- aliases
minetest.register_alias("homedecor:well_top", "air")

View File

@ -1,4 +1,4 @@
name = homedecor_exterior
description = Homedecor mod: exterior
depends = homedecor_common, default, dye, creative, basic_materials
depends = homedecor_common
optional_depends = moreblocks, building_blocks, bucket, screwdriver

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
}
globals = {
"signs_lib",
}

View File

@ -2,14 +2,30 @@
local S = minetest.get_translator("homedecor_fences")
local brass = {
output = "homedecor:fence_brass 6",
recipe = {
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
},
}
local iron = {
output = "homedecor:fence_wrought_iron 6",
recipe = {
{ "iron_lump","iron_lump","iron_lump" },
{ "iron_lump","iron_lump","iron_lump" },
},
}
local materials = {
{ S("brass"), "brass" },
{ S("wrought iron"), "wrought_iron" },
{ S("brass"), "brass", brass },
{ S("wrought iron"), "wrought_iron", iron },
}
for _, m in ipairs(materials) do
local desc, name = unpack(m)
local desc, name, craft = unpack(m)
homedecor.register("fence_"..name, {
description = S("Fence/railing (@1)", desc),
@ -17,8 +33,13 @@ for _, m in ipairs(materials) do
tiles = {"homedecor_generic_metal_"..name..".png"},
inventory_image = "homedecor_fence_"..name..".png",
selection_box = homedecor.nodebox.bar_y(1/7),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
craft
}
})
end
@ -36,10 +57,29 @@ homedecor.register("fence_picket", {
"homedecor_fence_picket.png"
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.1),
node_box = homedecor.nodebox.slab_z(-0.002),
crafts = {
{
output = "homedecor:fence_picket 6",
recipe = {
{ "group:stick", "group:stick", "group:stick" },
{ "group:stick", "", "group:stick" },
{ "group:stick", "group:stick", "group:stick" }
},
},
{
type = "shapeless",
output = "homedecor:fence_picket 2",
recipe = {
"homedecor:fence_picket_corner"
},
}
}
})
homedecor.register("fence_picket_corner", {
@ -53,10 +93,21 @@ homedecor.register("fence_picket_corner", {
"homedecor_fence_picket.png",
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.1, -0.1),
node_box = homedecor.nodebox.corner_xz(0.002, -0.002),
crafts = {
{
type = "shapeless",
recipe = {
"homedecor:fence_picket",
"homedecor:fence_picket"
},
},
}
})
homedecor.register("fence_picket_white", {
@ -70,10 +121,29 @@ homedecor.register("fence_picket_white", {
"homedecor_fence_picket_white.png"
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.1),
node_box = homedecor.nodebox.slab_z(-0.002),
crafts = {
{
output = "homedecor:fence_picket_white 6",
recipe = {
{ "group:stick", "group:stick", "group:stick" },
{ "group:stick", "dye_white", "group:stick" },
{ "group:stick", "group:stick", "group:stick" }
},
},
{
type = "shapeless",
output = "homedecor:fence_picket_white 2",
recipe = {
"homedecor:fence_picket_corner_white"
},
}
}
})
homedecor.register("fence_picket_corner_white", {
@ -87,10 +157,21 @@ homedecor.register("fence_picket_corner_white", {
"homedecor_fence_picket_white.png",
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.1, -0.1),
node_box = homedecor.nodebox.corner_xz(0.002, -0.002),
crafts = {
{
type = "shapeless",
recipe = {
"homedecor:fence_picket_white",
"homedecor:fence_picket_white"
},
}
}
})
homedecor.register("fence_privacy", {
@ -103,8 +184,10 @@ homedecor.register("fence_privacy", {
"homedecor_fence_privacy_backside.png",
"homedecor_fence_privacy_front.png"
},
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-3/16),
node_box = {
type = "fixed",
@ -115,6 +198,23 @@ homedecor.register("fence_privacy", {
{ -8/16, -2/16, 7/16, 8/16, 2/16, 8/16 }, -- connecting rung
}
},
crafts = {
{
output = "homedecor:fence_privacy 6",
recipe = {
{ "group:wood", "group:stick", "group:wood" },
{ "group:wood", "", "group:wood" },
{ "group:wood", "group:stick", "group:wood" }
},
},
{
type = "shapeless",
output = "homedecor:fence_privacy 2",
recipe = {
"homedecor:fence_privacy_corner"
},
}
}
})
homedecor.register("fence_privacy_corner", {
@ -127,8 +227,10 @@ homedecor.register("fence_privacy_corner", {
"homedecor_fence_privacy_backside.png",
"homedecor_fence_privacy_corner_front.png"
},
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = {
type = "fixed",
fixed = {
@ -150,6 +252,15 @@ homedecor.register("fence_privacy_corner", {
{ -8/16, -2/16, -8/16, -7/16, 2/16, 7/16 }, -- left-side connecting rung
}
},
crafts = {
{
type = "shapeless",
recipe = {
"homedecor:fence_privacy",
"homedecor:fence_privacy"
},
},
}
})
homedecor.register("fence_barbed_wire", {
@ -157,10 +268,27 @@ homedecor.register("fence_barbed_wire", {
mesh = "homedecor_fence_barbed_wire.obj",
tiles = {"homedecor_fence_barbed_wire.png"},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.125),
collision_box = homedecor.nodebox.slab_z(-0.125),
crafts = {
{
output = "homedecor:fence_barbed_wire 6",
recipe = {
{ "group:stick", "basic_materials:steel_wire", "group:stick" },
{ "group:stick", "", "group:stick" },
{ "group:stick", "basic_materials:steel_wire", "group:stick" }
},
},
{
type = "shapeless",
output = "homedecor:fence_barbed_wire 2",
recipe = { "homedecor:fence_barbed_wire_corner" },
}
}
})
homedecor.register("fence_barbed_wire_corner", {
@ -168,10 +296,18 @@ homedecor.register("fence_barbed_wire_corner", {
mesh = "homedecor_fence_barbed_wire_corner.obj",
tiles = { "homedecor_fence_barbed_wire.png" },
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.125, -0.125),
collision_box = homedecor.nodebox.corner_xz(0.125, -0.125),
crafts = {
{
type = "shapeless",
recipe = { "homedecor:fence_barbed_wire", "homedecor:fence_barbed_wire" },
}
}
})
homedecor.register("fence_chainlink", {
@ -186,10 +322,27 @@ homedecor.register("fence_chainlink", {
"homedecor_fence_chainlink_fb.png",
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.125),
collision_box = homedecor.nodebox.slab_z(-0.125),
crafts = {
{
output = "homedecor:fence_chainlink 9",
recipe = {
{ "steel_ingot", "steel_ingot", "steel_ingot" },
{ "basic_materials:steel_wire", "basic_materials:steel_wire", "steel_ingot" },
{ "basic_materials:steel_wire", "basic_materials:steel_wire", "steel_ingot" }
},
},
{
type = "shapeless",
output = "homedecor:fence_chainlink 2",
recipe = { "homedecor:fence_chainlink_corner" },
}
}
})
@ -205,10 +358,18 @@ homedecor.register("fence_chainlink_corner", {
"homedecor_fence_chainlink_corner_front.png",
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.125, -0.125),
collision_box = homedecor.nodebox.corner_xz(0.125, -0.125),
crafts = {
{
type = "shapeless",
recipe = { "homedecor:fence_chainlink", "homedecor:fence_chainlink" },
}
}
})
homedecor.register("fence_wrought_iron_2", {
@ -222,8 +383,10 @@ homedecor.register("fence_wrought_iron_2", {
"homedecor_fence_wrought_iron_2_fb.png"
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.08),
node_box = {
type = "fixed",
@ -237,6 +400,22 @@ homedecor.register("fence_wrought_iron_2", {
{ -8/16, -8/16, 15/32, 8/16, 8/16, 15/32 } -- the grid itself
}
},
crafts = {
{
output = "homedecor:fence_wrought_iron_2 4",
recipe = {
{ "homedecor:pole_wrought_iron", "iron_lump" },
{ "homedecor:pole_wrought_iron", "iron_lump" },
},
}
},
{
type = "shapeless",
output = "homedecor:fence_wrought_iron_2 2",
recipe = {
"homedecor:fence_wrought_iron_2_corner",
},
}
})
homedecor.register("fence_wrought_iron_2_corner", {
@ -250,8 +429,10 @@ homedecor.register("fence_wrought_iron_2_corner", {
"homedecor_fence_corner_wrought_iron_2_sides.png"
},
use_texture_alpha = "clip",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.08, -0.08),
node_box = {
type = "fixed",
@ -271,10 +452,20 @@ homedecor.register("fence_wrought_iron_2_corner", {
{ -15.25/32, -0.015625, -0.5, -14.75/32, 0.015625, 0.5 } -- cross piece side
}
},
crafts = {
{
type = "shapeless",
output = "homedecor:fence_wrought_iron_2_corner",
recipe = {
"homedecor:fence_wrought_iron_2",
"homedecor:fence_wrought_iron_2"
},
}
}
})
-- insert the old wood signs-on-metal-fences into signs_lib's conversion LBM
if minetest.get_modpath("signs_lib") then
if minetest.get_modpath("signs_lib") and minetest.get_modpath("default") then
-- FIXME: export a function in signs_lib API to allow signs_lib to be read only in .luacheckrc
table.insert(signs_lib.old_fenceposts_with_signs, "homedecor:fence_brass_with_sign")
signs_lib.old_fenceposts["homedecor:fence_brass_with_sign"] = "homedecor:fence_brass"
@ -284,183 +475,3 @@ if minetest.get_modpath("signs_lib") then
signs_lib.old_fenceposts["homedecor:fence_wrought_iron_with_sign"] = "homedecor:fence_wrought_iron"
signs_lib.old_fenceposts_replacement_signs["homedecor:fence_wrought_iron_with_sign"] = "default:sign_wall_wood_onpole"
end
-- crafting
-- Brass/wrought iron fences
minetest.register_craft( {
output = "homedecor:fence_brass 6",
recipe = {
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
},
})
minetest.register_craft( {
output = "homedecor:fence_wrought_iron 6",
recipe = {
{ "default:iron_lump","default:iron_lump","default:iron_lump" },
{ "default:iron_lump","default:iron_lump","default:iron_lump" },
},
})
-- other types of fences
minetest.register_craft( {
output = "homedecor:fence_wrought_iron_2 4",
recipe = {
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_wrought_iron_2_corner",
recipe = {
"homedecor:fence_wrought_iron_2",
"homedecor:fence_wrought_iron_2"
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_wrought_iron_2 2",
recipe = {
"homedecor:fence_wrought_iron_2_corner",
},
})
--
minetest.register_craft( {
output = "homedecor:fence_picket 6",
recipe = {
{ "group:stick", "group:stick", "group:stick" },
{ "group:stick", "", "group:stick" },
{ "group:stick", "group:stick", "group:stick" }
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_picket_corner",
recipe = {
"homedecor:fence_picket",
"homedecor:fence_picket"
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_picket 2",
recipe = {
"homedecor:fence_picket_corner"
},
})
--
minetest.register_craft( {
output = "homedecor:fence_picket_white 6",
recipe = {
{ "group:stick", "group:stick", "group:stick" },
{ "group:stick", "dye:white", "group:stick" },
{ "group:stick", "group:stick", "group:stick" }
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_picket_corner_white",
recipe = {
"homedecor:fence_picket_white",
"homedecor:fence_picket_white"
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_picket_white 2",
recipe = {
"homedecor:fence_picket_corner_white"
},
})
--
minetest.register_craft( {
output = "homedecor:fence_privacy 6",
recipe = {
{ "group:wood", "group:stick", "group:wood" },
{ "group:wood", "", "group:wood" },
{ "group:wood", "group:stick", "group:wood" }
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_privacy_corner",
recipe = {
"homedecor:fence_privacy",
"homedecor:fence_privacy"
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_privacy 2",
recipe = {
"homedecor:fence_privacy_corner"
},
})
--
minetest.register_craft( {
output = "homedecor:fence_barbed_wire 6",
recipe = {
{ "group:stick", "basic_materials:steel_wire", "group:stick" },
{ "group:stick", "", "group:stick" },
{ "group:stick", "basic_materials:steel_wire", "group:stick" }
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_barbed_wire_corner",
recipe = { "homedecor:fence_barbed_wire", "homedecor:fence_barbed_wire" },
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_barbed_wire 2",
recipe = { "homedecor:fence_barbed_wire_corner" },
})
--
minetest.register_craft( {
output = "homedecor:fence_chainlink 9",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "basic_materials:steel_wire", "basic_materials:steel_wire", "default:steel_ingot" },
{ "basic_materials:steel_wire", "basic_materials:steel_wire", "default:steel_ingot" }
},
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_chainlink_corner",
recipe = { "homedecor:fence_chainlink", "homedecor:fence_chainlink" },
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:fence_chainlink 2",
recipe = { "homedecor:fence_chainlink_corner" },
})

View File

@ -1,4 +1,4 @@
name = homedecor_fences
description = Homedecor mod: fences
depends = homedecor_common, default, basic_materials, dye
optional_depends = signs_lib
depends = homedecor_common
optional_depends = signs_lib, default, basic_materials, dye

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -4,8 +4,10 @@ homedecor.register("coatrack_wallmount", {
tiles = { homedecor.plain_wood },
inventory_image = "homedecor_coatrack_wallmount_inv.png",
description = S("Wall-mounted coat rack"),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = {
type = "fixed",
fixed = {
@ -20,6 +22,13 @@ homedecor.register("coatrack_wallmount", {
{0.0525, 0.025, 0.352697, 0.135, 0.115, 0.375}, -- NodeBox9
}
},
crafts = {
{
recipe = {
{ "group:stick", "homedecor:curtainrod_wood", "group:stick" },
},
}
}
})
homedecor.register("coat_tree", {
@ -30,8 +39,10 @@ homedecor.register("coat_tree", {
},
inventory_image = "homedecor_coatrack_inv.png",
description = S("Coat tree"),
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
expand = { top="placeholder" },
walkable = false,
selection_box = {
@ -39,16 +50,59 @@ homedecor.register("coat_tree", {
fixed = { -0.4, -0.5, -0.4, 0.4, 1.5, 0.4 }
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
crafts = {
{
recipe = {
{ "group:stick", "group:stick", "group:stick" },
{ "", "group:stick", "" },
{ "", "group:wood", "" }
},
}
}
})
local grey = {{
output = "homedecor:welcome_mat_grey 2",
recipe = {
{ "", "dye_black", "" },
{ "wool_grey", "wool_grey", "wool_grey" },
},
}}
local brown = {{
output = "homedecor:welcome_mat_brown 2",
recipe = {
{ "", "dye_black", "" },
{ "wool_brown", "wool_brown", "wool_brown" },
},
}}
local green = {
{
output = "homedecor:welcome_mat_green 2",
recipe = {
{ "", "dye_white", "" },
{ "wool_dark_green", "wool_dark_green", "wool_dark_green" },
},
},
{
output = "homedecor:welcome_mat_green 2",
recipe = {
{ "", "dye_white", "" },
{ "dye_black", "dye_black", "dye_black" },
{ "wool_green", "wool_green", "wool_green" },
},
}
}
local mat_colors = {
{ "green", S("Green welcome mat") },
{ "brown", S("Brown welcome mat") },
{ "grey", S("Grey welcome mat") },
{ "green", S("Green welcome mat"), green },
{ "brown", S("Brown welcome mat"), brown },
{ "grey", S("Grey welcome mat"), grey },
}
for _, mat in ipairs(mat_colors) do
local color, desc = unpack(mat)
local color, desc, crafts = unpack(mat)
homedecor.register("welcome_mat_"..color, {
description = desc,
tiles = {
@ -56,65 +110,14 @@ for _, mat in ipairs(mat_colors) do
"homedecor_welcome_mat_bottom.png",
"homedecor_welcome_mat_"..color..".png",
},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.25},
}),
groups = {crumbly=3, dig_tree=2},
_sound_def = {
key = "node_sound_dirt_defaults",
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.375, 0.5, -0.46875, 0.375 }
}
},
crafts = crafts
})
end
-- crafting
minetest.register_craft({
output = "homedecor:welcome_mat_grey 2",
recipe = {
{ "", "dye:black", "" },
{ "wool:grey", "wool:grey", "wool:grey" },
},
})
minetest.register_craft({
output = "homedecor:welcome_mat_brown 2",
recipe = {
{ "", "dye:black", "" },
{ "wool:brown", "wool:brown", "wool:brown" },
},
})
minetest.register_craft({
output = "homedecor:welcome_mat_green 2",
recipe = {
{ "", "dye:white", "" },
{ "wool:dark_green", "wool:dark_green", "wool:dark_green" },
},
})
minetest.register_craft({
output = "homedecor:welcome_mat_green 2",
recipe = {
{ "", "dye:white", "" },
{ "dye:black", "dye:black", "dye:black" },
{ "wool:green", "wool:green", "wool:green" },
},
})
minetest.register_craft( {
output = "homedecor:coat_tree",
recipe = {
{ "group:stick", "group:stick", "group:stick" },
{ "", "group:stick", "" },
{ "", "group:wood", "" }
},
})
minetest.register_craft( {
output = "homedecor:coatrack_wallmount",
recipe = {
{ "group:stick", "homedecor:curtainrod_wood", "group:stick" },
},
})
end

View File

@ -1,4 +1,4 @@
name = homedecor_foyer
description = Homedecor mod: foyer
depends = homedecor_common, default, dye
optional_depends = screwdriver
depends = homedecor_common
optional_depends = screwdriver, default, dye

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"unifieddyes",
"homedecor",
}
globals = {
}

View File

@ -5,29 +5,44 @@ local ob_cbox = {
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0.5 }
}
minetest.register_node(":homedecor:openframe_bookshelf", {
local wood_tex = homedecor.textures.default_wood
homedecor.register("openframe_bookshelf", {
description = S("Bookshelf (open-frame)"),
drawtype = "mesh",
mesh = "homedecor_openframe_bookshelf.obj",
tiles = {
"homedecor_openframe_bookshelf_books.png",
"default_wood.png"
wood_tex
},
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
paramtype = "light",
paramtype2 = "facedir",
selection_box = ob_cbox,
collision_box = ob_cbox,
crafts = {
{
recipe = {
{"group:wood", "", "group:wood"},
{"book", "book", "book"},
{"group:wood", "", "group:wood"},
},
}
}
})
homedecor.register("wall_shelf", {
description = S("Wall Shelf"),
tiles = {
"default_wood.png",
wood_tex,
},
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {

View File

@ -1,4 +1,4 @@
name = homedecor_furniture
description = Homedecor mod: furniture
depends = homedecor_common, default, unifieddyes, wool
optional_depends = moreblocks, technic, bucket
depends = homedecor_common
optional_depends = moreblocks, technic, bucket, default, unifieddyes, wool

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
}
globals = {
}

View File

@ -17,8 +17,19 @@ homedecor.register("bars", {
type = "fixed",
fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 },
},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, dig_stone=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
crafts = {
{
output = "homedecor:bars 6",
recipe = {
{ "steel_ingot","steel_ingot","steel_ingot" },
{ "homedecor:pole_wrought_iron","homedecor:pole_wrought_iron","homedecor:pole_wrought_iron" },
},
}
}
})
--L Binding Bars
@ -37,8 +48,19 @@ homedecor.register("L_binding_bars", {
{ -0.05, 0.45, -0.50, 0.05, 0.50, 0.00 },
},
},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
groups = {cracky=3, dig_stone=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
crafts = {
{
output = "homedecor:L_binding_bars 3",
recipe = {
{ "homedecor:bars","" },
{ "homedecor:bars","homedecor:bars" },
},
}
}
})
local chain_cbox = {
@ -53,25 +75,9 @@ homedecor.register("chains", {
inventory_image="forniture_chains_inv.png",
selection_box = chain_cbox,
walkable = false,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
-- Crafts
minetest.register_craft({
output = "homedecor:bars 6",
recipe = {
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" },
{ "homedecor:pole_wrought_iron","homedecor:pole_wrought_iron","homedecor:pole_wrought_iron" },
},
})
minetest.register_craft({
output = "homedecor:L_binding_bars 3",
recipe = {
{ "homedecor:bars","" },
{ "homedecor:bars","homedecor:bars" },
groups = {cracky=3, dig_stone=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
})

View File

@ -1,3 +1,3 @@
name = homedecor_furniture_medieval
description = Homedecor mod: furniture medieval
depends = homedecor_common, default, creative
depends = homedecor_common

View File

@ -1,22 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"creative",
"default",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -14,10 +14,12 @@ homedecor.register("cutlery_set", {
tiles = { "homedecor_cutlery_set.png" },
inventory_image = "homedecor_cutlery_set_inv.png",
description = S("Cutlery set"),
groups = {snappy=3},
groups = {snappy=3, dig_stone=3},
selection_box = cutlery_cbox,
walkable = false,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
})
local bottle_cbox = {
@ -49,8 +51,10 @@ for _, b in ipairs(bottle_colors) do
description = desc,
mesh = "homedecor_bottle.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = bottle_cbox
})
@ -65,8 +69,10 @@ for _, b in ipairs(bottle_colors) do
description = desc4,
mesh = "homedecor_4_bottles.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
groups = {snappy=3, dig_stone=3},
_sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = fbottle_cbox
})
end
@ -79,9 +85,11 @@ homedecor.register("4_bottles_multi", {
inventory_image = "homedecor_4_bottles_multi_inv.png",
description = S("Four misc brown/green bottles"),
mesh = "homedecor_4_bottles.obj",
groups = {snappy=3},
groups = {snappy=3, dig_stone=3},
walkable = false,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = fbottle_cbox
})
@ -97,10 +105,12 @@ homedecor.register("wine_rack", {
"homedecor_bottle_brown4.png"
},
inventory_image = "homedecor_wine_rack_inv.png",
groups = {choppy=2},
groups = {choppy=2, dig_tree=2},
selection_box = wine_cbox,
collision_box = wine_cbox,
sounds = default.node_sound_defaults(),
_sound_def = {
key = "node_sound_defaults",
},
})
-- coffee!
@ -125,10 +135,19 @@ homedecor.register("coffee_maker", {
description = S("Coffee Maker"),
inventory_image = "homedecor_coffeemaker_inv.png",
walkable = false,
groups = {snappy=3},
groups = {snappy=3, dig_stone=3},
selection_box = cm_cbox,
node_box = cm_cbox,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
crafts = {
{
recipe = {
{"basic_materials:plastic_sheet", "bucket:bucket_water", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "glass_block", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
},
}
}
})
homedecor.register("toaster", {
@ -137,7 +156,7 @@ homedecor.register("toaster", {
inventory_image = "homedecor_toaster_inv.png",
walkable = false,
use_texture_alpha = "clip",
groups = { snappy=3 },
groups = { snappy=3, dig_stone=3 },
node_box = {
type = "fixed",
fixed = {
@ -153,7 +172,15 @@ homedecor.register("toaster", {
max_hear_distance = 5
})
return itemstack
end
end,
crafts = {
{
recipe = {
{ "steel_ingot", "basic_materials:heating_element", "steel_ingot" },
{ "steel_ingot", "basic_materials:heating_element", "steel_ingot" }
},
}
}
})
homedecor.register("toaster_loaf", {
@ -167,7 +194,7 @@ homedecor.register("toaster_loaf", {
},
walkable = false,
use_texture_alpha = "clip",
groups = { snappy=3, not_in_creative_inventory=1 },
groups = { snappy=3, not_in_creative_inventory=1, dig_stone=3 },
node_box = {
type = "fixed",
fixed = {
@ -226,35 +253,17 @@ minetest.register_abm({
minetest.register_craft( {
output = "homedecor:bottle_green",
recipe = {
{ "vessels:glass_bottle", "dye:green" }
{ homedecor.materials["glass_bottle"], homedecor.materials["dye_green"] }
},
})
minetest.register_craft( {
output = "homedecor:bottle_brown",
recipe = {
{ "vessels:glass_bottle", "dye:brown" }
{ homedecor.materials["glass_bottle"], homedecor.materials["dye_brown"] }
},
})
minetest.register_craft({
output = "homedecor:coffee_maker",
recipe = {
{"basic_materials:plastic_sheet", "bucket:bucket_water", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
},
})
minetest.register_craft({
output = "homedecor:toaster",
recipe = {
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
},
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:4_bottles_brown",

View File

@ -1,4 +1,4 @@
name = homedecor_gastronomy
description = Homedecor mod: gastronomy
depends = homedecor_common, default, basic_materials, dye, creative
depends = homedecor_common
optional_depends = bucket, screwdriver

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"screwdriver", "homedecor",
}
globals = {
}

View File

@ -2,15 +2,6 @@ local S = minetest.get_translator("inbox")
local inbox = {}
minetest.register_craft({
output ="homedecor:inbox",
recipe = {
{"","default:steel_ingot",""},
{"default:steel_ingot","","default:steel_ingot"},
{"default:steel_ingot","default:steel_ingot","default:steel_ingot"}
}
})
local mb_cbox = {
type = "fixed",
fixed = { -5/16, -8/16, -8/16, 5/16, 2/16, 8/16 }
@ -31,7 +22,9 @@ homedecor.register("inbox", {
collision_box = mb_cbox,
paramtype2 = "facedir",
groups = {choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos)
@ -103,6 +96,15 @@ homedecor.register("inbox", {
allow_metadata_inventory_move = function(pos)
return 0
end,
crafts = {
{
recipe = {
{"","steel_ingot",""},
{"steel_ingot","","steel_ingot"},
{"steel_ingot","steel_ingot","steel_ingot"}
}
}
}
})
minetest.register_alias("inbox:empty", "homedecor:inbox")

View File

@ -1,3 +1,3 @@
name = homedecor_inbox
depends = default, homedecor_common
depends = homedecor_common
optional_depends = screwdriver

View File

@ -1,21 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"screwdriver",
}
globals = {
}

View File

@ -8,8 +8,10 @@ homedecor.register("refrigerator_steel", {
tiles = { "homedecor_refrigerator_steel.png" },
inventory_image = "homedecor_refrigerator_steel_inv.png",
description = S("Refrigerator (stainless steel)"),
groups = {snappy=3},
sounds = default.node_sound_stone_defaults(),
groups = {snappy=3, dig_stone=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
selection_box = homedecor.nodebox.slab_y(2),
collision_box = homedecor.nodebox.slab_y(2),
expand = { top="placeholder" },
@ -27,10 +29,12 @@ homedecor.register("refrigerator_white", {
tiles = { "homedecor_refrigerator_white.png" },
inventory_image = "homedecor_refrigerator_white_inv.png",
description = S("Refrigerator"),
groups = {snappy=3},
groups = {snappy=3, dig_stone=1},
selection_box = homedecor.nodebox.slab_y(2),
collision_box = homedecor.nodebox.slab_y(2),
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
expand = { top="placeholder" },
infotext=S("Refrigerator"),
inventory = {
@ -86,6 +90,7 @@ homedecor.register_furnace("microwave_oven", {
output_width = 2,
cook_speed = 1.5,
extra_nodedef_fields = {
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.125, 0.5, 0.125, 0.5 },
@ -114,8 +119,10 @@ homedecor.register("dishwasher", {
}
},
selection_box = { type = "regular" },
sounds = default.node_sound_stone_defaults(),
groups = { snappy = 3 },
_sound_def = {
key = "node_sound_stone_defaults",
},
groups = { snappy = 3, dig_stone=1 },
})
local materials = { ["granite"] = S("granite"), ["marble"] = S("marble"), ["steel"] = S("steel"), ["wood"] = S("wood") }
@ -131,18 +138,21 @@ homedecor.register("dishwasher_"..m, {
"homedecor_dishwasher_back.png",
"homedecor_dishwasher_front.png"
},
groups = { snappy = 3 },
sounds = default.node_sound_stone_defaults(),
groups = { snappy = 3, dig_tree=1 },
_sound_def = {
key = "node_sound_stone_defaults",
},
})
end
local cabinet_sides = "(default_wood.png^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
local wood_tex = homedecor.textures.default_wood
local cabinet_sides = "("..wood_tex.."^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
local cabinet_sides_colored = "(homedecor_generic_wood_plain.png^[transformR90)^homedecor_kitchen_cabinet_bevel.png"
local ic_cabinet_sides = string.gsub(cabinet_sides, "%^", "&")
local ic_cabinet_sides_colored = string.gsub(cabinet_sides_colored, "%^", "&")
local cabinet_bottom = "(default_wood.png^[colorize:#000000:100)^homedecor_kitchen_cabinet_bevel.png"
local cabinet_bottom = "("..wood_tex.."^[colorize:#000000:100)^homedecor_kitchen_cabinet_bevel.png"
local cabinet_bottom_colored = "homedecor_generic_wood_plain.png^homedecor_kitchen_cabinet_bevel.png"
local function N_(x) return x end
@ -178,12 +188,14 @@ for _, mat in ipairs(counter_materials) do
.."{homedecor_kitchen_cabinet_front.png"
.."{"..ic_cabinet_sides,
mesh = "homedecor_kitchen_cabinet.obj",
paramtype2 = "wallmounted",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored"..material,
place_param2 = 0,
groups = { snappy = 3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
infotext=S("Kitchen Cabinet"),
inventory = {
size=24,
@ -211,8 +223,10 @@ for _, mat in ipairs(counter_materials) do
mesh = "homedecor_kitchen_cabinet.obj",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet"),
inventory = {
size=24,
@ -238,11 +252,13 @@ for _, mat in ipairs(counter_materials) do
.."{homedecor_kitchen_cabinet_front_with_drawers.png"
.."{"..ic_cabinet_sides,
mesh = "homedecor_kitchen_cabinet.obj",
paramtype2 = "wallmounted",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_with_drawers"..material,
groups = { snappy = 3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1},
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet with drawers"),
inventory = {
size=24,
@ -270,8 +286,10 @@ for _, mat in ipairs(counter_materials) do
mesh = "homedecor_kitchen_cabinet.obj",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet with drawers"),
inventory = {
size=24,
@ -282,8 +300,8 @@ for _, mat in ipairs(counter_materials) do
end
})
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1] = "homedecor:kitchen_cabinet"..material
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1] = "homedecor:kitchen_cabinet"..material.."_locked"
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1]="homedecor:kitchen_cabinet"..material
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1]="homedecor:kitchen_cabinet"..material.."_locked"
end
@ -300,14 +318,16 @@ homedecor.register("kitchen_cabinet_colorable_half", {
'homedecor_kitchen_cabinet_front_half.png^homedecor_kitchen_cabinet_half_bevel.png'
},
mesh = "homedecor_kitchen_cabinet_half.obj",
paramtype2 = "wallmounted",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_half",
place_param2 = 0,
selection_box = kitchen_cabinet_half_box,
node_box = kitchen_cabinet_half_box,
groups = { snappy = 3, ud_param2_colorable = 1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet"),
inventory = {
size=12,
@ -336,8 +356,10 @@ homedecor.register("kitchen_cabinet_colored_half", {
palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = kitchen_cabinet_half_box,
node_box = kitchen_cabinet_half_box,
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet"),
inventory = {
size=12,
@ -363,12 +385,14 @@ homedecor.register("kitchen_cabinet_colorable_with_sink", {
.."{homedecor_kitchen_sink_top.png"
.."{homedecor_kitchen_cabinet_front.png"
.."{"..ic_cabinet_sides,
paramtype2 = "wallmounted",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_with_sink",
place_param2 = 0,
groups = { snappy = 3, ud_param2_colorable = 1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Under-sink cabinet"),
inventory = {
size=16,
@ -412,8 +436,10 @@ homedecor.register("kitchen_cabinet_colored_with_sink", {
.."{"..ic_cabinet_sides_colored,
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Under-sink cabinet"),
inventory = {
size=16,
@ -447,7 +473,7 @@ homedecor.register("copper_pans", {
mesh = "homedecor_copper_pans.obj",
tiles = { "homedecor_polished_copper.png" },
inventory_image = "homedecor_copper_pans_inv.png",
groups = { snappy=3 },
groups = { snappy=3, dig_stone=1 },
selection_box = cp_cbox,
walkable = false,
on_place = minetest.rotate_node
@ -463,7 +489,7 @@ homedecor.register("kitchen_faucet", {
tiles = { "homedecor_generic_metal_bright.png" },
inventory_image = "homedecor_kitchen_faucet_inv.png",
description = S("Kitchen Faucet"),
groups = {snappy=3},
groups = {snappy=3, dig_stone=1},
selection_box = kf_cbox,
walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
@ -488,11 +514,11 @@ homedecor.register("paper_towel", {
mesh = "homedecor_paper_towel.obj",
tiles = {
"homedecor_generic_quilted_paper.png",
"default_wood.png"
wood_tex
},
inventory_image = "homedecor_paper_towel_inv.png",
description = S("Paper towels"),
groups = { snappy=3 },
groups = { snappy=3, dig_tree=1 },
walkable = false,
selection_box = {
type = "fixed",
@ -506,18 +532,18 @@ homedecor.register("paper_towel", {
minetest.register_craft({
output = "homedecor:oven_steel",
recipe = {
{"basic_materials:heating_element", "default:steel_ingot", "basic_materials:heating_element", },
{"default:steel_ingot", "moreblocks:iron_glass", "default:steel_ingot", },
{"default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot", },
{"basic_materials:heating_element", homedecor.materials.steel_ingot, "basic_materials:heating_element", },
{homedecor.materials.steel_ingot, "moreblocks:iron_glass", homedecor.materials.steel_ingot, },
{homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.steel_ingot, },
}
})
minetest.register_craft({
output = "homedecor:oven_steel",
recipe = {
{"basic_materials:heating_element", "default:steel_ingot", "basic_materials:heating_element", },
{"default:steel_ingot", "default:glass", "default:steel_ingot", },
{"default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot", },
{"basic_materials:heating_element", homedecor.materials.steel_ingot, "basic_materials:heating_element", },
{homedecor.materials.steel_ingot, homedecor.materials.glass_block, homedecor.materials.steel_ingot, },
{homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.steel_ingot, },
}
})
@ -526,35 +552,35 @@ minetest.register_craft({
output = "homedecor:oven",
recipe = {
"homedecor:oven_steel",
"dye:white",
"dye:white",
homedecor.materials.dye_white,
homedecor.materials.dye_white,
}
})
minetest.register_craft({
output = "homedecor:microwave_oven 2",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
{"default:steel_ingot", "moreblocks:iron_glass", "basic_materials:ic", },
{"default:steel_ingot", "default:copper_ingot", "basic_materials:energy_crystal_simple", },
{homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, },
{homedecor.materials.steel_ingot, "moreblocks:iron_glass", "basic_materials:ic", },
{homedecor.materials.steel_ingot, homedecor.materials.copper_ingot, "basic_materials:energy_crystal_simple", },
}
})
minetest.register_craft({
output = "homedecor:microwave_oven 2",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot", },
{"default:steel_ingot", "default:glass", "basic_materials:ic", },
{"default:steel_ingot", "default:copper_ingot", "basic_materials:energy_crystal_simple", },
{homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, },
{homedecor.materials.steel_ingot, homedecor.materials.glass_block, "basic_materials:ic", },
{homedecor.materials.steel_ingot, homedecor.materials.copper_ingot, "basic_materials:energy_crystal_simple", },
}
})
minetest.register_craft({
output = "homedecor:refrigerator_steel",
recipe = {
{"default:steel_ingot", "homedecor:glowlight_small_cube", "default:steel_ingot", },
{"default:steel_ingot", "default:copperblock", "default:steel_ingot", },
{"default:steel_ingot", "default:clay", "default:steel_ingot", },
{homedecor.materials.steel_ingot, "homedecor:glowlight_small_cube", homedecor.materials.steel_ingot, },
{homedecor.materials.steel_ingot, homedecor.materials.copper_ingot, homedecor.materials.steel_ingot, },
{homedecor.materials.steel_ingot, homedecor.materials.clay_lump, homedecor.materials.steel_ingot, },
}
})
@ -563,9 +589,9 @@ minetest.register_craft({
output = "homedecor:refrigerator_white",
recipe = {
"homedecor:refrigerator_steel",
"dye:white",
"dye:white",
"dye:white",
homedecor.materials.dye_white,
homedecor.materials.dye_white,
homedecor.materials.dye_white,
}
})
@ -581,7 +607,7 @@ minetest.register_craft({
minetest.register_craft({
output = "homedecor:kitchen_cabinet_colorable_steel",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot},
{"", "homedecor:kitchen_cabinet_colorable", ""},
}
})
@ -627,8 +653,8 @@ minetest.register_craft({
minetest.register_craft({
output = "homedecor:kitchen_cabinet_colorable_with_sink",
recipe = {
{"group:wood", "default:steel_ingot", "group:wood", },
{"group:wood", "default:steel_ingot", "group:wood", },
{"group:wood", homedecor.materials.steel_ingot, "group:wood", },
{"group:wood", homedecor.materials.steel_ingot, "group:wood", },
{"group:wood", "group:stick", "group:wood", },
}
})
@ -636,18 +662,18 @@ minetest.register_craft({
minetest.register_craft( {
output = "homedecor:dishwasher",
recipe = {
{ "basic_materials:ic", "building_blocks:slab_grate_1", "default:steel_ingot", },
{ "default:steel_ingot", "homedecor:shower_head", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:heating_element", "bucket:bucket_water" }
{ "basic_materials:ic", "building_blocks:slab_grate_1", homedecor.materials.steel_ingot, },
{ homedecor.materials.steel_ingot, "homedecor:shower_head", "basic_materials:motor" },
{ homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.water_bucket }
},
})
minetest.register_craft( {
output = "homedecor:dishwasher",
recipe = {
{ "basic_materials:ic", "homedecor:fence_chainlink", "default:steel_ingot", },
{ "default:steel_ingot", "homedecor:shower_head", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:heating_element", "bucket:bucket_water" }
{ "basic_materials:ic", "homedecor:fence_chainlink", homedecor.materials.steel_ingot, },
{ homedecor.materials.steel_ingot, "homedecor:shower_head", "basic_materials:motor" },
{ homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.water_bucket }
},
})
@ -678,7 +704,7 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:dishwasher_steel",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot },
{ "", "homedecor:dishwasher", "" },
},
})
@ -718,8 +744,8 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:kitchen_faucet",
recipe = {
{ "", "default:steel_ingot" },
{ "default:steel_ingot", "" },
{ "", homedecor.materials.steel_ingot },
{ homedecor.materials.steel_ingot, "" },
{ "homedecor:taps", "" }
},
})
@ -727,8 +753,8 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:kitchen_faucet",
recipe = {
{ "default:steel_ingot","" },
{ "", "default:steel_ingot" },
{ homedecor.materials.steel_ingot,"" },
{ "", homedecor.materials.steel_ingot },
{ "", "homedecor:taps" }
},
})
@ -753,8 +779,8 @@ minetest.register_craft({
output = "homedecor:copper_pans",
recipe = {
{ "basic_materials:copper_strip","","basic_materials:copper_strip" },
{ "default:copper_ingot","","default:copper_ingot" },
{ "default:copper_ingot","","default:copper_ingot" }
{ homedecor.materials.copper_ingot,"",homedecor.materials.copper_ingot },
{ homedecor.materials.copper_ingot,"",homedecor.materials.copper_ingot }
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_kitchen
description = Homedecor mod: kitchen
depends = homedecor_common, default, basic_materials, dye, unifieddyes
optional_depends = moreblocks, building_blocks, technic, bucket, screwdriver
depends = homedecor_common
optional_depends = moreblocks, building_blocks, technic, bucket, screwdriver, default, basic_materials, dye, unifieddyes

View File

@ -1,19 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"homedecor",
}
globals = {
}

View File

@ -19,7 +19,23 @@ homedecor.register("washing_machine", {
}
},
selection_box = { type = "regular" },
groups = { snappy = 3 },
groups = { snappy = 3, dig_stone=3 },
crafts = {
{
recipe = {
{ "steel_ingot", "steel_ingot", "basic_materials:ic" },
{ "steel_ingot", "water_bucket", "steel_ingot" },
{ "steel_ingot", "basic_materials:motor", "steel_ingot" }
},
},
{
recipe = {
{ "steel_ingot", "steel_ingot", "basic_materials:ic" },
{ "steel_ingot", "water_bucket", "steel_ingot" },
{ "steel_ingot", "basic_materials:motor", "steel_ingot" }
},
}
}
})
homedecor.register("dryer", {
@ -40,7 +56,23 @@ homedecor.register("dryer", {
}
},
selection_box = { type = "regular" },
groups = { snappy = 3 },
groups = { snappy = 3, dig_stone=3 },
crafts = {
{
recipe = {
{ "steel_ingot", "steel_ingot", "basic_materials:ic" },
{ "steel_ingot", "empty_bucket", "basic_materials:motor" },
{ "steel_ingot", "basic_materials:heating_element", "steel_ingot" }
},
},
{
recipe = {
{ "steel_ingot", "steel_ingot", "basic_materials:ic" },
{ "steel_ingot", "empty_bucket", "basic_materials:motor" },
{ "steel_ingot", "basic_materials:heating_element", "steel_ingot" }
},
}
}
})
local ib_cbox = {
@ -48,66 +80,27 @@ local ib_cbox = {
fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 }
}
local wool_tex = "wool_grey.png"
if not minetest.get_modpath("wool") then wool_tex = "[combine:16x16^[noalpha^[colorize:#3A3B3C" end
homedecor.register("ironing_board", {
description = S("Ironing board"),
mesh = "homedecor_ironing_board.obj",
tiles = {
"wool_grey.png",
wool_tex,
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
},
expand = {right = "placeholder"},
groups = { snappy = 3 },
groups = { snappy = 3, dig_stone=3 },
selection_box = ib_cbox,
collision_box = ib_cbox
})
-- crafting
-- laundry stuff
minetest.register_craft( {
output = "homedecor:washing_machine",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" },
{ "default:steel_ingot", "bucket:bucket_water", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" }
},
})
minetest.register_craft( {
output = "homedecor:washing_machine",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" },
{ "default:steel_ingot", "bucket:bucket_water", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" }
},
})
minetest.register_craft( {
output = "homedecor:dryer",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" },
{ "default:steel_ingot", "bucket:bucket_empty", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
},
})
minetest.register_craft( {
output = "homedecor:dryer",
recipe = {
{ "default:steel_ingot", "default:steel_ingot", "basic_materials:ic" },
{ "default:steel_ingot", "bucket:bucket_empty", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
},
})
minetest.register_craft( {
output = "homedecor:ironing_board",
recipe = {
{ "wool:grey", "wool:grey", "wool:grey"},
{ "", "default:steel_ingot", "" },
{ "default:steel_ingot", "", "default:steel_ingot" }
},
})
collision_box = ib_cbox,
crafts = {
{
recipe = {
{ "wool_grey", "wool_grey", "wool_grey"},
{ "", "steel_ingot", "" },
{ "steel_ingot", "", "steel_ingot" }
},
}
}
})

View File

@ -1,4 +1,4 @@
name = homedecor_laundry
description = Homedecor mod: laundry
depends = homedecor_common, default, basic_materials
depends = homedecor_common
optional_depends = bucket

View File

@ -1,23 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
"mesecon",
"unifieddyes",
"screwdriver",
}
globals = {
}

View File

@ -241,7 +241,7 @@ for brightness_level = 0, 14 do
}
overlay = {
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
"",
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
{ name = sides_glare, color = "white"},
{ name = sides_glare, color = "white"},
{ name = sides_glare, color = "white"},
@ -263,7 +263,7 @@ for brightness_level = 0, 14 do
description = S("Thick Glowlight"),
tiles = tiles,
overlay_tiles = overlay,
use_texture_alpha = true,
use_texture_alpha = "blend",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "colorwallmounted",
@ -275,9 +275,11 @@ for brightness_level = 0, 14 do
wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }
},
node_box = glowlight_nodebox.half,
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
@ -307,7 +309,7 @@ for brightness_level = 0, 14 do
}
overlay = {
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
"",
{ name = "homedecor_glowlight_top_glare.png", color = "white"},
{ name = sides_glare, color = "white"},
{ name = sides_glare, color = "white"},
{ name = sides_glare, color = "white"},
@ -329,7 +331,7 @@ for brightness_level = 0, 14 do
description = S("Thin Glowlight"),
tiles = tiles,
overlay_tiles = overlay,
use_texture_alpha = true,
use_texture_alpha = "blend",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "colorwallmounted",
@ -341,9 +343,11 @@ for brightness_level = 0, 14 do
wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 }
},
node_box = glowlight_nodebox.quarter,
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
@ -374,7 +378,7 @@ for brightness_level = 0, 14 do
}
overlay = {
{ name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
"",
{ name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
{ name = sides_glare, color = "white"},
{ name = sides_glare, color = "white"},
{ name = sides_glare, color = "white"},
@ -396,7 +400,7 @@ for brightness_level = 0, 14 do
description = S("Small Glowlight Cube"),
tiles = tiles,
overlay_tiles = overlay,
use_texture_alpha = true,
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "colorwallmounted",
drawtype = "nodebox",
@ -408,9 +412,11 @@ for brightness_level = 0, 14 do
wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 }
},
node_box = glowlight_nodebox.small_cube,
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end,
@ -440,19 +446,22 @@ for brightness_level = 0, 14 do
lighttex = "homedecor_plasma_lamp_off.png"
end
local gtex=minetest.get_modpath("default") and "default_gold_block.png" or "[combine:16x16^[noalpha^[colorize:#FFD700"
homedecor.register("plasma_lamp_"..brightness_level, {
description = S("Plasma Lamp/Light"),
drawtype = "mesh",
mesh = "plasma_lamp.obj",
tiles = {
"default_gold_block.png",
gtex,
lighttex
},
use_texture_alpha = true,
use_texture_alpha = "blend",
light_source = brightness_level,
sunlight_propagates = true,
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
on_rightclick = homedecor_lighting.toggle_light,
drop = {
items = {
@ -473,10 +482,10 @@ for brightness_level = 0, 14 do
description = S("Ground Lantern/Light"),
mesh = "homedecor_ground_lantern.obj",
tiles = { gen_ls_tex_yellow, "homedecor_generic_metal_wrought_iron.png" },
use_texture_alpha = true,
use_texture_alpha = "blend",
inventory_image = "homedecor_ground_lantern_inv.png",
wield_image = "homedecor_ground_lantern_inv.png",
groups = {snappy=3, not_in_creative_inventory = nici},
groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1},
light_source = brightness_level,
selection_box = gl_cbox,
walkable = false,
@ -500,10 +509,10 @@ for brightness_level = 0, 14 do
description = S("Hanging Lantern/Light"),
mesh = "homedecor_hanging_lantern.obj",
tiles = { "homedecor_generic_metal_wrought_iron.png", gen_ls_tex_yellow },
use_texture_alpha = true,
use_texture_alpha = "blend",
inventory_image = "homedecor_hanging_lantern_inv.png",
wield_image = "homedecor_hanging_lantern_inv.png",
groups = {snappy=3, not_in_creative_inventory = nici},
groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1},
light_source = brightness_level,
selection_box = hl_cbox,
walkable = false,
@ -527,10 +536,10 @@ for brightness_level = 0, 14 do
drawtype = "mesh",
mesh = "homedecor_ceiling_lantern.obj",
tiles = { gen_ls_tex_yellow, "homedecor_generic_metal_wrought_iron.png" },
use_texture_alpha = true,
use_texture_alpha = "blend",
inventory_image = "homedecor_ceiling_lantern_inv.png",
description = S("Ceiling Lantern/Light"),
groups = {snappy=3, not_in_creative_inventory = nici},
groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1},
light_source = brightness_level,
selection_box = cl_cbox,
walkable = false,
@ -549,9 +558,12 @@ for brightness_level = 0, 14 do
homedecor.register("lattice_lantern_large_"..brightness_level, {
description = S("Lattice lantern/Light (large)"),
tiles = { gen_ls_tex_yellow.."^homedecor_lattice_lantern_large_overlay.png" },
groups = { snappy = 3, not_in_creative_inventory = nici },
use_texture_alpha = "clip",
groups = { snappy = 3, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
on_rightclick = homedecor_lighting.toggle_light,
drop = {
items = {
@ -590,9 +602,12 @@ for brightness_level = 0, 14 do
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
},
groups = { snappy = 3, not_in_creative_inventory = nici },
use_texture_alpha = "clip",
groups = { snappy = 3, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level,
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
on_place = minetest.rotate_node,
on_rightclick = homedecor_lighting.toggle_light,
drop = {
@ -628,7 +643,7 @@ for brightness_level = 0, 14 do
selection_box = dlamp_cbox,
node_box = dlamp_cbox,
walkable = false,
groups = {snappy=3, ud_param2_colorable = 1, not_in_creative_inventory = nici},
groups = {snappy=3, ud_param2_colorable = 1, not_in_creative_inventory = nici, dig_glass=1},
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
@ -659,7 +674,7 @@ for brightness_level = 0, 14 do
},
inventory_image = "homedecor_ceiling_lamp_inv.png",
light_source = brightness_level,
groups = {snappy=3, not_in_creative_inventory = nici},
groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1},
walkable = false,
on_rightclick = homedecor_lighting.toggle_light,
drop = {
@ -682,7 +697,8 @@ for brightness_level = 0, 14 do
fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 }
}
local wool_brightened = "wool_grey.png^[colorize:#ffffff:"..(brightness_level * 15)
local wool_brightened=(minetest.get_modpath("wool") and "wool_grey.png" or "[combine:16x16^[noalpha6[colorize:#A9A9A9")
.. "^[colorize:#ffffff:"..(brightness_level * 15)
homedecor.register("table_lamp_"..brightness_level, {
description = S("Table Lamp/Light"),
@ -700,7 +716,9 @@ for brightness_level = 0, 14 do
walkable = false,
light_source = brightness_level,
selection_box = tlamp_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici },
drop = {
items = {
@ -731,7 +749,9 @@ for brightness_level = 0, 14 do
light_source = brightness_level,
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici },
selection_box = slamp_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
--expand = { top="air" },
drop = {
@ -792,11 +812,13 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
fixed = { -0.1875, -0.5, -0.1875, 0.1875, 0, 0.1875 }
},
walkable = false,
use_texture_alpha = true,
light_source = onflag and (default.LIGHT_MAX - 5) or nil,
use_texture_alpha = "blend",
light_source = onflag and (minetest.LIGHT_MAX - 5) or nil,
sunlight_propagates = true,
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
on_rightclick = homedecor_lighting.toggle_light,
drop = {
items = {
@ -844,7 +866,9 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
"group:mesecon_conductor_craftable"
},
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m},
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
drop = {
items = {
{items = {"homedecor:rope_light_on_floor_"..di} },
@ -890,7 +914,9 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
"group:mesecon_conductor_craftable"
},
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m},
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
drop = {
items = {
{items = {"homedecor:rope_light_on_ceiling_"..di}},
@ -916,10 +942,10 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
gen_ls_tex_yellow,
"homedecor_generic_metal_wrought_iron.png"
},
use_texture_alpha = true,
use_texture_alpha = "blend",
inventory_image = "homedecor_wall_lamp_inv.png",
groups = {snappy=3, not_in_creative_inventory = nici},
light_source = onflag and (default.LIGHT_MAX - 3) or nil,
groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1},
light_source = onflag and (minetest.LIGHT_MAX - 3) or nil,
selection_box = wl_cbox,
walkable = false,
drop = {
@ -954,8 +980,9 @@ homedecor.register("candle", {
inventory_image = "homedecor_candle_inv.png",
selection_box = tc_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
use_texture_alpha = "clip",
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-4,
})
local c_cbox = {
@ -975,8 +1002,9 @@ homedecor.register("candle_thin", {
inventory_image = "homedecor_candle_thin_inv.png",
selection_box = c_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
use_texture_alpha = "clip",
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-4,
})
local cs_cbox = {
@ -997,8 +1025,9 @@ homedecor.register("candlestick_wrought_iron", {
inventory_image = "homedecor_candlestick_wrought_iron_inv.png",
selection_box = cs_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
use_texture_alpha = "clip",
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-4,
})
homedecor.register("candlestick_brass", {
@ -1012,8 +1041,9 @@ homedecor.register("candlestick_brass", {
inventory_image = "homedecor_candlestick_brass_inv.png",
selection_box = cs_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
use_texture_alpha = "clip",
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-4,
})
homedecor.register("wall_sconce", {
@ -1031,8 +1061,9 @@ homedecor.register("wall_sconce", {
fixed = { -0.1875, -0.25, 0.3125, 0.1875, 0.25, 0.5 }
},
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-4,
use_texture_alpha = "clip",
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-4,
})
local ol_cbox = {
@ -1053,13 +1084,15 @@ homedecor.register("oil_lamp", {
{ name = "homedecor_generic_metal.png", color = 0xffa00000 },
"homedecor_oil_lamp_glass.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
inventory_image = "homedecor_oil_lamp_inv.png",
selection_box = ol_cbox,
walkable = false,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-3,
sounds = default.node_sound_glass_defaults(),
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-3,
_sound_def = {
key = "node_sound_glass_defaults",
},
})
homedecor.register("oil_lamp_tabletop", {
@ -1069,9 +1102,11 @@ homedecor.register("oil_lamp_tabletop", {
inventory_image = "homedecor_oil_lamp_tabletop_inv.png",
selection_box = ol_cbox,
collision_box = ol_cbox,
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-3,
sounds = default.node_sound_glass_defaults(),
groups = { snappy = 3, dig_glass=1 },
light_source = minetest.LIGHT_MAX-3,
_sound_def = {
key = "node_sound_glass_defaults",
},
})
local topchains_sbox = {
@ -1092,7 +1127,7 @@ minetest.register_node(":homedecor:chain_steel_top", {
sunlight_propagates = true,
paramtype = "light",
inventory_image = "basic_materials_chain_steel_inv.png",
groups = {cracky=3},
groups = {cracky=3, dig_glass=1},
selection_box = topchains_sbox,
})
@ -1106,7 +1141,7 @@ minetest.register_node(":homedecor:chain_brass_top", {
sunlight_propagates = true,
paramtype = "light",
inventory_image = "basic_materials_chain_brass_inv.png",
groups = {cracky=3},
groups = {cracky=3, dig_glass=1},
selection_box = topchains_sbox,
})
@ -1132,8 +1167,11 @@ minetest.register_node(":homedecor:chandelier_steel", {
},
drawtype = "mesh",
mesh = "homedecor_chandelier.obj",
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
use_texture_alpha = "clip",
groups = {cracky=3, dig_glass=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
minetest.register_node(":homedecor:chandelier_brass", {
@ -1158,8 +1196,11 @@ minetest.register_node(":homedecor:chandelier_brass", {
},
drawtype = "mesh",
mesh = "homedecor_chandelier.obj",
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
use_texture_alpha = "clip",
groups = {cracky=3, dig_glass=1},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
homedecor.register("torch_wall", {
@ -1186,7 +1227,8 @@ homedecor.register("torch_wall", {
type = "fixed",
fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
},
groups = {cracky=3},
use_texture_alpha = "clip",
groups = {cracky=3, dig_glass=1},
})
-- table lamps and standing lamps
@ -1807,46 +1849,19 @@ minetest.register_alias("chains:chandelier_steel", "homedecor:chande
minetest.register_alias("chains:chandelier_brass", "homedecor:chandelier_brass")
minetest.register_alias("homedecor:glowlight_half", "homedecor:glowlight_half_14")
minetest.register_alias("homedecor:glowlight_half_max", "homedecor:glowlight_half_14")
minetest.register_alias("homedecor:glowlight_quarter", "homedecor:glowlight_quarter_14")
minetest.register_alias("homedecor:glowlight_quarter_max", "homedecor:glowlight_quarter_14")
minetest.register_alias("homedecor:glowlight_small_cube", "homedecor:glowlight_small_cube_14")
minetest.register_alias("homedecor:glowlight_small_cube_max", "homedecor:glowlight_small_cube_14")
minetest.register_alias("homedecor:plasma_lamp", "homedecor:plasma_lamp_14")
minetest.register_alias("homedecor:plasma_lamp_max", "homedecor:plasma_lamp_14")
minetest.register_alias("homedecor:ground_lantern", "homedecor:ground_lantern_14")
minetest.register_alias("homedecor:ground_lantern_max", "homedecor:ground_lantern_14")
minetest.register_alias("homedecor:hanging_lantern", "homedecor:hanging_lantern_14")
minetest.register_alias("homedecor:hanging_lantern_max", "homedecor:hanging_lantern_14")
minetest.register_alias("homedecor:ceiling_lantern", "homedecor:ceiling_lantern_14")
minetest.register_alias("homedecor:ceiling_lantern_max", "homedecor:ceiling_lantern_14")
minetest.register_alias("homedecor:lattice_lantern_large", "homedecor:lattice_lantern_large_14")
minetest.register_alias("homedecor:lattice_lantern_large_max", "homedecor:lattice_lantern_large_14")
minetest.register_alias("homedecor:lattice_lantern_small", "homedecor:lattice_lantern_small_14")
minetest.register_alias("homedecor:lattice_lantern_small_max", "homedecor:lattice_lantern_small_14")
minetest.register_alias("homedecor:desk_lamp", "homedecor:desk_lamp_14")
minetest.register_alias("homedecor:desk_lamp_max", "homedecor:desk_lamp_14")
minetest.register_alias("homedecor:ceiling_lamp", "homedecor:ceiling_lamp_14")
minetest.register_alias("homedecor:ceiling_lamp_max", "homedecor:ceiling_lamp_14")
minetest.register_alias("homedecor:table_lamp", "homedecor:table_lamp_14")
minetest.register_alias("homedecor:table_lamp_max", "homedecor:table_lamp_14")
minetest.register_alias("homedecor:standing_lamp", "homedecor:standing_lamp_14")
minetest.register_alias("homedecor:standing_lamp_max", "homedecor:standing_lamp_14")
minetest.register_alias("3dforniture:table_lamp", "homedecor:table_lamp_14")
minetest.register_alias("3dforniture:table_lamp_max", "homedecor:table_lamp_14")
minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
minetest.register_alias("torch_wall", "homedecor:torch_wall")

View File

@ -1,4 +1,4 @@
name = homedecor_lighting
description = Homedecor mod: lighting
depends = homedecor_common, default, basic_materials, unifieddyes, creative
optional_depends = moreblocks, building_blocks, darkage, mesecons, digilines, screwdriver
depends = homedecor_common
optional_depends = moreblocks, building_blocks, darkage, mesecons, digilines, screwdriver, default, basic_materials, unifieddyes, creative

View File

@ -11,6 +11,9 @@ local S = minetest.get_translator("homedecor_misc")
homedecor_misc = {}
local wool_black, wool_grey = homedecor.textures.wool_black, homedecor.textures.wool_grey
local wood_tex = homedecor.textures.default_wood
homedecor.register("ceiling_paint", {
description = S("Textured Ceiling Paint"),
drawtype = 'signlike',
@ -19,7 +22,9 @@ homedecor.register("ceiling_paint", {
wield_image = 'homedecor_ceiling_paint_roller.png',
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
_sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type = "wallmounted" },
})
@ -31,7 +36,9 @@ homedecor.register("ceiling_tile", {
inventory_image = 'homedecor_ceiling_tile.png',
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
_sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type = "wallmounted" },
})
@ -46,7 +53,7 @@ for _, rt in ipairs(rug_types) do
local mesh = m
local nodebox = nil
local tiles = { "homedecor_rug_"..s..".png", "wool_grey.png" }
local tiles = { "homedecor_rug_"..s..".png", wool_grey }
if type(m) == "table" then
mesh = nil
@ -56,7 +63,7 @@ for _, rt in ipairs(rug_types) do
}
tiles = {
"homedecor_rug_"..s..".png",
"wool_grey.png",
wool_grey,
"homedecor_rug_"..s..".png"
}
end
@ -69,7 +76,9 @@ for _, rt in ipairs(rug_types) do
paramtype2 = "wallmounted",
walkable = false,
groups = {snappy = 3},
sounds = default.node_sound_leaves_defaults(),
_sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type = "wallmounted" },
})
end
@ -82,53 +91,59 @@ homedecor.register("flower_pot_"..p, {
mesh = "homedecor_flowerpot.obj",
tiles = {
"homedecor_flower_pot_"..p..".png",
{ name = "default_dirt.png", color = 0xff505050 },
{ name = default and "default_dirt.png" or wood_tex, color = 0xff505050 },
},
groups = { snappy = 3, potting_soil=1 },
sounds = default.node_sound_stone_defaults(),
_sound_def = {
key = "node_sound_stone_defaults",
},
})
end
if minetest.get_modpath("flowers") then
local flowers_list = {
{ S("Rose"), "rose", "flowers:rose" },
{ S("Tulip"), "tulip", "flowers:tulip" },
{ S("Yellow Dandelion"), "dandelion_yellow", "flowers:dandelion_yellow" },
{ S("White Dandelion"), "dandelion_white", "flowers:dandelion_white" },
{ S("Blue Geranium"), "geranium", "flowers:geranium" },
{ S("Viola"), "viola", "flowers:viola" },
{ S("Cactus"), "cactus", "default:cactus" },
{ S("Bonsai"), "bonsai", "default:sapling" }
}
local flowers_list = {
{ S("Rose"), "rose", "flowers:rose" },
{ S("Tulip"), "tulip", "flowers:tulip" },
{ S("Yellow Dandelion"), "dandelion_yellow", "flowers:dandelion_yellow" },
{ S("White Dandelion"), "dandelion_white", "flowers:dandelion_white" },
{ S("Blue Geranium"), "geranium", "flowers:geranium" },
{ S("Viola"), "viola", "flowers:viola" },
{ S("Cactus"), "cactus", "default:cactus" },
{ S("Bonsai"), "bonsai", "default:sapling" }
}
for _, f in ipairs(flowers_list) do
local flowerdesc, flower, craftwith = unpack(f)
for _, f in ipairs(flowers_list) do
local flowerdesc, flower, craftwith = unpack(f)
homedecor.register("potted_"..flower, {
description = S("Potted flower (@1)", flowerdesc),
mesh = "homedecor_potted_plant.obj",
tiles = {
"homedecor_flower_pot_terracotta.png",
{ name = "default_dirt.png", color = 0xff303030 },
"flowers_"..flower..".png"
},
walkable = false,
use_texture_alpha = "clip",
groups = {snappy = 3},
_sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = {
type = "fixed",
fixed = { -0.2, -0.5, -0.2, 0.2, 0.3, 0.2 }
}
})
homedecor.register("potted_"..flower, {
description = S("Potted flower (@1)", flowerdesc),
mesh = "homedecor_potted_plant.obj",
tiles = {
"homedecor_flower_pot_terracotta.png",
{ name = "default_dirt.png", color = 0xff303030 },
"flowers_"..flower..".png"
},
walkable = false,
groups = {snappy = 3},
sounds = default.node_sound_glass_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.2, -0.5, -0.2, 0.2, 0.3, 0.2 }
}
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:potted_"..flower,
recipe = { craftwith, "homedecor:flower_pot_small" }
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:potted_"..flower,
recipe = { craftwith, "homedecor:flower_pot_small" }
})
minetest.register_alias("flowers:flower_"..flower.."_pot", "homedecor:potted_"..flower)
minetest.register_alias("flowers:potted_"..flower, "homedecor:potted_"..flower)
minetest.register_alias("flowers:flower_pot", "homedecor:flower_pot_small")
minetest.register_alias("flowers:flower_"..flower.."_pot", "homedecor:potted_"..flower)
minetest.register_alias("flowers:potted_"..flower, "homedecor:potted_"..flower)
minetest.register_alias("flowers:flower_pot", "homedecor:flower_pot_small")
end
end
homedecor.register("pole_brass", {
@ -146,7 +161,9 @@ homedecor.register("pole_brass", {
fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
},
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
check_for_pole = true
})
@ -164,7 +181,9 @@ homedecor.register("pole_wrought_iron", {
fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}
},
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
local ft_cbox = {
@ -183,11 +202,13 @@ homedecor.register("fishtank", {
"homedecor_fishtank_water_top.png",
"homedecor_fishtank_sides.png",
},
use_texture_alpha = true,
use_texture_alpha = "blend",
selection_box = ft_cbox,
collision_box = ft_cbox,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = node.param2})
return itemstack
@ -205,12 +226,14 @@ homedecor.register("fishtank_lighted", {
"homedecor_fishtank_water_top_lighted.png",
"homedecor_fishtank_sides_lighted.png",
},
light_source = default.LIGHT_MAX-4,
use_texture_alpha = true,
light_source = minetest.LIGHT_MAX-4,
use_texture_alpha = "blend",
selection_box = ft_cbox,
collision_box = ft_cbox,
groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:fishtank", param2 = node.param2})
return itemstack
@ -225,6 +248,7 @@ homedecor.register("cardboard_box_big", {
'homedecor_cardbox_big_tb.png',
'homedecor_cardbox_big_sides.png',
},
use_texture_alpha = "clip",
groups = { snappy = 3 },
infotext=S("Cardboard box"),
inventory = {
@ -245,6 +269,7 @@ homedecor.register("cardboard_box", {
{-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125},
}
},
use_texture_alpha = "clip",
groups = { snappy = 3 },
infotext=S("Cardboard box"),
inventory = {
@ -256,13 +281,15 @@ homedecor.register("dvd_cd_cabinet", {
description = S("DVD/CD cabinet"),
mesh = "homedecor_dvd_cabinet.obj",
tiles = {
"default_wood.png",
wood_tex,
"homedecor_dvdcd_cabinet_front.png",
"homedecor_dvdcd_cabinet_back.png"
},
selection_box = homedecor.nodebox.slab_z(-0.5),
groups = {choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
local pooltable_cbox = {
@ -285,7 +312,9 @@ homedecor.register("pool_table", {
selection_box = pooltable_cbox,
collision_box = pooltable_cbox,
expand = { forward="placeholder" },
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
})
@ -309,7 +338,9 @@ homedecor.register("piano", {
selection_box = piano_cbox,
collision_box = piano_cbox,
expand = { right="placeholder" },
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
})
@ -325,7 +356,7 @@ homedecor.register("trophy", {
description = S("Trophy"),
mesh = "homedecor_trophy.obj",
tiles = {
"default_wood.png",
wood_tex,
"homedecor_generic_metal_gold.png"
},
inventory_image = "homedecor_trophy_inv.png",
@ -346,13 +377,15 @@ homedecor.register("sportbench", {
"homedecor_generic_metal_wrought_iron.png",
"homedecor_generic_metal_bright.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
"wool_black.png"
wool_black
},
inventory_image = "homedecor_sport_bench_inv.png",
groups = { snappy=3 },
selection_box = sb_cbox,
walkable = false,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
local skate_cbox = {
@ -366,10 +399,13 @@ homedecor.register("skateboard", {
tiles = { "homedecor_skateboard.png" },
inventory_image = "homedecor_skateboard_inv.png",
description = S("Skateboard"),
use_texture_alpha = "clip",
groups = {snappy=3},
selection_box = skate_cbox,
walkable = false,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_place = minetest.rotate_node
})
@ -377,8 +413,8 @@ homedecor_misc.banister_materials = {
{
"wood",
S("wood"),
"default_wood.png",
"default_wood.png",
wood_tex,
wood_tex,
"group:wood",
"group:stick",
"",
@ -515,7 +551,9 @@ homedecor.register("spiral_staircase", {
}
},
groups = {cracky = 1},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing)
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
@ -605,7 +643,9 @@ homedecor.register("dartboard", {
},
groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
-- crafting
@ -617,7 +657,7 @@ homedecor.register("dartboard", {
minetest.register_craft( {
output = "homedecor:flower_pot_terracotta",
recipe = {
{ "homedecor:roof_tile_terracotta", "default:dirt", "homedecor:roof_tile_terracotta" },
{ "homedecor:roof_tile_terracotta", homedecor.materials.dirt, "homedecor:roof_tile_terracotta" },
{ "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta" },
},
})
@ -626,7 +666,7 @@ minetest.register_craft( {
output = "homedecor:flower_pot_green",
recipe = {
{ "", "dye:dark_green", "" },
{ "basic_materials:plastic_sheet", "default:dirt", "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", homedecor.materials.dirt, "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
},
})
@ -634,8 +674,8 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:flower_pot_black",
recipe = {
{ "dye:black", "dye:black", "dye:black" },
{ "basic_materials:plastic_sheet", "default:dirt", "basic_materials:plastic_sheet" },
{ homedecor.materials.dye_black, homedecor.materials.dye_black, homedecor.materials.dye_black },
{ "basic_materials:plastic_sheet", homedecor.materials.dirt, "basic_materials:plastic_sheet" },
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
},
})
@ -644,26 +684,26 @@ minetest.register_craft( {
type = "shapeless",
output = "homedecor:ceiling_paint 20",
recipe = {
"dye:white",
"dye:white",
"default:sand",
"bucket:bucket_water",
homedecor.materials.dye_white,
homedecor.materials.dye_white,
homedecor.materials.sand,
homedecor.materials.water_bucket,
},
replacements = { { "bucket:bucket_water","bucket:bucket_empty" } }
replacements = { { homedecor.materials.water_bucket,homedecor.materials.empty_bucket } }
})
minetest.register_craft( {
output = "homedecor:ceiling_tile 10",
recipe = {
{ "", "dye:white", "" },
{ "default:steel_ingot", "default:stone", "default:steel_ingot" },
{ "", homedecor.materials.dye_white, "" },
{ homedecor.materials.steel_ingot, homedecor.materials.stone, homedecor.materials.steel_ingot },
},
})
minetest.register_craft( {
output = "homedecor:drawer_small",
recipe = {
{ "group:wood", "default:steel_ingot", "group:wood" },
{ "group:wood", homedecor.materials.steel_ingot, "group:wood" },
},
})
@ -687,9 +727,9 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:pole_wrought_iron 4",
recipe = {
{ "default:iron_lump", },
{ "default:iron_lump", },
{ "default:iron_lump", },
{ homedecor.materials.iron_lump, },
{ homedecor.materials.iron_lump, },
{ homedecor.materials.iron_lump, },
},
})
@ -773,35 +813,26 @@ minetest.register_craft({
output = "homedecor:fishtank",
recipe = {
{ "basic_materials:plastic_sheet", "homedecor:glowlight_small_cube", "basic_materials:plastic_sheet" },
{ "default:glass", "bucket:bucket_water", "default:glass" },
{ "default:glass", "building_blocks:gravel_spread", "default:glass" },
{ homedecor.materials.glass_block, homedecor.materials.water_bucket, homedecor.materials.glass_block },
{ homedecor.materials.glass_block, "building_blocks:gravel_spread", homedecor.materials.glass_block },
},
replacements = { {"bucket:bucket_water", "bucket:bucket_empty"} }
replacements = { {homedecor.materials.water_bucket, homedecor.materials.empty_bucket} }
})
minetest.register_craft({
output = "homedecor:cardboard_box 2",
recipe = {
{ "default:paper", "", "default:paper" },
{ "default:paper", "default:paper", "default:paper" },
{ homedecor.materials.paper, "", homedecor.materials.paper },
{ homedecor.materials.paper, homedecor.materials.paper, homedecor.materials.paper },
},
})
minetest.register_craft({
output = "homedecor:cardboard_box_big 2",
recipe = {
{ "default:paper", "", "default:paper" },
{ "default:paper", "", "default:paper" },
{ "default:paper", "default:paper", "default:paper" },
},
})
minetest.register_craft( {
output = "homedecor:openframe_bookshelf",
recipe = {
{"group:wood", "", "group:wood"},
{"default:book", "default:book", "default:book"},
{"group:wood", "", "group:wood"},
{ homedecor.materials.paper, "", homedecor.materials.paper },
{ homedecor.materials.paper, "", homedecor.materials.paper },
{ homedecor.materials.paper, homedecor.materials.paper, homedecor.materials.paper },
},
})
@ -810,18 +841,18 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:japanese_wall_top",
recipe = {
{"group:stick", "default:paper"},
{"default:paper", "group:stick"},
{"group:stick", "default:paper"}
{"group:stick", homedecor.materials.paper},
{ homedecor.materials.paper, "group:stick"},
{"group:stick", homedecor.materials.paper}
},
})
minetest.register_craft( {
output = "homedecor:japanese_wall_top",
recipe = {
{"default:paper", "group:stick"},
{"group:stick", "default:paper"},
{"default:paper", "group:stick"}
{homedecor.materials.paper, "group:stick"},
{"group:stick", homedecor.materials.paper},
{homedecor.materials.paper, "group:stick"}
},
})
@ -992,7 +1023,9 @@ minetest.register_node(":homedecor:japanese_wall_top", {
groups = {snappy=3},
selection_box = jp_cbox,
collision_box = jp_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
minetest.register_node(":homedecor:japanese_wall_middle", {
@ -1008,7 +1041,9 @@ minetest.register_node(":homedecor:japanese_wall_middle", {
groups = {snappy=3},
selection_box = jp_cbox,
collision_box = jp_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
minetest.register_node(":homedecor:japanese_wall_bottom", {
@ -1024,5 +1059,7 @@ minetest.register_node(":homedecor:japanese_wall_bottom", {
groups = {snappy=3},
selection_box = jp_cbox,
collision_box = jp_cbox,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_misc
description = Homedecor mod: miscellaneous
depends = homedecor_common, default, basic_materials, unifieddyes
optional_depends = building_blocks, technic, bucket, signs_lib, screwdriver
depends = homedecor_common
optional_depends = building_blocks, technic, bucket, signs_lib, screwdriver, default, basic_materials, unifieddyes

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
}
globals = {
}

View File

@ -8,13 +8,24 @@ homedecor.register("filing_cabinet", {
"homedecor_filing_cabinet_front.png",
"homedecor_filing_cabinet_bottom.png"
},
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree=2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Filing cabinet"),
inventory = {
size=16,
lockable=true,
},
crafts = {
{
recipe = {
{ "", "group:wood", "" },
{ "group:wood", "homedecor:drawer_small", "group:wood" },
{ "", "group:wood", "" },
},
}
}
})
local desk_cbox = {
@ -32,13 +43,31 @@ homedecor.register("desk", {
inventory_image = "homedecor_desk_inv.png",
selection_box = desk_cbox,
collision_box = desk_cbox,
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 },
_sound_def = {
key = "node_sound_wood_defaults",
},
groups = { snappy = 3, dig_tree=2 },
expand = { right="placeholder" },
inventory = {
size=24,
lockable=true,
},
crafts = {
{
recipe = {
{ "slab_wood", "slab_wood", "slab_wood" },
{ "homedecor:drawer_small", "group:wood", "group:wood" },
{ "homedecor:drawer_small", "", "group:wood" },
},
},
{
recipe = {
{ "moreblocks:slab_wood", "moreblocks:slab_wood", "moreblocks:slab_wood" },
{ "homedecor:drawer_small", "group:wood", "group:wood" },
{ "homedecor:drawer_small", "", "group:wood" },
},
}
}
})
minetest.register_alias("homedecor:desk_r", "air")
@ -60,7 +89,25 @@ homedecor.register("desk_globe", {
collision_box = globe_cbox,
groups = {choppy=2, oddly_breakable_by_hand=2},
walkable = false,
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
{
recipe = {
{ "group:stick", "basic_materials:plastic_sheet", "dye_green" },
{ "group:stick", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "group:stick", "slab_wood", "dye_blue" }
},
},
{
recipe = {
{ "group:stick", "basic_materials:plastic_sheet", "dye_green" },
{ "group:stick", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "group:stick", "moreblocks:slab_wood", "dye_blue" }
},
}
}
})
homedecor.register("calendar", {
@ -78,72 +125,25 @@ homedecor.register("calendar", {
wall_top = { -4/16, 5/16, -8/16, 4/16, 8/16, 5/16 }
},
use_texture_alpha = "clip",
groups = {choppy=2,attached_node=1},
groups = {choppy=2,attached_node=1, dig_tree=2},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
_sound_def = {
key = "node_sound_defaults",
},
infotext = S("Date (right-click to update):\n@1", os.date("%Y-%m-%d")), -- ISO 8601 format
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local meta = minetest.get_meta(pos)
local date = os.date("%Y-%m-%d")
meta:set_string("infotext", S("Date (right-click to update):\n@1", date))
return itemstack
end
})
-- crafting
minetest.register_craft({
output = "homedecor:desk",
recipe = {
{ "stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood" },
{ "homedecor:drawer_small", "group:wood", "group:wood" },
{ "homedecor:drawer_small", "", "group:wood" },
},
})
minetest.register_craft({
output = "homedecor:desk",
recipe = {
{ "moreblocks:slab_wood", "moreblocks:slab_wood", "moreblocks:slab_wood" },
{ "homedecor:drawer_small", "group:wood", "group:wood" },
{ "homedecor:drawer_small", "", "group:wood" },
},
})
minetest.register_craft({
output = "homedecor:filing_cabinet",
recipe = {
{ "", "group:wood", "" },
{ "group:wood", "homedecor:drawer_small", "group:wood" },
{ "", "group:wood", "" },
},
})
minetest.register_craft({
output = "homedecor:calendar",
recipe = {
{ "","dye:red","" },
{ "","dye:black","" },
{ "","default:paper","" }
},
})
minetest.register_craft({
output = "homedecor:desk_globe",
recipe = {
{ "group:stick", "basic_materials:plastic_sheet", "dye:green" },
{ "group:stick", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "group:stick", "stairs:slab_wood", "dye:blue" }
},
})
minetest.register_craft({
output = "homedecor:desk_globe",
recipe = {
{ "group:stick", "basic_materials:plastic_sheet", "dye:green" },
{ "group:stick", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
{ "group:stick", "moreblocks:slab_wood", "dye:blue" }
},
})
end,
crafts = {
{
recipe = {
{ "","dye_red","" },
{ "","dye_black","" },
{ "","paper","" }
},
}
}
})

View File

@ -1,4 +1,4 @@
name = homedecor_office
description = Homedecor mod: office
depends = homedecor_common, default, basic_materials, dye
depends = homedecor_common
optional_depends = moreblocks, building_blocks

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
}
globals = {
}

View File

@ -1,5 +1,7 @@
local S = minetest.get_translator("homedecor_pictures_and_paintings")
local wood_tex = homedecor.textures.default_wood
local pframe_cbox = {
type = "fixed",
fixed = { -0.18, -0.5, -0.08, 0.18, -0.08, 0.18 }
@ -17,10 +19,12 @@ for _, i in ipairs(n) do
},
inventory_image = "homedecor_picture_frame"..i.."_inv.png",
wield_image = "homedecor_picture_frame"..i.."_inv.png",
groups = {snappy = 3},
groups = {snappy = 3, dig_tree = 3},
selection_box = pframe_cbox,
walkable = false,
sounds = default.node_sound_glass_defaults()
_sound_def = {
key = "node_sound_glass_defaults",
},
})
end
@ -36,14 +40,16 @@ for i = 1,20 do
description = S("Decorative painting #@1", i),
mesh = "homedecor_painting.obj",
tiles = {
"default_wood.png",
wood_tex,
"homedecor_blank_canvas.png",
"homedecor_painting"..i..".png"
},
selection_box = p_cbox,
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree = 3},
_sound_def = {
key = "node_sound_wood_defaults",
},
})
end
@ -60,7 +66,7 @@ minetest.register_craft({
output = "homedecor:blank_canvas",
recipe = {
{ "", "group:stick", "" },
{ "group:stick", "wool:white", "group:stick" },
{ "group:stick", homedecor.materials["wool_white"], "group:stick" },
{ "", "group:stick", "" },
}
})
@ -129,12 +135,12 @@ local painting_patterns = {
for i,recipe in pairs(painting_patterns) do
local item1 = "dye:"..recipe[1][1]
local item2 = "dye:"..recipe[1][2]
local item3 = "dye:"..recipe[1][3]
local item4 = "dye:"..recipe[2][1]
local item5 = "dye:"..recipe[2][2]
local item6 = "dye:"..recipe[2][3]
local item1 = homedecor.materials["dye_"..recipe[1][1]]
local item2 = homedecor.materials["dye_"..recipe[1][2]]
local item3 = homedecor.materials["dye_"..recipe[1][3]]
local item4 = homedecor.materials["dye_"..recipe[2][1]]
local item5 = homedecor.materials["dye_"..recipe[2][2]]
local item6 = homedecor.materials["dye_"..recipe[2][3]]
minetest.register_craft({
output = "homedecor:painting_"..i,
@ -147,16 +153,28 @@ for i,recipe in pairs(painting_patterns) do
end
local picture_dyes = {
{"dye:brown", "dye:green"}, -- the figure sitting by the tree, wielding a pick
{"dye:green", "dye:blue"} -- the "family photo"
{"dye_brown", "dye_green"}, -- the figure sitting by the tree, wielding a pick
{"dye_green", "dye_blue"} -- the "family photo"
}
for i in ipairs(picture_dyes) do
minetest.register_craft({
output = "homedecor:picture_frame"..i,
recipe = {
{ picture_dyes[i][1], picture_dyes[i][2] },
{ homedecor.materials[picture_dyes[i][1]], homedecor.materials[picture_dyes[i][2]] },
{ "homedecor:blank_canvas", "group:stick" },
},
})
end
local numbers = {}
for i = 2,20 do
table.insert(numbers, i)
end
if minetest.get_modpath("i3") then
i3.compress("homedecor:painting_1", {
replace = "1",
by = numbers
})
end

View File

@ -1,3 +1,3 @@
name = homedecor_pictures_and_paintings
description = Homedecor mod: pictures and paintings
depends = homedecor_common, default, dye
depends = homedecor_common

View File

@ -1,19 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"screwdriver", "homedecor",
}
globals = {
}

View File

@ -1,14 +0,0 @@
PLASMASCREEN
============
Mod adding a plasma screen TV for Minetest.
This mod adds a 2x3 plasma screen TV using a single large mesh node.
Point at the bottom center position where you want the TV to go, when placing.
Note: If you're at a really steep view angle when trying to place a screen,
the mod may occasionally refuse to place it (or it just appears for a moment).
Just move over a bit, so that your target position is more directly in front
of you.

View File

@ -24,6 +24,15 @@ homedecor.register("tv_stand", {
}
},
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
crafts = {
{
recipe = {
{'', '', ''},
{'', 'steel_ingot', ''},
{'group:stick', 'coal_lump', 'group:stick'},
}
}
}
})
local fdir_to_left = {
@ -121,7 +130,20 @@ homedecor.register("tv", {
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:tv_off", param2 = node.param2})
end
end,
crafts = {
{
recipe = {
{'glass_block', 'coal_lump', 'glass_block'},
{'steel_ingot', 'copper_ingot', 'steel_ingot'},
{'glass_block', 'glass_block', 'glass_block'},
}
},
{
type = "shapeless",
recipe = {'homedecor:television', 'homedecor:television'},
}
}
})
homedecor.register("tv_off", {
@ -150,33 +172,7 @@ homedecor.register("tv_off", {
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:tv", param2 = node.param2})
end,
drop = "homedecor:tv"
})
-- crafting recipes
minetest.register_craft({
output = "homedecor:tv",
recipe = {
{'default:glass', 'default:coal_lump', 'default:glass'},
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
{'default:glass', 'default:glass', 'default:glass'},
}
})
minetest.register_craft({
type = "shapeless",
output = "homedecor:tv",
recipe = {'homedecor:television', 'homedecor:television'},
})
minetest.register_craft({
output = "homedecor:tv_stand",
recipe = {
{'', '', ''},
{'', 'default:steel_ingot', ''},
{'group:stick', 'default:coal_lump', 'group:stick'},
}
drop = "homedecor:tv",
})
minetest.register_alias("plasmascreen:screen1", "air")

View File

@ -1,3 +1,3 @@
name = homedecor_plasmascreen
depends = default, homedecor_common, homedecor_electronics
depends = homedecor_common
optional_depends = screwdriver

View File

@ -1,20 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"default",
"homedecor",
}
globals = {
}

View File

@ -5,12 +5,14 @@ homedecor_roofing = {}
minetest.register_node(":homedecor:skylight", {
description = S("Glass Skylight"),
drawtype = "raillike",
tiles = { "default_glass.png" },
wield_image = "default_glass.png",
tiles = { homedecor.textures.glass },
wield_image = homedecor.textures.glass,
inventory_image = "homedecor_skylight_inv.png",
groups = { snappy = 3 },
groups = { snappy = 3, dig_tree = 2 },
paramtype = "light",
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = homedecor.nodebox.slab_y(0.1),
})
@ -21,9 +23,11 @@ minetest.register_node(":homedecor:skylight_frosted", {
wield_image = "homedecor_skylight_frosted.png",
inventory_image = "homedecor_skylight_frosted_inv.png",
use_texture_alpha = "blend",
groups = { snappy = 3 },
groups = { snappy = 3, dig_tree = 2 },
paramtype = "light",
sounds = default.node_sound_glass_defaults(),
_sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = homedecor.nodebox.slab_y(0.1),
})
@ -36,8 +40,10 @@ for s, s_loc in pairs({ ["asphalt"] = S("asphalt"), ["terracotta"] = S("terracot
inventory_image = "homedecor_shingles_"..s.."_inv.png",
paramtype = "light",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, dig_tree = 2 },
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_y(0.1),
})
end
@ -93,7 +99,9 @@ homedecor_roofing.register_outer_corner = function(modname, subname, groups, slo
collision_box = ocorner_cbox,
groups = groups,
on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults()
_sound_def = {
key = "node_sound_wood_defaults",
},
})
end
@ -114,7 +122,9 @@ homedecor_roofing.register_inner_corner = function(modname, subname, groups, slo
collision_box = icorner_cbox,
groups = groups,
on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults()
_sound_def = {
key = "node_sound_wood_defaults",
},
})
end
@ -137,7 +147,9 @@ homedecor_roofing.register_slope = function(modname, subname, recipeitem, groups
use_texture_alpha = "blend",
groups = groups,
on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults()
_sound_def = {
key = "node_sound_wood_defaults",
},
})
-- convert between flat shingles and slopes
@ -260,19 +272,19 @@ end
-- corners
homedecor_roofing.register_roof("homedecor", "wood",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_wood.png" },
S("Wood Shingles")
)
homedecor_roofing.register_roof("homedecor", "asphalt",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_asphalt.png" },
S("Asphalt Shingles")
)
homedecor_roofing.register_roof("homedecor", "terracotta",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_terracotta.png" },
S("Terracotta Shingles")
)
@ -281,46 +293,58 @@ homedecor_roofing.register_roof("homedecor", "terracotta",
homedecor_roofing.register_slope("homedecor", "wood",
"homedecor:shingles_wood",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_wood.png" },
S("Wood Shingles")
)
homedecor_roofing.register_slope("homedecor", "asphalt",
"homedecor:shingles_asphalt",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_asphalt.png" },
S("Asphalt Shingles")
)
homedecor_roofing.register_slope("homedecor", "terracotta",
"homedecor:shingles_terracotta",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_terracotta.png" },
S("Terracotta Shingles")
)
homedecor_roofing.register_slope("homedecor", "glass",
"homedecor:shingles_glass",
{ snappy = 3 },
{ snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_glass.png", "homedecor_shingles_wood.png" },
S("Glass Shingles")
)
local brick_tex = "default_brick.png"
if not minetest.get_modpath("default") then brick_tex = "[combine:16x16^[noalpha^[colorize:#AA4A44" end
homedecor.register("chimney", {
description = S("Chimney"),
mesh = "homedecor_chimney.obj",
tiles = {
"homedecor_chimney_tb.png",
"default_brick.png"
brick_tex
},
selection_box = homedecor.nodebox.bar_y(0.25),
groups = {cracky=3},
sounds = default.node_sound_stone_defaults()
groups = {cracky=3, dig_tree = 2},
_sound_def = {
key = "node_sound_stone_defaults",
},
})
-- crafting
minetest.register_craft({
output = "homedecor:chimney 2",
recipe = {
{ "default:clay_brick", "", "default:clay_brick" },
{ "default:clay_brick", "", "default:clay_brick" },
{ "default:clay_brick", "", "default:clay_brick" },
},
})
minetest.register_craft( {
output = "homedecor:skylight 4",

View File

@ -1,3 +1,3 @@
name = homedecor_roofing
description = Homedecor mod: roofing
depends = homedecor_common, default, dye
depends = homedecor_common

View File

@ -1,23 +0,0 @@
unused_args = false
allow_defined_top = true
max_comment_line_length = 999
read_globals = {
"DIR_DELIM",
"minetest", "core",
"unpack",
"dump",
table = { fields = { "copy", "getn" } },
"vector", "nodeupdate",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
"creative",
"default",
"homedecor",
"unifieddyes",
"screwdriver",
}
globals = {
}

View File

@ -1,67 +0,0 @@
Living Room Furniture (lrfurn) mod for Minetest
by thefamilygrog66
Description:
Coloured Long Sofas (3 blocks wide), Sofas (2 blocks wide), Armchairs, Coffee Tables and End Tables, loosely based on PilzAdam's beds mod. There are 9 colours in all: red, orange, yellow, green, blue, violet, black, grey and white.
When you right-click on a long sofa, sofa or armchair, it transports you onto it, and replenishes your HP. Good if you've just escaped nasty mobs, didn't fare so well in battle, or just had a bad fall. The coffee table - which isn't coloured, just wooden - is pretty much just for decoration. It stands half a block high and nearly 2 blocks long. The end table is similar to the coffee table, though roughly half the length (i.e. only one block) and square.
Recipes:
Long Sofa
+---------------+---------------+---------------+
| coloured wool | coloured wool | coloured wool |
+---------------+---------------+---------------+
| wood slab | wood slab | wood slab |
+---------------+---------------+---------------+
| stick | stick | stick |
+---------------+---------------+---------------+
Sofa
+---------------+---------------+-------+
| coloured wool | coloured wool | |
+---------------+---------------+-------+
| wood slab | wood slab | |
+---------------+---------------+-------+
| stick | stick | |
+---------------+---------------+-------+
Armchair
+---------------+-------+-------+
| coloured wool | | |
+---------------+-------+-------+
| wood slab | | |
+---------------+-------+-------+
| stick | | |
+---------------+-------+-------+
Coffee Table (only wood texture)
+-----------+-----------+-----------+
| | | |
+-----------+-----------+-----------+
| wood slab | wood slab | wood slab |
+-----------+-----------+-----------+
| stick | | stick |
+-----------+-----------+-----------+
End Table (only wood texture)
+-----------+-----------+-----------+
| | | |
+-----------+-----------+-----------+
| wood slab | wood slab | |
+-----------+-----------+-----------+
| stick | stick | |
+-----------+-----------+-----------+
Mod dependencies: default, wool
See also:
http://minetest.net/

View File

@ -19,8 +19,10 @@ minetest.register_node(":lrfurn:armchair", {
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
inventory_image = "lrfurn_armchair_inv.png",
groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = armchair_cbox,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
@ -28,13 +30,7 @@ minetest.register_node(":lrfurn:armchair", {
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not clicker:is_player() then
return itemstack
end
pos.y = pos.y-0.5
clicker:setpos(pos)
clicker:set_hp(20)
return itemstack
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
end
})
@ -42,21 +38,26 @@ homedecor.register("armchair", {
description = S("Armchair"),
mesh = "forniture_armchair.obj",
tiles = {
"wool_white.png",
{ name = "wool_dark_grey.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff }
homedecor.textures.wool_white,
{ name = homedecor.textures.wool_dark_grey, color = 0xffffffff },
{ name = homedecor.textures.default_wood, color = 0xffffffff }
},
inventory_image = "homedecor_armchair_inv.png",
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = armchair_cbox,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end,
on_dig = unifieddyes.on_dig,
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1)
end
})
-- crafts
@ -65,7 +66,7 @@ minetest.register_craft({
output = "lrfurn:armchair",
recipe = {
{"wool:white", "", "", },
{"stairs:slab_wood", "", "", },
{homedecor.materials.slab_wood, "", "", },
{"group:stick", "", "", }
}
})
@ -93,9 +94,9 @@ unifieddyes.register_color_craft({
minetest.register_craft({
output = "homedecor:armchair 2",
recipe = {
{ "wool:white",""},
{ homedecor.materials.wool_white,""},
{ "group:wood","group:wood" },
{ "wool:white","wool:white" },
{ homedecor.materials.wool_white,homedecor.materials.wool_white },
},
})

Some files were not shown because too many files have changed in this diff Show More