1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-22 16:10:18 +01:00

make homedecor game agnostic (#28)

* make materials.lua with hades, minetest game, farlands items

* make textures file for central handling

* make mods game agnostic

* take out the trash

* handle multiple seats in sofas

* add github luacheck workflow and various luacheck fixes

* add fluxionary scope creep

* fix devtest breaking right to a name policy

Co-authored-by: wsor4035 <24964441+wsor4035@users.noreply.github.com>
Co-authored-by: SFENCE <sfence.software@gmail.com>
This commit is contained in:
wsor4035 2022-05-03 15:21:14 -04:00 committed by GitHub
parent 3ba59dc2d5
commit 546cd7110f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
124 changed files with 2584 additions and 2597 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"), description = S("Granite"),
tiles = { "technic_granite.png" }, tiles = { "technic_granite.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1}, groups = {cracky=1, dig_stone=2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
}) })
minetest.register_craft({ minetest.register_craft({
output = "technic:granite 9", output = "technic:granite 9",

View File

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

View File

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

View File

@ -1,3 +1,5 @@
local materials = homedecor.materials
if minetest.get_modpath("moreblocks") then if minetest.get_modpath("moreblocks") then
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:sticks 2', output = 'building_blocks:sticks 2',
@ -20,15 +22,15 @@ end
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:Adobe 3', output = 'building_blocks:Adobe 3',
recipe = { recipe = {
{"default:sand"}, {materials.sand},
{"default:clay"}, {materials.clay_lump},
{"group:stick"}, {"group:stick"},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:brobble_spread 4', output = 'building_blocks:brobble_spread 4',
recipe = { recipe = {
{"default:brick", "default:cobble", "default:brick"}, {materials.brick, materials.cobble, materials.brick},
} }
}) })
minetest.register_craft({ minetest.register_craft({
@ -42,20 +44,20 @@ minetest.register_craft({
output = 'building_blocks:fakegrass 2', output = 'building_blocks:fakegrass 2',
recipe = { recipe = {
{'group:leaves'}, {'group:leaves'},
{"default:dirt"}, {materials.dirt},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:Fireplace 1', output = 'building_blocks:Fireplace 1',
recipe = { recipe = {
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"}, {materials.steel_ingot, "building_blocks:sticks", materials.steel_ingot},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:grate 1', output = 'building_blocks:grate 1',
recipe = { recipe = {
{"default:steel_ingot", "default:steel_ingot"}, {materials.steel_ingot, materials.steel_ingot},
{"default:glass", "default:glass"}, {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({ minetest.register_craft({
output = 'building_blocks:gravel_spread 4', output = 'building_blocks:gravel_spread 4',
recipe = { recipe = {
{"default:gravel", "default:gravel", "default:gravel"}, {materials.gravel, materials.gravel, materials.gravel},
} }
}) })
end end
minetest.register_craft({ if minetest.get_modpath("default") then
output = 'building_blocks:hardwood 2', minetest.register_craft({
recipe = { output = 'building_blocks:hardwood 2',
{"default:wood", "default:junglewood"}, recipe = {
{"default:junglewood", "default:wood"}, {"default:wood", "default:junglewood"},
} {"default:junglewood", "default:wood"},
}) }
minetest.register_craft({ })
output = 'building_blocks:hardwood 2', minetest.register_craft({
recipe = { output = 'building_blocks:hardwood 2',
{"default:junglewood", "default:wood"}, recipe = {
{"default:wood", "default:junglewood"}, {"default:junglewood", "default:wood"},
} {"default:wood", "default:junglewood"},
}) }
})
end
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:knife 1', output = 'building_blocks:knife 1',
recipe = { recipe = {
@ -92,9 +96,9 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "building_blocks:Marble 9", output = "building_blocks:Marble 9",
recipe = { recipe = {
{"default:clay", "group:tar_block", "default:clay"}, {materials.clay_lump, "group:tar_block", materials.clay_lump},
{"group:tar_block","default:clay", "group:tar_block"}, {"group:tar_block",materials.clay_lump, "group:tar_block"},
{"default:clay", "group:tar_block","default:clay"}, {materials.clay_lump, "group:tar_block",materials.clay_lump},
} }
}) })
minetest.register_craft({ minetest.register_craft({
@ -113,15 +117,15 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:tar_base 4', output = 'building_blocks:tar_base 4',
recipe = { recipe = {
{"default:coal_lump", "default:gravel"}, {materials.coal_lump, materials.gravel},
{"default:gravel", "default:coal_lump"} {materials.gravel, materials.coal_lump}
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'building_blocks:tar_base 4', output = 'building_blocks:tar_base 4',
recipe = { recipe = {
{"default:gravel", "default:coal_lump"}, {materials.gravel, materials.coal_lump},
{"default:coal_lump", "default:gravel"} {materials.coal_lump, materials.gravel}
} }
}) })
minetest.register_craft({ minetest.register_craft({
@ -140,14 +144,14 @@ minetest.register_craft({
output = 'building_blocks:woodglass 1', output = 'building_blocks:woodglass 1',
recipe = { recipe = {
{"group:wood"}, {"group:wood"},
{"default:glass"}, {materials.glass_block},
} }
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "building_blocks:smoothglass", output = "building_blocks:smoothglass",
recipe = "default:glass" recipe = materials.glass_block
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", 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", drawtype = "plantlike",
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", 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, sunlight_propagates = true,
buildable_to = true, buildable_to = true,
walkable = false, walkable = false,
@ -172,6 +172,8 @@ local sbox = {
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16}, 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", { minetest.register_node("fake_fire:fancy_fire", {
inventory_image = "fancy_fire_inv.png", inventory_image = "fancy_fire_inv.png",
description = S("Fancy Fire"), description = S("Fancy Fire"),
@ -189,7 +191,7 @@ minetest.register_node("fake_fire:fancy_fire", {
selection_box = sbox, selection_box = sbox,
tiles = { tiles = {
"basic_materials_concrete_block.png", "basic_materials_concrete_block.png",
"default_junglewood.png", wtex,
"fake_fire_empty_tile.png" "fake_fire_empty_tile.png"
}, },
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) 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}}, aspect_w=16, aspect_h=16, length=2}},
}, },
light_source = 9, light_source = 9,
groups = {crumbly=3}, groups = {crumbly=3, dig_stone=2},
paramtype = "light", 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 -- CHIMNEYS
local materials = { local materials = {
{ "stone", S("Stone chimney top") }, { "stone", S("Stone chimney top"), minetest.registered_nodes["mapgen_stone"].tiles[1] },
{ "sandstone", S("Sandstone chimney top") }, { "sandstone", S("Sandstone chimney top"), sandstone_tex },
} }
for _, mat in ipairs(materials) do 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, { minetest.register_node("fake_fire:chimney_top_"..name, {
description = desc, description = desc,
tiles = {"default_"..name..".png^chimney_top.png", "default_"..name..".png"}, tiles = {tex.."^chimney_top.png", tex},
groups = {snappy=3}, groups = {snappy=3, dig_stone=2},
paramtype = "light", paramtype = "light",
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -258,37 +276,42 @@ for _, mat in ipairs(materials) do
end end
}) })
minetest.register_craft({ if minetest.get_modpath("default") then
type = "shapeless", minetest.register_craft({
output = 'fake_fire:chimney_top_'..name, type = "shapeless",
recipe = {"default:torch", "stairs:slab_"..name} output = 'fake_fire:chimney_top_'..name,
}) recipe = {"default:torch", "stairs:slab_"..name}
})
end
end end
minetest.register_alias("fake_fire:flint_and_steel", "fire:flint_and_steel") minetest.register_alias("fake_fire:flint_and_steel", "fire:flint_and_steel")
minetest.override_item("default:ice", { if minetest.get_modpath("default") then
on_ignite = function(pos, igniter) minetest.override_item("default:ice", {
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z} on_ignite = function(pos, igniter)
if minetest.get_node(flame_pos).name == "air" then local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"}) if minetest.get_node(flame_pos).name == "air" then
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"})
end
end end
end })
}) end
-- CRAFTS -- 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({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = 'fake_fire:embers', output = 'fake_fire:fancy_fire',
recipe = {"default:torch", "group:wood", "default:torch"} recipe = {"default:torch", "building_blocks:sticks", "default:torch" }
}) })
end
minetest.register_craft({
type = "shapeless",
output = 'fake_fire:fancy_fire',
recipe = {"default:torch", "building_blocks:sticks", "default:torch" }
})
-- ALIASES -- ALIASES

View File

@ -1,2 +1,2 @@
name = fake_fire 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", { if minetest.get_modpath("default") then
drawtype = "mesh", minetest.override_item("default:bookshelf", {
mesh = "homedecor_3d_bookshelf.obj", drawtype = "mesh",
tiles = { mesh = "homedecor_3d_bookshelf.obj",
"default_wood.png", tiles = {
"default_wood.png^homedecor_3d_bookshelf_inside_back.png", "default_wood.png",
"homedecor_3d_bookshelf_books.png", "default_wood.png^homedecor_3d_bookshelf_inside_back.png",
}, "homedecor_3d_bookshelf_books.png",
paramtype = "light", },
paramtype2 = "facedir", paramtype = "light",
}) paramtype2 = "facedir",
})
end
if minetest.get_modpath("vessels") then if minetest.get_modpath("vessels") then
minetest.override_item("vessels:shelf", { minetest.override_item("vessels:shelf", {

View File

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

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 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)"), description = S("Bathroom/kitchen tiles (dark)"),
tiles = { tiles = {
"homedecor_bathroom_tiles_bg.png" "homedecor_bathroom_tiles_bg.png"
@ -13,13 +16,24 @@ minetest.register_node(":homedecor:bathroom_tiles_dark", {
paramtype = "light", paramtype = "light",
paramtype2 = "color", paramtype2 = "color",
palette = "unifieddyes_palette_extended.png", palette = "unifieddyes_palette_extended.png",
groups = {cracky=3, ud_param2_colorable = 1}, groups = {cracky=3, ud_param2_colorable = 1, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = unifieddyes.on_construct, on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig, 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)"), description = S("Bathroom/kitchen tiles (medium)"),
tiles = { tiles = {
"homedecor_bathroom_tiles_bg.png" "homedecor_bathroom_tiles_bg.png"
@ -30,13 +44,24 @@ minetest.register_node(":homedecor:bathroom_tiles_medium", {
paramtype = "light", paramtype = "light",
paramtype2 = "color", paramtype2 = "color",
palette = "unifieddyes_palette_extended.png", palette = "unifieddyes_palette_extended.png",
groups = {cracky=3, ud_param2_colorable = 1}, groups = {cracky=3, ud_param2_colorable = 1, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = unifieddyes.on_construct, on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig, 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)"), description = S("Bathroom/kitchen tiles (light)"),
tiles = { tiles = {
"homedecor_bathroom_tiles_bg.png" "homedecor_bathroom_tiles_bg.png"
@ -47,10 +72,21 @@ minetest.register_node(":homedecor:bathroom_tiles_light", {
paramtype = "light", paramtype = "light",
paramtype2 = "color", paramtype2 = "color",
palette = "unifieddyes_palette_extended.png", palette = "unifieddyes_palette_extended.png",
groups = {cracky=3, ud_param2_colorable = 1}, groups = {cracky=3, ud_param2_colorable = 1, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_construct = unifieddyes.on_construct, on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig, on_dig = unifieddyes.on_dig,
crafts = {
{
output = "homedecor:bathroom_tiles_light 4",
recipe = {
{ "group:marble", "group:marble" },
{ "group:marble", "group:marble" }
},
}
}
}) })
local tr_cbox = { local tr_cbox = {
@ -63,20 +99,30 @@ homedecor.register("towel_rod", {
mesh = "homedecor_towel_rod.obj", mesh = "homedecor_towel_rod.obj",
tiles = { tiles = {
"homedecor_generic_terrycloth.png", "homedecor_generic_terrycloth.png",
"default_wood.png", wood_tex,
}, },
inventory_image = "homedecor_towel_rod_inv.png", inventory_image = "homedecor_towel_rod_inv.png",
selection_box = tr_cbox, selection_box = tr_cbox,
walkable = false, walkable = false,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,dig_tree=2},
sounds = default.node_sound_defaults(), _sound_def = {
key = "node_sound_defaults",
},
crafts = {
{
recipe = {
{ "group:wood", "group:stick", "group:wood" },
{ "", "building_blocks:terrycloth_towel", "" },
},
}
}
}) })
homedecor.register("medicine_cabinet", { homedecor.register("medicine_cabinet", {
description = S("Medicine cabinet"), description = S("Medicine cabinet"),
mesh = "homedecor_medicine_cabinet.obj", mesh = "homedecor_medicine_cabinet.obj",
tiles = { tiles = {
'default_wood.png', wood_tex,
'homedecor_medicine_cabinet_mirror.png' 'homedecor_medicine_cabinet_mirror.png'
}, },
inventory_image = "homedecor_medicine_cabinet_inv.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} fixed = {-0.3125, -0.1875, 0.3125, 0.3125, 0.5, 0.5}
}, },
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3, dig_stone = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
on_punch = function(pos, node, puncher, pointed_thing) on_punch = function(pos, node, puncher, pointed_thing)
node.name = "homedecor:medicine_cabinet_open" node.name = "homedecor:medicine_cabinet_open"
minetest.swap_node(pos, node) minetest.swap_node(pos, node)
@ -99,12 +147,21 @@ homedecor.register("medicine_cabinet", {
inventory = { inventory = {
size=6, 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", { homedecor.register("medicine_cabinet_open", {
mesh = "homedecor_medicine_cabinet_open.obj", mesh = "homedecor_medicine_cabinet_open.obj",
tiles = { tiles = {
'default_wood.png', wood_tex,
'homedecor_medicine_cabinet_mirror.png', 'homedecor_medicine_cabinet_mirror.png',
'homedecor_medicine_cabinet_inside.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} fixed = {-0.3125, -0.1875, -0.25, 0.3125, 0.5, 0.5}
}, },
walkable = false, 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", drop = "homedecor:medicine_cabinet",
on_punch = function(pos, node, puncher, pointed_thing) on_punch = function(pos, node, puncher, pointed_thing)
node.name = "homedecor:medicine_cabinet" node.name = "homedecor:medicine_cabinet"
@ -151,12 +208,23 @@ homedecor.register("toilet", {
}, },
selection_box = toilet_sbox, selection_box = toilet_sbox,
node_box = toilet_cbox, node_box = toilet_cbox,
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "homedecor:toilet_open" node.name = "homedecor:toilet_open"
minetest.set_node(pos, node) minetest.set_node(pos, node)
end end,
crafts = {
{
recipe = {
{ "","","water_bucket"},
{ "group:marble","group:marble", "group:marble" },
{ "", "empty_bucket", "" },
},
}
}
}) })
homedecor.register("toilet_open", { homedecor.register("toilet_open", {
@ -165,15 +233,17 @@ homedecor.register("toilet_open", {
"building_blocks_marble.png", "building_blocks_marble.png",
"building_blocks_marble.png", "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 } { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }
}, },
selection_box = toilet_sbox, selection_box = toilet_sbox,
collision_box = toilet_cbox, collision_box = toilet_cbox,
drop = "homedecor:toilet", drop = "homedecor:toilet",
use_texture_alpha = "blend", use_texture_alpha = "blend",
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "homedecor:toilet" node.name = "homedecor:toilet"
minetest.set_node(pos, node) minetest.set_node(pos, node)
@ -197,13 +267,24 @@ homedecor.register("toilet_paper", {
mesh = "homedecor_toilet_paper.obj", mesh = "homedecor_toilet_paper.obj",
tiles = { tiles = {
"homedecor_generic_quilted_paper.png", "homedecor_generic_quilted_paper.png",
"default_wood.png" wood_tex
}, },
inventory_image = "homedecor_toilet_paper_inv.png", inventory_image = "homedecor_toilet_paper_inv.png",
selection_box = tp_cbox, selection_box = tp_cbox,
walkable = false, walkable = false,
groups = {snappy=3,oddly_breakable_by_hand=3}, groups = {snappy=3,oddly_breakable_by_hand=3, dig_stone = 2},
sounds = default.node_sound_defaults(), _sound_def = {
key = "node_sound_defaults",
},
crafts = {
{
recipe = {
{ "", "paper", "paper" },
{ "group:wood", "group:stick", "paper" },
{ "", "paper", "paper" },
},
}
}
}) })
--Sink --Sink
@ -230,17 +311,27 @@ homedecor.register("sink", {
tiles = { tiles = {
"building_blocks_marble.png", "building_blocks_marble.png",
"building_blocks_marble.png", "building_blocks_marble.png",
"default_water.png" water_tex
}, },
use_texture_alpha = "blend", use_texture_alpha = "blend",
inventory_image="homedecor_bathroom_sink_inv.png", inventory_image="homedecor_bathroom_sink_inv.png",
selection_box = sink_sbox, selection_box = sink_sbox,
collision_box = sink_cbox, collision_box = sink_cbox,
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_destruct = function(pos) on_destruct = function(pos)
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z}) 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 --Taps
@ -279,11 +370,20 @@ homedecor.register("taps", {
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 }, fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
}, },
walkable = false, walkable = false,
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = taps_on_rightclick, on_rightclick = taps_on_rightclick,
on_destruct = homedecor.stop_particle_spawner, 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", { homedecor.register("taps_brass", {
@ -302,11 +402,20 @@ homedecor.register("taps_brass", {
fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 }, fixed = { -4/16, -7/16, 4/16, 4/16, -4/16, 8/16 },
}, },
walkable = false, walkable = false,
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_rightclick = taps_on_rightclick, on_rightclick = taps_on_rightclick,
on_destruct = homedecor.stop_particle_spawner, on_destruct = homedecor.stop_particle_spawner,
on_rotate = sc_disallow or nil, on_rotate = sc_disallow or nil,
crafts = {
{
recipe = {
{ "basic_materials:brass_ingot","water_bucket", "basic_materials:brass_ingot" },
},
}
}
}) })
--Shower Tray --Shower Tray
@ -328,12 +437,21 @@ homedecor.register("shower_tray", {
}, },
}, },
selection_box = homedecor.nodebox.slab_y(0.1), selection_box = homedecor.nodebox.slab_y(0.1),
groups = {cracky=2}, groups = {cracky=2, dig_stone = 2},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
on_destruct = function(pos) 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+2, z=pos.z}) -- the showerhead
homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z}) -- the taps, if any 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 --Shower Head
@ -353,7 +471,7 @@ homedecor.register("shower_head", {
}, },
inventory_image = "homedecor_shower_head_inv.png", inventory_image = "homedecor_shower_head_inv.png",
description = S("Shower Head"), description = S("Shower Head"),
groups = {snappy=3}, groups = {snappy=3, dig_stone = 2},
selection_box = sh_cbox, selection_box = sh_cbox,
walkable = false, walkable = false,
on_rotate = sc_disallow or nil, on_rotate = sc_disallow or nil,
@ -376,7 +494,14 @@ homedecor.register("shower_head", {
end, end,
on_destruct = function(pos) on_destruct = function(pos)
homedecor.stop_particle_spawner(pos) homedecor.stop_particle_spawner(pos)
end end,
crafts = {
{
recipe = {
{"steel_ingot", "water_bucket"},
},
}
}
}) })
local tub_sbox = { local tub_sbox = {
@ -412,10 +537,21 @@ homedecor.register("bathtub_clawfoot_brass_taps", {
"homedecor_bathtub_clawfoot_bottom_inside.png", "homedecor_bathtub_clawfoot_bottom_inside.png",
}, },
description = S("Bathtub, clawfoot, with brass taps"), description = S("Bathtub, clawfoot, with brass taps"),
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
selection_box = tub_sbox, selection_box = tub_sbox,
node_box = tub_cbox, 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", { homedecor.register("bathtub_clawfoot_chrome_taps", {
@ -430,10 +566,21 @@ homedecor.register("bathtub_clawfoot_chrome_taps", {
"homedecor_bathtub_clawfoot_bottom_inside.png", "homedecor_bathtub_clawfoot_bottom_inside.png",
}, },
description = S("Bathtub, clawfoot, with chrome taps"), description = S("Bathtub, clawfoot, with chrome taps"),
groups = {cracky=3}, groups = {cracky=3, dig_stone = 2},
selection_box = tub_sbox, selection_box = tub_sbox,
node_box = tub_cbox, 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 = { local bs_cbox = {
@ -453,10 +600,21 @@ homedecor.register("bathroom_set", {
}, },
inventory_image = "homedecor_bathroom_set_inv.png", inventory_image = "homedecor_bathroom_set_inv.png",
description = S("Bathroom sundries set"), description = S("Bathroom sundries set"),
groups = {snappy=3}, groups = {snappy=3, dig_stone = 2},
selection_box = bs_cbox, selection_box = bs_cbox,
walkable = false, 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 -- aliases
@ -528,45 +686,7 @@ minetest.register_lbm({
end end
}) })
-- crafting -- color 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" }
},
})
unifieddyes.register_color_craft({ unifieddyes.register_color_craft({
output = "homedecor:bathroom_tiles_light", output = "homedecor:bathroom_tiles_light",
@ -579,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({ unifieddyes.register_color_craft({
output = "homedecor:bathroom_tiles_medium", output = "homedecor:bathroom_tiles_medium",
palette = "extended", palette = "extended",
@ -598,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({ unifieddyes.register_color_craft({
output = "homedecor:bathroom_tiles_dark", output = "homedecor:bathroom_tiles_dark",
palette = "extended", palette = "extended",
@ -617,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 name = homedecor_bathroom
description = Homedecor mod: bathroom description = Homedecor mod: bathroom
depends = homedecor_common, default, basic_materials, unifieddyes, building_blocks depends = homedecor_common
optional_depends = bucket, homedecor_fences, screwdriver 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 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 = { local bed_sbox = {
type = "wallmounted", type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, 0.5, 0.5, 1.5 } 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", { homedecor.register("bed_regular", {
mesh = "homedecor_bed_regular.obj", mesh = "homedecor_bed_regular.obj",
tiles = { tiles = {
{ name = "homedecor_bed_frame.png", color = 0xffffffff }, { name = "homedecor_bed_frame.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff }, { name = wood_tex, color = 0xffffffff },
{ name = "wool_white.png", color = 0xffffffff }, { name = wool_tex, color = 0xffffffff },
"wool_white.png", wool_tex,
{ name = "homedecor_bed_bottom.png", color = 0xffffffff }, { name = "homedecor_bed_bottom.png", color = 0xffffffff },
"wool_white.png^[brighten", -- pillow wool_tex.."^[brighten", -- pillow
}, },
inventory_image = "homedecor_bed_inv.png", inventory_image = "homedecor_bed_inv.png",
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
description = S("Bed"), description = S("Bed"),
groups = {snappy=3, ud_param2_colorable = 1}, groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2},
selection_box = bed_sbox, selection_box = bed_sbox,
node_box = bed_cbox, node_box = bed_cbox,
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = sc_disallow or nil, on_rotate = sc_disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(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() local itemname = itemstack:get_name()
if itemname == "homedecor:bed_regular" then if itemname == "homedecor:bed_regular" then
homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true) homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true)
return itemstack elseif bed_on_rightclick then
else
bed_on_rightclick(pos, node, clicker) bed_on_rightclick(pos, node, clicker)
return itemstack
end 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", { homedecor.register("bed_extended", {
mesh = "homedecor_bed_extended.obj", mesh = "homedecor_bed_extended.obj",
tiles = { tiles = {
{ name = "homedecor_bed_frame.png", color = 0xffffffff }, { name = "homedecor_bed_frame.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff }, { name = wood_tex, color = 0xffffffff },
{ name = "wool_white.png", color = 0xffffffff }, { name = wool_tex, color = 0xffffffff },
"wool_white.png", wool_tex,
{ name = "homedecor_bed_bottom.png", color = 0xffffffff }, { name = "homedecor_bed_bottom.png", color = 0xffffffff },
"wool_white.png^[brighten", wool_tex.."^[brighten",
}, },
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = bed_sbox, selection_box = bed_sbox,
node_box = bed_cbox, node_box = bed_cbox,
groups = {snappy=3, ud_param2_colorable = 1}, groups = {snappy=3, ud_param2_colorable = 1, dig_generic=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
expand = { forward = "air" }, expand = { forward = "air" },
on_rotate = sc_disallow or nil, on_rotate = sc_disallow or nil,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
@ -97,7 +112,9 @@ homedecor.register("bed_extended", {
end, end,
on_dig = unifieddyes.on_dig, on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) 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 return itemstack
end, end,
drop = "homedecor:bed_regular" drop = "homedecor:bed_regular"
@ -107,20 +124,22 @@ homedecor.register("bed_kingsize", {
mesh = "homedecor_bed_kingsize.obj", mesh = "homedecor_bed_kingsize.obj",
tiles = { tiles = {
{ name = "homedecor_bed_frame.png", color = 0xffffffff }, { name = "homedecor_bed_frame.png", color = 0xffffffff },
{ name = "default_wood.png", color = 0xffffffff }, { name = wood_tex, color = 0xffffffff },
{ name = "wool_white.png", color = 0xffffffff }, { name = wool_tex, color = 0xffffffff },
"wool_white.png", wool_tex,
{ name = "homedecor_bed_bottom.png", color = 0xffffffff }, { name = "homedecor_bed_bottom.png", color = 0xffffffff },
"wool_white.png^[brighten", wool_tex.."^[brighten",
}, },
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
inventory_image = "homedecor_bed_kingsize_inv.png", inventory_image = "homedecor_bed_kingsize_inv.png",
description = S("Bed (king sized)"), 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, selection_box = kbed_sbox,
node_box = kbed_cbox, node_box = kbed_cbox,
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
on_rotate = sc_disallow or nil, on_rotate = sc_disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
@ -134,9 +153,18 @@ homedecor.register("bed_kingsize", {
end, end,
on_dig = unifieddyes.on_dig, on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) 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 return itemstack
end, end,
crafts = {
{
recipe = {
{ "homedecor:bed_regular", "homedecor:bed_regular" }
},
}
}
}) })
for w, d in pairs({ ["mahogany"] = S("mahogany"), ["oak"] = S("oak") }) do 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 { -8/16, -8/16, -30/64, 8/16, -7/16, 8/16 } -- bottom
} }
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = { type = "regular" }, selection_box = { type = "regular" },
infotext=S("One-drawer Nightstand"), infotext=S("One-drawer Nightstand"),
inventory = { 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 { -7/16, -7/16, -32/64, 7/16, -1/16, -29/64 }, -- bottom drawer face
} }
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = { type = "regular" }, selection_box = { type = "regular" },
infotext=S("Two-drawer Nightstand"), infotext=S("Two-drawer Nightstand"),
inventory = { inventory = {
@ -318,7 +350,7 @@ minetest.register_craft( {
output = "homedecor:nightstand_mahogany_one_drawer", output = "homedecor:nightstand_mahogany_one_drawer",
recipe = { recipe = {
"homedecor:nightstand_oak_one_drawer", "homedecor:nightstand_oak_one_drawer",
"dye:brown", homedecor.materials.dye_brown,
}, },
}) })
@ -333,7 +365,7 @@ minetest.register_craft( {
output = "homedecor:nightstand_mahogany_two_drawers", output = "homedecor:nightstand_mahogany_two_drawers",
recipe = { recipe = {
"homedecor:nightstand_oak_two_drawers", "homedecor:nightstand_oak_two_drawers",
"dye:brown", homedecor.materials.dye_brown,
}, },
}) })
@ -343,16 +375,6 @@ minetest.register_craft({
burntime = 30, 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({ unifieddyes.register_color_craft({
output = "homedecor:bed_regular", output = "homedecor:bed_regular",
palette = "wallmounted", 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({ unifieddyes.register_color_craft({
output = "homedecor:bed_kingsize", output = "homedecor:bed_kingsize",
palette = "wallmounted", palette = "wallmounted",

View File

@ -1,4 +1,4 @@
name = homedecor_bedroom name = homedecor_bedroom
description = Homedecor mod: bedroom description = Homedecor mod: bedroom
depends = homedecor_common, default, basic_materials, unifieddyes, creative, beds depends = homedecor_common
optional_depends = screwdriver 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 if data.title and data.title ~= "" then
meta:set_string("infotext", data.title) meta:set_string("infotext", data.title)
end end
if not creative.is_enabled_for(plname) then if not minetest.is_creative_enabled(plname) then
itemstack:take_item() itemstack:take_item()
end end
return itemstack return itemstack
@ -128,16 +128,15 @@ for _, c in ipairs(bookcolors) do
local owner = meta:get_string("owner") or "" local owner = meta:get_string("owner") or ""
local formspec local formspec
if owner == "" or owner == player_name then 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 :;".. "field[0.5,1;7.5,0;title;Book title :;"..
minetest.formspec_escape(title).."]".. minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;text;Book content :;".. "textarea[0.5,1.5;7.5,7;text;Book content :;"..
minetest.formspec_escape(text).."]".. minetest.formspec_escape(text).."]"..
"button_exit[2.5,7.5;3,1;save;Save]" "button_exit[2.5,7.5;3,1;save;Save]"
else else
formspec = "size[8,8]"..default.gui_bg.. formspec = "size[8,8]"..
"button_exit[7,0.25;1,0.5;close;X]".. "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.5;by "..owner.."]"..
"label[0.5,0;"..minetest.formspec_escape(title).."]".. "label[0.5,0;"..minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text)..";]" "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, output = "homedecor:book_"..color,
recipe = { recipe = {
"dye:"..color, "dye:"..color,
"default:book" homedecor.materials.book
}, },
}) })

View File

@ -1,4 +1,4 @@
name = homedecor_books name = homedecor_books
description = Homedecor mod: books description = Homedecor mod: books
depends = homedecor_common, default, creative depends = homedecor_common
optional_depends = unifieddyes 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", mesh = "homedecor_ac.obj",
tiles = { tiles = {
"homedecor_ac.png", "homedecor_ac.png",
"default_glass.png" homedecor.textures.glass
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_stone = 3 },
use_texture_alpha = "clip", use_texture_alpha = "clip",
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type="regular" }, 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 -- fans
@ -75,6 +93,14 @@ homedecor.register("desk_fan", {
local entities = minetest.get_objects_inside_radius(pos, 0.1) local entities = minetest.get_objects_inside_radius(pos, 0.1)
if entities[1] then entities[1]:remove() end if entities[1] then entities[1]:remove() end
end, end,
crafts = {
{
recipe = {
{"steel_ingot", "homedecor:fan_blades", "basic_materials:motor"},
{"", "steel_ingot", ""}
},
}
}
}) })
-- ceiling fan -- ceiling fan
@ -97,9 +123,27 @@ homedecor.register("ceiling_fan", {
} }
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_stone = 3 },
light_source = default.LIGHT_MAX-1, light_source = minetest.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(), _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 -- heating devices
@ -115,8 +159,10 @@ homedecor.register("space_heater", {
}, },
inventory_image = "homedecor_heater_inv.png", inventory_image = "homedecor_heater_inv.png",
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3, dig_stone = 3 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -126,6 +172,15 @@ homedecor.register("space_heater", {
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-0.1875, -0.5, 0.0625, 0.1875, 0, 0.3125} 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", inventory_image = "homedecor_radiator_inv.png",
description = S("Radiator heater"), description = S("Radiator heater"),
groups = {snappy=3}, groups = {snappy=3, dig_stone = 3},
selection_box = r_cbox, selection_box = r_cbox,
collision_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 -- crafting
@ -154,70 +220,7 @@ minetest.register_craft( {
output = "homedecor:fan_blades 2", output = "homedecor:fan_blades 2",
recipe = { recipe = {
{ "", "basic_materials:plastic_sheet", "" }, { "", "basic_materials:plastic_sheet", "" },
{ "", "default:steel_ingot", "" }, { "", homedecor.materials.steel_ingot, "" },
{ "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" } { "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 name = homedecor_climate_control
description = Homedecor mod: climate control description = Homedecor mod: climate control
depends = homedecor_common, default, basic_materials depends = homedecor_common
optional_depends = building_blocks, screwdriver 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 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 = { local clock_sbox = {
type = "fixed", type = "fixed",
fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 } fixed = { -8/32, -8/32, 14/32, 8/32, 8/32, 16/32 }
} }
local clock_materials = { local clock_materials = {
{ "plastic", S("Plastic analog clock"), "homedecor_generic_plastic.png" }, {"plastic", S("Plastic analog clock"), "homedecor_generic_plastic.png", plastic_craft},
{ "wood", S("Wooden analog clock"), "default_wood.png" } {"wood", S("Wooden analog clock"), wood, wood_craft}
} }
for _, mat in ipairs(clock_materials) do 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, { homedecor.register("analog_clock_"..name, {
description = desc, description = desc,
mesh = "homedecor_analog_clock.obj", mesh = "homedecor_analog_clock.obj",
@ -24,8 +49,13 @@ for _, mat in ipairs(clock_materials) do
inventory_image = "homedecor_analog_clock_"..name.."_inv.png", inventory_image = "homedecor_analog_clock_"..name.."_inv.png",
walkable = false, walkable = false,
selection_box = clock_sbox, selection_box = clock_sbox,
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
craft
}
}) })
end end
@ -47,8 +77,20 @@ homedecor.register("digital_clock", {
} }
}, },
walkable = false, walkable = false,
sounds = default.node_sound_wood_defaults(), _sound_def = {
groups = {snappy=3}, 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", { homedecor.register("alarm_clock", {
@ -69,8 +111,19 @@ homedecor.register("alarm_clock", {
} }
}, },
walkable = false, walkable = false,
sounds = default.node_sound_wood_defaults(), _sound_def = {
groups = {snappy=3}, 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 = { local gf_cbox = {
@ -82,7 +135,7 @@ homedecor.register("grandfather_clock", {
description = S("Grandfather Clock"), description = S("Grandfather Clock"),
mesh = "homedecor_grandfather_clock.obj", mesh = "homedecor_grandfather_clock.obj",
tiles = { tiles = {
"default_glass.png", homedecor.textures.glass,
"homedecor_grandfather_clock_face.png", "homedecor_grandfather_clock_face.png",
homedecor.lux_wood, homedecor.lux_wood,
"homedecor_grandfather_clock_face_edge.png", "homedecor_grandfather_clock_face_edge.png",
@ -90,60 +143,23 @@ homedecor.register("grandfather_clock", {
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
inventory_image = "homedecor_grandfather_clock_inv.png", inventory_image = "homedecor_grandfather_clock_inv.png",
groups = { snappy = 3 }, groups = {snappy = 3, dig_tree=2},
selection_box = gf_cbox, selection_box = gf_cbox,
collision_box = gf_cbox, collision_box = gf_cbox,
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
expand = { top="placeholder" }, expand = { top="placeholder" },
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
}) crafts = {
{
-- crafting 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" },
minetest.register_craft({ { "building_blocks:slab_hardwood","basic_materials:brass_ingot","building_blocks:slab_hardwood" }
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" }
},
}) })
-- aliases -- aliases

View File

@ -1,4 +1,4 @@
name = homedecor_clocks name = homedecor_clocks
description = Homedecor mod: clocks description = Homedecor mod: clocks
depends = homedecor_common, default, basic_materials, dye depends = homedecor_common
optional_depends = building_blocks, screwdriver 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") local S = minetest.get_translator("homedecor_cobweb")
homedecor_cobweb = {} homedecor_cobweb = {}
minetest.register_node(":homedecor:cobweb_corner", { homedecor.register("cobweb_corner", {
description = S("Cobweb"), description = S("Cobweb"),
drawtype = "torchlike", drawtype = "torchlike",
tiles = { "homedecor_cobweb_torchlike.png" }, tiles = { "homedecor_cobweb_torchlike.png" },
@ -19,13 +19,23 @@ minetest.register_node(":homedecor:cobweb_corner", {
walkable = false, walkable = false,
selection_box = { type = "regular" }, selection_box = { type = "regular" },
visual_scale = 1.4, 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) after_place_node = function(pos, placer, itemstack, pointed_thing)
homedecor_cobweb.rotate(pos) 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"), description = S("Cobweb"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { "homedecor_cobweb.png" }, tiles = { "homedecor_cobweb.png" },
@ -49,11 +59,11 @@ minetest.register_node(":homedecor:cobweb_centered", {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, 0, 0.5, 0.5, 0 } 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" drop = "homedecor:cobweb_corner"
}) })
minetest.register_node(":homedecor:cobweb_flat", { homedecor.register("cobweb_flat", {
description = S("Cobweb"), description = S("Cobweb"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { "homedecor_cobweb.png" }, tiles = { "homedecor_cobweb.png" },
@ -77,11 +87,11 @@ minetest.register_node(":homedecor:cobweb_flat", {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, 0.495, 0.5, 0.5, 0.495 } 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" drop = "homedecor:cobweb_corner"
}) })
minetest.register_node(":homedecor:cobweb_plantlike", { homedecor.register("cobweb_plantlike", {
description = S("Cobweb"), description = S("Cobweb"),
drawtype = "plantlike", drawtype = "plantlike",
tiles = { "homedecor_cobweb_plantlike.png" }, tiles = { "homedecor_cobweb_plantlike.png" },
@ -98,7 +108,7 @@ minetest.register_node(":homedecor:cobweb_plantlike", {
walkable = false, walkable = false,
selection_box = { type = "regular" }, selection_box = { type = "regular" },
visual_scale = 1.189, 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" drop = "homedecor:cobweb_corner"
}) })
@ -159,14 +169,3 @@ function homedecor_cobweb.rotate(pos)
end end
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 name = homedecor_cobweb
description = Homedecor mod: 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) ctrl_node_def.after_place_node(pos, placer, itemstack, pointed_thing)
end end
if not creative.is_enabled_for(placer_name) then if not minetest.is_creative_enabled(placer_name) then
itemstack:take_item() itemstack:take_item()
end end
end end
@ -133,7 +133,8 @@ function homedecor.stack_vertically(itemstack, placer, pointed_thing, node1, nod
end end
-- Stack one door node above another -- 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) 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) 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 if trybunks and is_buildable_to(placer_name, toppos, topposfwd) then
local newname = string.gsub(thisnode.name, "_regular", "_extended") local newname = string.gsub(thisnode.name, "_regular", "_extended")
local newparam2 = param2 % 8 -- local newparam2 = param2 % 8
-- FIXME: is newparam2 a legacy unused variable from a8729575abfbd15cc622b413b71976c9157fbab4? or should this variable be used somewhere? -- 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(toppos, { name = thisnode.name, param2 = param2})
minetest.swap_node(pos, { name = newname, param2 = param2}) minetest.swap_node(pos, { name = newname, param2 = param2})
itemstack:take_item() itemstack:take_item()

View File

@ -143,7 +143,10 @@ function homedecor.register_furnace(name, furnacedef)
description = description, description = description,
tiles = make_tiles(furnacedef.tiles, furnacedef.tile_format, false), tiles = make_tiles(furnacedef.tiles, furnacedef.tile_format, false),
groups = furnacedef.groups or {cracky=2}, 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, on_construct = furnace_construct,
can_dig = furnace_can_dig, can_dig = furnace_can_dig,
allow_metadata_inventory_put = furnace_allow_put, allow_metadata_inventory_put = furnace_allow_put,
@ -158,7 +161,10 @@ function homedecor.register_furnace(name, furnacedef)
light_source = 8, light_source = 8,
drop = "homedecor:" .. name, drop = "homedecor:" .. name,
groups = furnacedef.groups or {cracky=2, not_in_creative_inventory=1}, 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, on_construct = furnace_construct,
can_dig = furnace_can_dig, can_dig = furnace_can_dig,
allow_metadata_inventory_put = furnace_allow_put, allow_metadata_inventory_put = furnace_allow_put,

View File

@ -49,17 +49,13 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
return isceiling, pos return isceiling, pos
end 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_black = 0xff303030
homedecor.color_dark_grey = 0xff606060 homedecor.color_dark_grey = 0xff606060
homedecor.color_med_grey = 0xffa0a0a0 homedecor.color_med_grey = 0xffa0a0a0
-- load different handler subsystems -- load different handler subsystems
dofile(modpath.."/textures.lua")
dofile(modpath.."/materials.lua")
dofile(modpath.."/nodeboxes.lua") dofile(modpath.."/nodeboxes.lua")
dofile(modpath.."/expansion.lua") dofile(modpath.."/expansion.lua")
dofile(modpath.."/furnaces.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") return meta:get_inventory():is_empty("main")
end end
local background = default.gui_bg .. default.gui_bg_img .. default.gui_slots
local default_inventory_formspecs = { local default_inventory_formspecs = {
["4"]="size[8,6]".. background .. ["4"]="size[8,6]"..
"list[context;main;2,0;4,1;]" .. "list[context;main;2,0;4,1;]" ..
"list[current_player;main;0,2;8,4;]" .. "list[current_player;main;0,2;8,4;]" ..
"listring[]", "listring[]",
["6"]="size[8,6]".. background .. ["6"]="size[8,6]"..
"list[context;main;1,0;6,1;]".. "list[context;main;1,0;6,1;]"..
"list[current_player;main;0,2;8,4;]" .. "list[current_player;main;0,2;8,4;]" ..
"listring[]", "listring[]",
["8"]="size[8,6]".. background .. ["8"]="size[8,6]"..
"list[context;main;0,0;8,1;]".. "list[context;main;0,0;8,1;]"..
"list[current_player;main;0,2;8,4;]" .. "list[current_player;main;0,2;8,4;]" ..
"listring[]", "listring[]",
["12"]="size[8,7]".. background .. ["12"]="size[8,7]"..
"list[context;main;1,0;6,2;]".. "list[context;main;1,0;6,2;]"..
"list[current_player;main;0,3;8,4;]" .. "list[current_player;main;0,3;8,4;]" ..
"listring[]", "listring[]",
["16"]="size[8,7]".. background .. ["16"]="size[8,7]"..
"list[context;main;0,0;8,2;]".. "list[context;main;0,0;8,2;]"..
"list[current_player;main;0,3;8,4;]" .. "list[current_player;main;0,3;8,4;]" ..
"listring[]", "listring[]",
["24"]="size[8,8]".. background .. ["24"]="size[8,8]"..
"list[context;main;0,0;8,3;]".. "list[context;main;0,0;8,3;]"..
"list[current_player;main;0,4;8,4;]" .. "list[current_player;main;0,4;8,4;]" ..
"listring[]", "listring[]",
["32"]="size[8,9]".. background .. ["32"]="size[8,9]"..
"list[context;main;0,0.3;8,4;]".. "list[context;main;0,0.3;8,4;]"..
"list[current_player;main;0,4.85;8,1;]".. "list[current_player;main;0,4.85;8,1;]"..
"list[current_player;main;0,6.08;8,3;8]".. "list[current_player;main;0,6.08;8,3;8]"..
"listring[context;main]" .. "listring[context;main]" ..
"listring[current_player;main]" .. "listring[current_player;main]",
default.get_hotbar_bg(0,4.85),
["50"]="size[10,10]".. background .. ["50"]="size[10,10]"..
"list[context;main;0,0;10,5;]".. "list[context;main;0,0;10,5;]"..
"list[current_player;main;1,6;8,4;]" .. "list[current_player;main;1,6;8,4;]" ..
"listring[]", "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 name = homedecor_common
description = Homedecor mod: common description = Homedecor mod: common
depends = default, creative depends = basic_materials, unifieddyes
optional_depends = screwdriver, hopper 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_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 starting from -z (+z with negative depth)
slab_z = function(depth, shift) 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 -- 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 -- a "negative" depth as a depth extending from the other side, i.e. +z
local s = shift or 0 local s = shift or 0

View File

@ -46,9 +46,12 @@ function homedecor.register(name, original_def)
if expand then if expand then
-- dissallow rotating only half the expanded node by default -- dissallow rotating only half the expanded node by default
-- unless we know better -- unless we know better
def.on_rotate = def.on_rotate def.on_rotate = def.on_rotate or (
or (minetest.get_modpath("screwdriver") and (def.mesh and expand.top and screwdriver.rotate_simple) minetest.get_modpath("screwdriver") and (
or screwdriver.disallow) or nil (def.mesh and expand.top and screwdriver.rotate_simple) or
screwdriver.disallow
)
)
def.on_place = def.on_place or function(itemstack, placer, pointed_thing) def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
if expand.top then if expand.top then
@ -96,6 +99,31 @@ function homedecor.register(name, original_def)
end end
end end
local crafts = def.crafts and table.copy(def.crafts) or {}
def.crafts = nil
-- register the actual minetest node -- register the actual minetest node
minetest.register_node(":homedecor:" .. name, def) 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 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 -- 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 S = minetest.get_translator("homedecor_doors_and_gates")
local mesecons_mp = minetest.get_modpath("mesecons") local mesecons_mp = minetest.get_modpath("mesecons")
homedecor_doors_and_gates = {} homedecor_doors_and_gates = {}

View File

@ -1,4 +1,4 @@
name = homedecor_doors_and_gates name = homedecor_doors_and_gates
description = Homedecor mod: doors and gates description = Homedecor mod: doors and gates
depends = homedecor_common, default, basic_materials, dye, doors depends = homedecor_common
optional_depends = homedecor_misc, homedecor_3d_extras, mesecons, screwdriver 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}, 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 for _, onoff in ipairs ({"on", "off"}) do
@ -120,7 +129,7 @@ homedecor.register("doorbell", {
tiles = { "homedecor_doorbell.png" }, tiles = { "homedecor_doorbell.png" },
inventory_image = "homedecor_doorbell_inv.png", inventory_image = "homedecor_doorbell_inv.png",
description = S("Doorbell"), description = S("Doorbell"),
groups = {snappy=3}, groups = {snappy=3, dig_tree = 3},
walkable = false, walkable = false,
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -135,20 +144,18 @@ homedecor.register("doorbell", {
gain = 1.0, gain = 1.0,
max_hear_distance = 15 max_hear_distance = 15
}) })
end end,
crafts = {
{
recipe = {
{ "homedecor:light_switch_off", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
},
}
}
}) })
-- crafting -- 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( { minetest.register_craft( {
output = "homedecor:light_switch_off", output = "homedecor:light_switch_off",
recipe = { 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 -- aliases
minetest.register_alias("homedecor:light_switch", "homedecor:light_switch_on") minetest.register_alias("homedecor:light_switch", "homedecor:light_switch_on")

View File

@ -1,4 +1,4 @@
name = homedecor_electrical name = homedecor_electrical
description = Homedecor mod: electrical description = Homedecor mod: electrical
depends = homedecor_common, default, basic_materials depends = homedecor_common
optional_depends = mesecons, mesecons_receiver 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_sides.png",
"homedecor_speaker_front.png" "homedecor_speaker_front.png"
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:speaker_open", param2 = node.param2}) 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", { homedecor.register("speaker_open", {
@ -25,8 +43,10 @@ homedecor.register("speaker_open", {
"homedecor_speaker_open_front.png", "homedecor_speaker_open_front.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black } { name = "homedecor_generic_metal.png", color = homedecor.color_black }
}, },
groups = { snappy = 3, not_in_creative_inventory=1 }, groups = { snappy = 3, not_in_creative_inventory=1, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:speaker", param2 = node.param2}) minetest.set_node(pos, {name = "homedecor:speaker", param2 = node.param2})
end end
@ -46,8 +66,22 @@ homedecor.register("speaker_small", {
}, },
selection_box = spk_cbox, selection_box = spk_cbox,
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _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", { homedecor.register("stereo", {
@ -58,8 +92,19 @@ homedecor.register("stereo", {
'homedecor_stereo_left.png', 'homedecor_stereo_left.png',
'homedecor_stereo_back.png', 'homedecor_stereo_back.png',
'homedecor_stereo_front.png'}, 'homedecor_stereo_front.png'},
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _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", { homedecor.register("projection_screen", {
@ -69,13 +114,25 @@ homedecor.register("projection_screen", {
wield_image = 'homedecor_projection_screen_inv.png', wield_image = 'homedecor_projection_screen_inv.png',
inventory_image = 'homedecor_projection_screen_inv.png', inventory_image = 'homedecor_projection_screen_inv.png',
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
paramtype2 = 'wallmounted', paramtype2 = 'wallmounted',
selection_box = { selection_box = {
type = "wallmounted", type = "wallmounted",
--wall_side = = <default> --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", { homedecor.register("television", {
@ -94,9 +151,27 @@ homedecor.register("television", {
} }
} }
}, },
light_source = default.LIGHT_MAX - 1, light_source = minetest.LIGHT_MAX - 1,
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _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", { homedecor.register("dvd_vcr", {
@ -117,8 +192,28 @@ homedecor.register("dvd_vcr", {
{-0.25, -0.5, -0.25, 0.25, -0.1875, 0.125}, {-0.25, -0.5, -0.25, 0.25, -0.1875, 0.125},
} }
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _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 = { local tel_cbox = {
@ -136,13 +231,24 @@ homedecor.register("telephone", {
}, },
inventory_image = "homedecor_telephone_inv.png", inventory_image = "homedecor_telephone_inv.png",
description = S("Telephone"), description = S("Telephone"),
groups = {snappy=3}, groups = {snappy=3, dig_tree = 2},
selection_box = tel_cbox, selection_box = tel_cbox,
walkable = false, 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", { minetest.register_craftitem(":homedecor:vcr", {
description = S("VCR"), description = S("VCR"),
@ -159,21 +265,7 @@ minetest.register_craftitem(":homedecor:speaker_driver", {
inventory_image = "homedecor_speaker_driver_inv.png" inventory_image = "homedecor_speaker_driver_inv.png"
}) })
minetest.register_craft( { --crafts
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,
})
minetest.register_craft( { minetest.register_craft( {
output = "basic_materials:ic 4", 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( { minetest.register_craft( {
output = "homedecor:speaker_driver 2", output = "homedecor:speaker_driver 2",
recipe = { recipe = {
{ "", "default:steel_ingot", "" }, { "", homedecor.materials["steel_ingot"], "" },
{ "default:paper", "basic_materials:copper_wire", "default:iron_lump" }, { homedecor.materials["paper"], "basic_materials:copper_wire", homedecor.materials["iron_lump"] },
{ "", "default:steel_ingot", "" }, { "", 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({ minetest.register_craft({
output = "homedecor:vcr 2", output = "homedecor:vcr 2",
recipe = { recipe = {
{ "basic_materials:ic", "default:steel_ingot", "basic_materials:plastic_sheet" }, { "basic_materials:ic", homedecor.materials["steel_ingot"], "basic_materials:plastic_sheet" },
{ "default:iron_lump", "default:iron_lump", "default:iron_lump" }, { homedecor.materials["iron_lump"], homedecor.materials["iron_lump"], homedecor.materials["iron_lump"] },
{ "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" }, { "basic_materials:plastic_sheet", "", "basic_materials:plastic_sheet" },
}, },
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:dvd_player 2", type = "fuel",
recipe = { recipe = "homedecor:projection_screen",
{ "", "basic_materials:plastic_sheet", "" }, burntime = 30,
{ "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" }
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_electronics name = homedecor_electronics
description = Homedecor mod: electronics description = Homedecor mod: electronics
depends = homedecor_common, default, basic_materials depends = homedecor_common
optional_depends = moreblocks 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", "homedecor_barbecue_meat.png",
}, },
groups = { snappy=3 }, groups = { snappy=3, dig_tree = 2 },
light_source = 9, light_source = 9,
selection_box = bbq_cbox, selection_box = bbq_cbox,
collision_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 -- no need for placeholder it appears
expand = { top="air" }, 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") minetest.register_alias("homedecor:barbecue_meat", "air")
local wood_tex = homedecor.textures.default_wood
homedecor.register("doghouse", { homedecor.register("doghouse", {
mesh = "homedecor_doghouse.obj", mesh = "homedecor_doghouse.obj",
tiles = { tiles = {
"homedecor_shingles_terracotta.png", "homedecor_shingles_terracotta.png",
"default_wood.png", wood_tex,
"building_blocks_towel.png" "building_blocks_towel.png"
}, },
description = S("Doghouse"), description = S("Doghouse"),
inventory_image = "homedecor_doghouse_inv.png", inventory_image = "homedecor_doghouse_inv.png",
selection_box = homedecor.nodebox.slab_y(1.5), selection_box = homedecor.nodebox.slab_y(1.5),
collision_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" }, 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, 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") minetest.register_alias("homedecor:doghouse_roof", "air")
@ -55,10 +79,10 @@ minetest.register_alias("homedecor:doghouse_base", "homedecor:doghouse")
homedecor.register("stonepath", { homedecor.register("stonepath", {
description = S("Garden stone path"), description = S("Garden stone path"),
tiles = { tiles = {
"default_stone.png" minetest.registered_nodes["mapgen_stone"].tiles[1],
}, },
inventory_image = "homedecor_stonepath_inv.png", inventory_image = "homedecor_stonepath_inv.png",
groups = { snappy=3 }, groups = { snappy=3, dig_stone = 2 },
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -76,7 +100,35 @@ homedecor.register("stonepath", {
type = "fixed", type = "fixed",
fixed = { -0.4375, -0.5, -0.4375, 0.4375, -0.4, 0.4375 } 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 = { local lattice_colors = {
@ -95,7 +147,7 @@ homedecor.register("lattice_"..name, {
tiles = {"homedecor_lattice"..texture}, tiles = {"homedecor_lattice"..texture},
inventory_image = "homedecor_lattice"..texture, inventory_image = "homedecor_lattice"..texture,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy=3 }, groups = { snappy=3, dig_tree = 2 },
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -110,7 +162,9 @@ homedecor.register("lattice_"..name, {
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, 0.44, 0.5, 0.5, 0.5} 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 end
@ -123,8 +177,10 @@ homedecor.register("swing", {
}, },
inventory_image = "homedecor_swing_inv.png", inventory_image = "homedecor_swing_inv.png",
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy=3, oddly_breakable_by_hand=3 }, groups = { snappy=3, oddly_breakable_by_hand=3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
walkable = false, walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
node_box = { 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 }) 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() itemstack:take_item()
end end
else else
@ -190,7 +246,30 @@ homedecor.register("swing", {
return return
end end
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", { homedecor.register("swing_rope", {
@ -209,28 +288,50 @@ homedecor.register("swing_rope", {
selection_box = homedecor.nodebox.null 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", { homedecor.register("well", {
mesh = "homedecor_well.obj", mesh = "homedecor_well.obj",
tiles = { tiles = {
"homedecor_rope_texture.png", "homedecor_rope_texture.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }, { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
"default_water.png", water_tex,
"default_cobble.png", cobble_tex,
"default_wood.png", wood_tex,
"homedecor_shingles_wood.png" "homedecor_shingles_wood.png"
}, },
inventory_image = "homedecor_well_inv.png", inventory_image = "homedecor_well_inv.png",
description = S("Water well"), description = S("Water well"),
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_stone = 1 },
selection_box = homedecor.nodebox.slab_y(2), selection_box = homedecor.nodebox.slab_y(2),
collision_box = homedecor.nodebox.slab_y(2), collision_box = homedecor.nodebox.slab_y(2),
expand = { top="placeholder" }, 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, 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 local original_bucket_on_use = minetest.registered_items["bucket:bucket_empty"].on_use
minetest.override_item("bucket:bucket_empty", { minetest.override_item("bucket:bucket_empty", {
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
@ -269,8 +370,18 @@ for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
paramtype = "light", paramtype = "light",
is_ground_content = false, is_ground_content = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3, flammable=2}, groups = {snappy=3, flammable=2, dig_tree = 3},
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
crafts = {
{
type = "shapeless",
recipe = {
"homedecor:shrubbery_"..color
}
}
}
}) })
minetest.register_node(":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", paramtype = "light",
is_ground_content = false, is_ground_content = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3, flammable=2}, groups = {snappy=3, flammable=2, dig_tree = 3},
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = shrub_cbox, selection_box = shrub_cbox,
collision_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 end
-- crafting -- 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({ minetest.register_craft({
output = "homedecor:lattice_wood 8", output = "homedecor:lattice_wood 8",
recipe = { recipe = {
@ -397,7 +449,7 @@ minetest.register_craft({
output = "homedecor:lattice_white_wood 8", output = "homedecor:lattice_white_wood 8",
recipe = { recipe = {
{"group:stick", "group:wood", "group:stick"}, {"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"}, {"group:stick", "group:wood", "group:stick"},
}, },
}) })
@ -416,7 +468,7 @@ minetest.register_craft({
recipe = { recipe = {
{"group:stick", "group:wood", "group:stick"}, {"group:stick", "group:wood", "group:stick"},
{"group:wood", "group:leaves", "group:wood"}, {"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 -- aliases
minetest.register_alias("homedecor:well_top", "air") minetest.register_alias("homedecor:well_top", "air")

View File

@ -1,4 +1,4 @@
name = homedecor_exterior name = homedecor_exterior
description = Homedecor mod: exterior description = Homedecor mod: exterior
depends = homedecor_common, default, dye, creative, basic_materials depends = homedecor_common
optional_depends = moreblocks, building_blocks, bucket, screwdriver 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 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 = { local materials = {
{ S("brass"), "brass" }, { S("brass"), "brass", brass },
{ S("wrought iron"), "wrought_iron" }, { S("wrought iron"), "wrought_iron", iron },
} }
for _, m in ipairs(materials) do for _, m in ipairs(materials) do
local desc, name = unpack(m) local desc, name, craft = unpack(m)
homedecor.register("fence_"..name, { homedecor.register("fence_"..name, {
description = S("Fence/railing (@1)", desc), description = S("Fence/railing (@1)", desc),
@ -17,8 +33,13 @@ for _, m in ipairs(materials) do
tiles = {"homedecor_generic_metal_"..name..".png"}, tiles = {"homedecor_generic_metal_"..name..".png"},
inventory_image = "homedecor_fence_"..name..".png", inventory_image = "homedecor_fence_"..name..".png",
selection_box = homedecor.nodebox.bar_y(1/7), selection_box = homedecor.nodebox.bar_y(1/7),
groups = {snappy=3}, groups = {snappy=3, dig_stone=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
crafts = {
craft
}
}) })
end end
@ -36,10 +57,29 @@ homedecor.register("fence_picket", {
"homedecor_fence_picket.png" "homedecor_fence_picket.png"
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.1), selection_box = homedecor.nodebox.slab_z(-0.1),
node_box = homedecor.nodebox.slab_z(-0.002), 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", { homedecor.register("fence_picket_corner", {
@ -53,10 +93,21 @@ homedecor.register("fence_picket_corner", {
"homedecor_fence_picket.png", "homedecor_fence_picket.png",
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.1, -0.1), selection_box = homedecor.nodebox.corner_xz(0.1, -0.1),
node_box = homedecor.nodebox.corner_xz(0.002, -0.002), 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", { homedecor.register("fence_picket_white", {
@ -70,10 +121,29 @@ homedecor.register("fence_picket_white", {
"homedecor_fence_picket_white.png" "homedecor_fence_picket_white.png"
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.1), selection_box = homedecor.nodebox.slab_z(-0.1),
node_box = homedecor.nodebox.slab_z(-0.002), 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", { homedecor.register("fence_picket_corner_white", {
@ -87,10 +157,21 @@ homedecor.register("fence_picket_corner_white", {
"homedecor_fence_picket_white.png", "homedecor_fence_picket_white.png",
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.1, -0.1), selection_box = homedecor.nodebox.corner_xz(0.1, -0.1),
node_box = homedecor.nodebox.corner_xz(0.002, -0.002), 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", { homedecor.register("fence_privacy", {
@ -103,8 +184,10 @@ homedecor.register("fence_privacy", {
"homedecor_fence_privacy_backside.png", "homedecor_fence_privacy_backside.png",
"homedecor_fence_privacy_front.png" "homedecor_fence_privacy_front.png"
}, },
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-3/16), selection_box = homedecor.nodebox.slab_z(-3/16),
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -115,6 +198,23 @@ homedecor.register("fence_privacy", {
{ -8/16, -2/16, 7/16, 8/16, 2/16, 8/16 }, -- connecting rung { -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", { homedecor.register("fence_privacy_corner", {
@ -127,8 +227,10 @@ homedecor.register("fence_privacy_corner", {
"homedecor_fence_privacy_backside.png", "homedecor_fence_privacy_backside.png",
"homedecor_fence_privacy_corner_front.png" "homedecor_fence_privacy_corner_front.png"
}, },
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = { selection_box = {
type = "fixed", type = "fixed",
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 { -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", { homedecor.register("fence_barbed_wire", {
@ -157,10 +268,27 @@ homedecor.register("fence_barbed_wire", {
mesh = "homedecor_fence_barbed_wire.obj", mesh = "homedecor_fence_barbed_wire.obj",
tiles = {"homedecor_fence_barbed_wire.png"}, tiles = {"homedecor_fence_barbed_wire.png"},
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.125), selection_box = homedecor.nodebox.slab_z(-0.125),
collision_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", { homedecor.register("fence_barbed_wire_corner", {
@ -168,10 +296,18 @@ homedecor.register("fence_barbed_wire_corner", {
mesh = "homedecor_fence_barbed_wire_corner.obj", mesh = "homedecor_fence_barbed_wire_corner.obj",
tiles = { "homedecor_fence_barbed_wire.png" }, tiles = { "homedecor_fence_barbed_wire.png" },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.125, -0.125), selection_box = homedecor.nodebox.corner_xz(0.125, -0.125),
collision_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", { homedecor.register("fence_chainlink", {
@ -186,10 +322,27 @@ homedecor.register("fence_chainlink", {
"homedecor_fence_chainlink_fb.png", "homedecor_fence_chainlink_fb.png",
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_stone=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.125), selection_box = homedecor.nodebox.slab_z(-0.125),
collision_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", "homedecor_fence_chainlink_corner_front.png",
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_stone=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.125, -0.125), selection_box = homedecor.nodebox.corner_xz(0.125, -0.125),
collision_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", { homedecor.register("fence_wrought_iron_2", {
@ -222,8 +383,10 @@ homedecor.register("fence_wrought_iron_2", {
"homedecor_fence_wrought_iron_2_fb.png" "homedecor_fence_wrought_iron_2_fb.png"
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_stone=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_z(-0.08), selection_box = homedecor.nodebox.slab_z(-0.08),
node_box = { node_box = {
type = "fixed", 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 { -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", { 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" "homedecor_fence_corner_wrought_iron_2_sides.png"
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {snappy=3}, groups = {snappy=3, dig_stone=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.corner_xz(0.08, -0.08), selection_box = homedecor.nodebox.corner_xz(0.08, -0.08),
node_box = { node_box = {
type = "fixed", 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 { -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 -- 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 -- 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") 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" 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["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" signs_lib.old_fenceposts_replacement_signs["homedecor:fence_wrought_iron_with_sign"] = "default:sign_wall_wood_onpole"
end 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 name = homedecor_fences
description = Homedecor mod: fences description = Homedecor mod: fences
depends = homedecor_common, default, basic_materials, dye depends = homedecor_common
optional_depends = signs_lib 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 }, tiles = { homedecor.plain_wood },
inventory_image = "homedecor_coatrack_wallmount_inv.png", inventory_image = "homedecor_coatrack_wallmount_inv.png",
description = S("Wall-mounted coat rack"), description = S("Wall-mounted coat rack"),
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -20,6 +22,13 @@ homedecor.register("coatrack_wallmount", {
{0.0525, 0.025, 0.352697, 0.135, 0.115, 0.375}, -- NodeBox9 {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", { homedecor.register("coat_tree", {
@ -30,8 +39,10 @@ homedecor.register("coat_tree", {
}, },
inventory_image = "homedecor_coatrack_inv.png", inventory_image = "homedecor_coatrack_inv.png",
description = S("Coat tree"), description = S("Coat tree"),
groups = {snappy=3}, groups = {snappy=3, dig_tree=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
expand = { top="placeholder" }, expand = { top="placeholder" },
walkable = false, walkable = false,
selection_box = { selection_box = {
@ -39,16 +50,59 @@ homedecor.register("coat_tree", {
fixed = { -0.4, -0.5, -0.4, 0.4, 1.5, 0.4 } 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, 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 = { local mat_colors = {
{ "green", S("Green welcome mat") }, { "green", S("Green welcome mat"), green },
{ "brown", S("Brown welcome mat") }, { "brown", S("Brown welcome mat"), brown },
{ "grey", S("Grey welcome mat") }, { "grey", S("Grey welcome mat"), grey },
} }
for _, mat in ipairs(mat_colors) do for _, mat in ipairs(mat_colors) do
local color, desc = unpack(mat) local color, desc, crafts = unpack(mat)
homedecor.register("welcome_mat_"..color, { homedecor.register("welcome_mat_"..color, {
description = desc, description = desc,
tiles = { tiles = {
@ -56,65 +110,14 @@ for _, mat in ipairs(mat_colors) do
"homedecor_welcome_mat_bottom.png", "homedecor_welcome_mat_bottom.png",
"homedecor_welcome_mat_"..color..".png", "homedecor_welcome_mat_"..color..".png",
}, },
groups = {crumbly=3}, groups = {crumbly=3, dig_tree=2},
sounds = default.node_sound_dirt_defaults({ _sound_def = {
footstep = {name="default_grass_footstep", gain=0.25}, key = "node_sound_dirt_defaults",
}), },
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.375, 0.5, -0.46875, 0.375 } fixed = { -0.5, -0.5, -0.375, 0.5, -0.46875, 0.375 }
} },
crafts = crafts
}) })
end 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" },
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_foyer name = homedecor_foyer
description = Homedecor mod: foyer description = Homedecor mod: foyer
depends = homedecor_common, default, dye depends = homedecor_common
optional_depends = screwdriver 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 } 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)"), description = S("Bookshelf (open-frame)"),
drawtype = "mesh", drawtype = "mesh",
mesh = "homedecor_openframe_bookshelf.obj", mesh = "homedecor_openframe_bookshelf.obj",
tiles = { tiles = {
"homedecor_openframe_bookshelf_books.png", "homedecor_openframe_bookshelf_books.png",
"default_wood.png" wood_tex
}, },
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3}, 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", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
selection_box = ob_cbox, selection_box = ob_cbox,
collision_box = ob_cbox, collision_box = ob_cbox,
crafts = {
{
recipe = {
{"group:wood", "", "group:wood"},
{"book", "book", "book"},
{"group:wood", "", "group:wood"},
},
}
}
}) })
homedecor.register("wall_shelf", { homedecor.register("wall_shelf", {
description = S("Wall Shelf"), description = S("Wall Shelf"),
tiles = { 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 = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {

View File

@ -1,4 +1,4 @@
name = homedecor_furniture name = homedecor_furniture
description = Homedecor mod: furniture description = Homedecor mod: furniture
depends = homedecor_common, default, unifieddyes, wool depends = homedecor_common
optional_depends = moreblocks, technic, bucket 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", type = "fixed",
fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 }, fixed = { -0.5, -0.5, -0.1, 0.5, 0.5, 0.1 },
}, },
groups = {cracky=3}, groups = {cracky=3, dig_stone=1},
sounds = default.node_sound_stone_defaults(), _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 --L Binding Bars
@ -37,8 +48,19 @@ homedecor.register("L_binding_bars", {
{ -0.05, 0.45, -0.50, 0.05, 0.50, 0.00 }, { -0.05, 0.45, -0.50, 0.05, 0.50, 0.00 },
}, },
}, },
groups = {cracky=3}, groups = {cracky=3, dig_stone=1},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
crafts = {
{
output = "homedecor:L_binding_bars 3",
recipe = {
{ "homedecor:bars","" },
{ "homedecor:bars","homedecor:bars" },
},
}
}
}) })
local chain_cbox = { local chain_cbox = {
@ -53,25 +75,9 @@ homedecor.register("chains", {
inventory_image="forniture_chains_inv.png", inventory_image="forniture_chains_inv.png",
selection_box = chain_cbox, selection_box = chain_cbox,
walkable = false, walkable = false,
groups = {cracky=3}, groups = {cracky=3, dig_stone=1},
sounds = default.node_sound_stone_defaults(), _sound_def = {
}) key = "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" },
}, },
}) })

View File

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

View File

@ -1,4 +1,4 @@
name = homedecor_gastronomy name = homedecor_gastronomy
description = Homedecor mod: gastronomy description = Homedecor mod: gastronomy
depends = homedecor_common, default, basic_materials, dye, creative depends = homedecor_common
optional_depends = bucket, screwdriver 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 = {} 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 = { local mb_cbox = {
type = "fixed", type = "fixed",
fixed = { -5/16, -8/16, -8/16, 5/16, 2/16, 8/16 } fixed = { -5/16, -8/16, -8/16, 5/16, 2/16, 8/16 }
@ -31,7 +22,9 @@ homedecor.register("inbox", {
collision_box = mb_cbox, collision_box = mb_cbox,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {choppy=2,oddly_breakable_by_hand=2}, 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, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
after_place_node = function(pos, placer, itemstack) after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -103,6 +96,15 @@ homedecor.register("inbox", {
allow_metadata_inventory_move = function(pos) allow_metadata_inventory_move = function(pos)
return 0 return 0
end, end,
crafts = {
{
recipe = {
{"","steel_ingot",""},
{"steel_ingot","","steel_ingot"},
{"steel_ingot","steel_ingot","steel_ingot"}
}
}
}
}) })
minetest.register_alias("inbox:empty", "homedecor:inbox") minetest.register_alias("inbox:empty", "homedecor:inbox")

View File

@ -1,3 +1,3 @@
name = homedecor_inbox name = homedecor_inbox
depends = default, homedecor_common depends = homedecor_common
optional_depends = screwdriver 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" }, tiles = { "homedecor_refrigerator_steel.png" },
inventory_image = "homedecor_refrigerator_steel_inv.png", inventory_image = "homedecor_refrigerator_steel_inv.png",
description = S("Refrigerator (stainless steel)"), description = S("Refrigerator (stainless steel)"),
groups = {snappy=3}, groups = {snappy=3, dig_stone=1},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
selection_box = homedecor.nodebox.slab_y(2), selection_box = homedecor.nodebox.slab_y(2),
collision_box = homedecor.nodebox.slab_y(2), collision_box = homedecor.nodebox.slab_y(2),
expand = { top="placeholder" }, expand = { top="placeholder" },
@ -27,10 +29,12 @@ homedecor.register("refrigerator_white", {
tiles = { "homedecor_refrigerator_white.png" }, tiles = { "homedecor_refrigerator_white.png" },
inventory_image = "homedecor_refrigerator_white_inv.png", inventory_image = "homedecor_refrigerator_white_inv.png",
description = S("Refrigerator"), description = S("Refrigerator"),
groups = {snappy=3}, groups = {snappy=3, dig_stone=1},
selection_box = homedecor.nodebox.slab_y(2), selection_box = homedecor.nodebox.slab_y(2),
collision_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" }, expand = { top="placeholder" },
infotext=S("Refrigerator"), infotext=S("Refrigerator"),
inventory = { inventory = {
@ -115,8 +119,10 @@ homedecor.register("dishwasher", {
} }
}, },
selection_box = { type = "regular" }, selection_box = { type = "regular" },
sounds = default.node_sound_stone_defaults(), _sound_def = {
groups = { snappy = 3 }, 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") } local materials = { ["granite"] = S("granite"), ["marble"] = S("marble"), ["steel"] = S("steel"), ["wood"] = S("wood") }
@ -132,18 +138,21 @@ homedecor.register("dishwasher_"..m, {
"homedecor_dishwasher_back.png", "homedecor_dishwasher_back.png",
"homedecor_dishwasher_front.png" "homedecor_dishwasher_front.png"
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree=1 },
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
}) })
end 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 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 = string.gsub(cabinet_sides, "%^", "&")
local ic_cabinet_sides_colored = string.gsub(cabinet_sides_colored, "%^", "&") 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 cabinet_bottom_colored = "homedecor_generic_wood_plain.png^homedecor_kitchen_cabinet_bevel.png"
local function N_(x) return x end local function N_(x) return x end
@ -183,8 +192,10 @@ for _, mat in ipairs(counter_materials) do
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored"..material, airbrush_replacement_node = "homedecor:kitchen_cabinet_colored"..material,
place_param2 = 0, place_param2 = 0,
groups = { snappy = 3, ud_param2_colorable = 1}, groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
infotext=S("Kitchen Cabinet"), infotext=S("Kitchen Cabinet"),
inventory = { inventory = {
size=24, size=24,
@ -212,8 +223,10 @@ for _, mat in ipairs(counter_materials) do
mesh = "homedecor_kitchen_cabinet.obj", mesh = "homedecor_kitchen_cabinet.obj",
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 }, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet"), infotext=S("Kitchen Cabinet"),
inventory = { inventory = {
size=24, size=24,
@ -242,8 +255,10 @@ for _, mat in ipairs(counter_materials) do
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_with_drawers"..material, airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_with_drawers"..material,
groups = { snappy = 3, ud_param2_colorable = 1}, groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet with drawers"), infotext=S("Kitchen Cabinet with drawers"),
inventory = { inventory = {
size=24, size=24,
@ -271,8 +286,10 @@ for _, mat in ipairs(counter_materials) do
mesh = "homedecor_kitchen_cabinet.obj", mesh = "homedecor_kitchen_cabinet.obj",
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 }, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet with drawers"), infotext=S("Kitchen Cabinet with drawers"),
inventory = { inventory = {
size=24, size=24,
@ -283,8 +300,8 @@ for _, mat in ipairs(counter_materials) do
end 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
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.."_locked"
end end
@ -307,8 +324,10 @@ homedecor.register("kitchen_cabinet_colorable_half", {
place_param2 = 0, place_param2 = 0,
selection_box = kitchen_cabinet_half_box, selection_box = kitchen_cabinet_half_box,
node_box = kitchen_cabinet_half_box, node_box = kitchen_cabinet_half_box,
groups = { snappy = 3, ud_param2_colorable = 1 }, groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet"), infotext=S("Kitchen Cabinet"),
inventory = { inventory = {
size=12, size=12,
@ -337,8 +356,10 @@ homedecor.register("kitchen_cabinet_colored_half", {
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
selection_box = kitchen_cabinet_half_box, selection_box = kitchen_cabinet_half_box,
node_box = kitchen_cabinet_half_box, node_box = kitchen_cabinet_half_box,
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 }, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Kitchen Cabinet"), infotext=S("Kitchen Cabinet"),
inventory = { inventory = {
size=12, size=12,
@ -368,8 +389,10 @@ homedecor.register("kitchen_cabinet_colorable_with_sink", {
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_with_sink", airbrush_replacement_node = "homedecor:kitchen_cabinet_colored_with_sink",
place_param2 = 0, place_param2 = 0,
groups = { snappy = 3, ud_param2_colorable = 1 }, groups = { snappy = 3, ud_param2_colorable = 1, dig_tree=1 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Under-sink cabinet"), infotext=S("Under-sink cabinet"),
inventory = { inventory = {
size=16, size=16,
@ -413,8 +436,10 @@ homedecor.register("kitchen_cabinet_colored_with_sink", {
.."{"..ic_cabinet_sides_colored, .."{"..ic_cabinet_sides_colored,
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png", palette = "unifieddyes_palette_colorwallmounted.png",
groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1 }, groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = 1, dig_tree=1 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Under-sink cabinet"), infotext=S("Under-sink cabinet"),
inventory = { inventory = {
size=16, size=16,
@ -448,7 +473,7 @@ homedecor.register("copper_pans", {
mesh = "homedecor_copper_pans.obj", mesh = "homedecor_copper_pans.obj",
tiles = { "homedecor_polished_copper.png" }, tiles = { "homedecor_polished_copper.png" },
inventory_image = "homedecor_copper_pans_inv.png", inventory_image = "homedecor_copper_pans_inv.png",
groups = { snappy=3 }, groups = { snappy=3, dig_stone=1 },
selection_box = cp_cbox, selection_box = cp_cbox,
walkable = false, walkable = false,
on_place = minetest.rotate_node on_place = minetest.rotate_node
@ -464,7 +489,7 @@ homedecor.register("kitchen_faucet", {
tiles = { "homedecor_generic_metal_bright.png" }, tiles = { "homedecor_generic_metal_bright.png" },
inventory_image = "homedecor_kitchen_faucet_inv.png", inventory_image = "homedecor_kitchen_faucet_inv.png",
description = S("Kitchen Faucet"), description = S("Kitchen Faucet"),
groups = {snappy=3}, groups = {snappy=3, dig_stone=1},
selection_box = kf_cbox, selection_box = kf_cbox,
walkable = false, walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
@ -489,11 +514,11 @@ homedecor.register("paper_towel", {
mesh = "homedecor_paper_towel.obj", mesh = "homedecor_paper_towel.obj",
tiles = { tiles = {
"homedecor_generic_quilted_paper.png", "homedecor_generic_quilted_paper.png",
"default_wood.png" wood_tex
}, },
inventory_image = "homedecor_paper_towel_inv.png", inventory_image = "homedecor_paper_towel_inv.png",
description = S("Paper towels"), description = S("Paper towels"),
groups = { snappy=3 }, groups = { snappy=3, dig_tree=1 },
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -507,18 +532,18 @@ homedecor.register("paper_towel", {
minetest.register_craft({ minetest.register_craft({
output = "homedecor:oven_steel", output = "homedecor:oven_steel",
recipe = { recipe = {
{"basic_materials:heating_element", "default:steel_ingot", "basic_materials:heating_element", }, {"basic_materials:heating_element", homedecor.materials.steel_ingot, "basic_materials:heating_element", },
{"default:steel_ingot", "moreblocks:iron_glass", "default:steel_ingot", }, {homedecor.materials.steel_ingot, "moreblocks:iron_glass", homedecor.materials.steel_ingot, },
{"default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot", }, {homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.steel_ingot, },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:oven_steel", output = "homedecor:oven_steel",
recipe = { recipe = {
{"basic_materials:heating_element", "default:steel_ingot", "basic_materials:heating_element", }, {"basic_materials:heating_element", homedecor.materials.steel_ingot, "basic_materials:heating_element", },
{"default:steel_ingot", "default:glass", "default:steel_ingot", }, {homedecor.materials.steel_ingot, homedecor.materials.glass_block, homedecor.materials.steel_ingot, },
{"default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot", }, {homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.steel_ingot, },
} }
}) })
@ -527,35 +552,35 @@ minetest.register_craft({
output = "homedecor:oven", output = "homedecor:oven",
recipe = { recipe = {
"homedecor:oven_steel", "homedecor:oven_steel",
"dye:white", homedecor.materials.dye_white,
"dye:white", homedecor.materials.dye_white,
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:microwave_oven 2", output = "homedecor:microwave_oven 2",
recipe = { recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot", }, {homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, },
{"default:steel_ingot", "moreblocks:iron_glass", "basic_materials:ic", }, {homedecor.materials.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.copper_ingot, "basic_materials:energy_crystal_simple", },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:microwave_oven 2", output = "homedecor:microwave_oven 2",
recipe = { recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot", }, {homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, },
{"default:steel_ingot", "default:glass", "basic_materials:ic", }, {homedecor.materials.steel_ingot, homedecor.materials.glass_block, "basic_materials:ic", },
{"default:steel_ingot", "default:copper_ingot", "basic_materials:energy_crystal_simple", }, {homedecor.materials.steel_ingot, homedecor.materials.copper_ingot, "basic_materials:energy_crystal_simple", },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:refrigerator_steel", output = "homedecor:refrigerator_steel",
recipe = { recipe = {
{"default:steel_ingot", "homedecor:glowlight_small_cube", "default:steel_ingot", }, {homedecor.materials.steel_ingot, "homedecor:glowlight_small_cube", homedecor.materials.steel_ingot, },
{"default:steel_ingot", "default:copperblock", "default:steel_ingot", }, {homedecor.materials.steel_ingot, homedecor.materials.copper_ingot, homedecor.materials.steel_ingot, },
{"default:steel_ingot", "default:clay", "default:steel_ingot", }, {homedecor.materials.steel_ingot, homedecor.materials.clay_lump, homedecor.materials.steel_ingot, },
} }
}) })
@ -564,9 +589,9 @@ minetest.register_craft({
output = "homedecor:refrigerator_white", output = "homedecor:refrigerator_white",
recipe = { recipe = {
"homedecor:refrigerator_steel", "homedecor:refrigerator_steel",
"dye:white", homedecor.materials.dye_white,
"dye:white", homedecor.materials.dye_white,
"dye:white", homedecor.materials.dye_white,
} }
}) })
@ -582,7 +607,7 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "homedecor:kitchen_cabinet_colorable_steel", output = "homedecor:kitchen_cabinet_colorable_steel",
recipe = { 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", ""}, {"", "homedecor:kitchen_cabinet_colorable", ""},
} }
}) })
@ -628,8 +653,8 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "homedecor:kitchen_cabinet_colorable_with_sink", output = "homedecor:kitchen_cabinet_colorable_with_sink",
recipe = { recipe = {
{"group:wood", "default:steel_ingot", "group:wood", }, {"group:wood", homedecor.materials.steel_ingot, "group:wood", },
{"group:wood", "default:steel_ingot", "group:wood", }, {"group:wood", homedecor.materials.steel_ingot, "group:wood", },
{"group:wood", "group:stick", "group:wood", }, {"group:wood", "group:stick", "group:wood", },
} }
}) })
@ -637,18 +662,18 @@ minetest.register_craft({
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:dishwasher", output = "homedecor:dishwasher",
recipe = { recipe = {
{ "basic_materials:ic", "building_blocks:slab_grate_1", "default:steel_ingot", }, { "basic_materials:ic", "building_blocks:slab_grate_1", homedecor.materials.steel_ingot, },
{ "default:steel_ingot", "homedecor:shower_head", "basic_materials:motor" }, { homedecor.materials.steel_ingot, "homedecor:shower_head", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:heating_element", "bucket:bucket_water" } { homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.water_bucket }
}, },
}) })
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:dishwasher", output = "homedecor:dishwasher",
recipe = { recipe = {
{ "basic_materials:ic", "homedecor:fence_chainlink", "default:steel_ingot", }, { "basic_materials:ic", "homedecor:fence_chainlink", homedecor.materials.steel_ingot, },
{ "default:steel_ingot", "homedecor:shower_head", "basic_materials:motor" }, { homedecor.materials.steel_ingot, "homedecor:shower_head", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:heating_element", "bucket:bucket_water" } { homedecor.materials.steel_ingot, "basic_materials:heating_element", homedecor.materials.water_bucket }
}, },
}) })
@ -679,7 +704,7 @@ minetest.register_craft( {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:dishwasher_steel", output = "homedecor:dishwasher_steel",
recipe = { recipe = {
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { homedecor.materials.steel_ingot, homedecor.materials.steel_ingot, homedecor.materials.steel_ingot },
{ "", "homedecor:dishwasher", "" }, { "", "homedecor:dishwasher", "" },
}, },
}) })
@ -719,8 +744,8 @@ minetest.register_craft( {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:kitchen_faucet", output = "homedecor:kitchen_faucet",
recipe = { recipe = {
{ "", "default:steel_ingot" }, { "", homedecor.materials.steel_ingot },
{ "default:steel_ingot", "" }, { homedecor.materials.steel_ingot, "" },
{ "homedecor:taps", "" } { "homedecor:taps", "" }
}, },
}) })
@ -728,8 +753,8 @@ minetest.register_craft( {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:kitchen_faucet", output = "homedecor:kitchen_faucet",
recipe = { recipe = {
{ "default:steel_ingot","" }, { homedecor.materials.steel_ingot,"" },
{ "", "default:steel_ingot" }, { "", homedecor.materials.steel_ingot },
{ "", "homedecor:taps" } { "", "homedecor:taps" }
}, },
}) })
@ -754,8 +779,8 @@ minetest.register_craft({
output = "homedecor:copper_pans", output = "homedecor:copper_pans",
recipe = { recipe = {
{ "basic_materials:copper_strip","","basic_materials:copper_strip" }, { "basic_materials:copper_strip","","basic_materials:copper_strip" },
{ "default:copper_ingot","","default:copper_ingot" }, { homedecor.materials.copper_ingot,"",homedecor.materials.copper_ingot },
{ "default:copper_ingot","","default:copper_ingot" } { homedecor.materials.copper_ingot,"",homedecor.materials.copper_ingot }
}, },
}) })

View File

@ -1,4 +1,4 @@
name = homedecor_kitchen name = homedecor_kitchen
description = Homedecor mod: kitchen description = Homedecor mod: kitchen
depends = homedecor_common, default, basic_materials, dye, unifieddyes depends = homedecor_common
optional_depends = moreblocks, building_blocks, technic, bucket, screwdriver 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" }, 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", { homedecor.register("dryer", {
@ -40,7 +56,23 @@ homedecor.register("dryer", {
} }
}, },
selection_box = { type = "regular" }, 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 = { local ib_cbox = {
@ -48,66 +80,27 @@ local ib_cbox = {
fixed = { -6/16, -8/16, -4/16, 17/16, 4/16, 4/16 } 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", { homedecor.register("ironing_board", {
description = S("Ironing board"), description = S("Ironing board"),
mesh = "homedecor_ironing_board.obj", mesh = "homedecor_ironing_board.obj",
tiles = { tiles = {
"wool_grey.png", wool_tex,
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey }, { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
}, },
expand = {right = "placeholder"}, expand = {right = "placeholder"},
groups = { snappy = 3 }, groups = { snappy = 3, dig_stone=3 },
selection_box = ib_cbox, selection_box = ib_cbox,
collision_box = ib_cbox collision_box = ib_cbox,
}) crafts = {
{
-- crafting recipe = {
{ "wool_grey", "wool_grey", "wool_grey"},
{ "", "steel_ingot", "" },
-- laundry stuff { "steel_ingot", "", "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: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" }
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_laundry name = homedecor_laundry
description = Homedecor mod: laundry description = Homedecor mod: laundry
depends = homedecor_common, default, basic_materials depends = homedecor_common
optional_depends = bucket 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

@ -275,9 +275,11 @@ for brightness_level = 0, 14 do
wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 } wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }
}, },
node_box = glowlight_nodebox.half, 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, 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) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end, end,
@ -341,9 +343,11 @@ for brightness_level = 0, 14 do
wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 } wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 }
}, },
node_box = glowlight_nodebox.quarter, 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, 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) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end, end,
@ -408,9 +412,11 @@ for brightness_level = 0, 14 do
wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 } wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 }
}, },
node_box = glowlight_nodebox.small_cube, 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, 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) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
end, end,
@ -440,19 +446,22 @@ for brightness_level = 0, 14 do
lighttex = "homedecor_plasma_lamp_off.png" lighttex = "homedecor_plasma_lamp_off.png"
end end
local gtex=minetest.get_modpath("default") and "default_gold_block.png" or "[combine:16x16^[noalpha^[colorize:#FFD700"
homedecor.register("plasma_lamp_"..brightness_level, { homedecor.register("plasma_lamp_"..brightness_level, {
description = S("Plasma Lamp/Light"), description = S("Plasma Lamp/Light"),
drawtype = "mesh", drawtype = "mesh",
mesh = "plasma_lamp.obj", mesh = "plasma_lamp.obj",
tiles = { tiles = {
"default_gold_block.png", gtex,
lighttex lighttex
}, },
use_texture_alpha = "blend", use_texture_alpha = "blend",
light_source = brightness_level, light_source = brightness_level,
sunlight_propagates = true, sunlight_propagates = true,
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici}, 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, on_rightclick = homedecor_lighting.toggle_light,
drop = { drop = {
items = { items = {
@ -476,7 +485,7 @@ for brightness_level = 0, 14 do
use_texture_alpha = "blend", use_texture_alpha = "blend",
inventory_image = "homedecor_ground_lantern_inv.png", inventory_image = "homedecor_ground_lantern_inv.png",
wield_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, light_source = brightness_level,
selection_box = gl_cbox, selection_box = gl_cbox,
walkable = false, walkable = false,
@ -503,7 +512,7 @@ for brightness_level = 0, 14 do
use_texture_alpha = "blend", use_texture_alpha = "blend",
inventory_image = "homedecor_hanging_lantern_inv.png", inventory_image = "homedecor_hanging_lantern_inv.png",
wield_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, light_source = brightness_level,
selection_box = hl_cbox, selection_box = hl_cbox,
walkable = false, walkable = false,
@ -530,7 +539,7 @@ for brightness_level = 0, 14 do
use_texture_alpha = "blend", use_texture_alpha = "blend",
inventory_image = "homedecor_ceiling_lantern_inv.png", inventory_image = "homedecor_ceiling_lantern_inv.png",
description = S("Ceiling Lantern/Light"), 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, light_source = brightness_level,
selection_box = cl_cbox, selection_box = cl_cbox,
walkable = false, walkable = false,
@ -550,9 +559,11 @@ for brightness_level = 0, 14 do
description = S("Lattice lantern/Light (large)"), description = S("Lattice lantern/Light (large)"),
tiles = { gen_ls_tex_yellow.."^homedecor_lattice_lantern_large_overlay.png" }, tiles = { gen_ls_tex_yellow.."^homedecor_lattice_lantern_large_overlay.png" },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3, not_in_creative_inventory = nici }, groups = { snappy = 3, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level, light_source = brightness_level,
sounds = default.node_sound_glass_defaults(), _sound_def = {
key = "node_sound_glass_defaults",
},
on_rightclick = homedecor_lighting.toggle_light, on_rightclick = homedecor_lighting.toggle_light,
drop = { drop = {
items = { items = {
@ -592,9 +603,11 @@ for brightness_level = 0, 14 do
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3, not_in_creative_inventory = nici }, groups = { snappy = 3, not_in_creative_inventory = nici, dig_glass=1 },
light_source = brightness_level, light_source = brightness_level,
sounds = default.node_sound_glass_defaults(), _sound_def = {
key = "node_sound_glass_defaults",
},
on_place = minetest.rotate_node, on_place = minetest.rotate_node,
on_rightclick = homedecor_lighting.toggle_light, on_rightclick = homedecor_lighting.toggle_light,
drop = { drop = {
@ -630,7 +643,7 @@ for brightness_level = 0, 14 do
selection_box = dlamp_cbox, selection_box = dlamp_cbox,
node_box = dlamp_cbox, node_box = dlamp_cbox,
walkable = false, 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) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end, end,
@ -661,7 +674,7 @@ for brightness_level = 0, 14 do
}, },
inventory_image = "homedecor_ceiling_lamp_inv.png", inventory_image = "homedecor_ceiling_lamp_inv.png",
light_source = brightness_level, 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, walkable = false,
on_rightclick = homedecor_lighting.toggle_light, on_rightclick = homedecor_lighting.toggle_light,
drop = { drop = {
@ -684,7 +697,8 @@ for brightness_level = 0, 14 do
fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 } 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, { homedecor.register("table_lamp_"..brightness_level, {
description = S("Table Lamp/Light"), description = S("Table Lamp/Light"),
@ -702,7 +716,9 @@ for brightness_level = 0, 14 do
walkable = false, walkable = false,
light_source = brightness_level, light_source = brightness_level,
selection_box = tlamp_cbox, 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 }, groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici },
drop = { drop = {
items = { items = {
@ -733,7 +749,9 @@ for brightness_level = 0, 14 do
light_source = brightness_level, light_source = brightness_level,
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici }, groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici },
selection_box = slamp_cbox, 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, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
--expand = { top="air" }, --expand = { top="air" },
drop = { drop = {
@ -795,10 +813,12 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
}, },
walkable = false, walkable = false,
use_texture_alpha = "blend", use_texture_alpha = "blend",
light_source = onflag and (default.LIGHT_MAX - 5) or nil, light_source = onflag and (minetest.LIGHT_MAX - 5) or nil,
sunlight_propagates = true, sunlight_propagates = true,
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici}, 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, on_rightclick = homedecor_lighting.toggle_light,
drop = { drop = {
items = { items = {
@ -846,7 +866,9 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
"group:mesecon_conductor_craftable" "group:mesecon_conductor_craftable"
}, },
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m}, 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 = { drop = {
items = { items = {
{items = {"homedecor:rope_light_on_floor_"..di} }, {items = {"homedecor:rope_light_on_floor_"..di} },
@ -892,7 +914,9 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
"group:mesecon_conductor_craftable" "group:mesecon_conductor_craftable"
}, },
groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici_m}, 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 = { drop = {
items = { items = {
{items = {"homedecor:rope_light_on_ceiling_"..di}}, {items = {"homedecor:rope_light_on_ceiling_"..di}},
@ -920,8 +944,8 @@ for _, light_brightn_name in ipairs({"off", "on"}) do
}, },
use_texture_alpha = "blend", use_texture_alpha = "blend",
inventory_image = "homedecor_wall_lamp_inv.png", inventory_image = "homedecor_wall_lamp_inv.png",
groups = {snappy=3, not_in_creative_inventory = nici}, groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1},
light_source = onflag and (default.LIGHT_MAX - 3) or nil, light_source = onflag and (minetest.LIGHT_MAX - 3) or nil,
selection_box = wl_cbox, selection_box = wl_cbox,
walkable = false, walkable = false,
drop = { drop = {
@ -957,8 +981,8 @@ homedecor.register("candle", {
selection_box = tc_cbox, selection_box = tc_cbox,
walkable = false, walkable = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-4, light_source = minetest.LIGHT_MAX-4,
}) })
local c_cbox = { local c_cbox = {
@ -979,8 +1003,8 @@ homedecor.register("candle_thin", {
selection_box = c_cbox, selection_box = c_cbox,
walkable = false, walkable = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-4, light_source = minetest.LIGHT_MAX-4,
}) })
local cs_cbox = { local cs_cbox = {
@ -1002,8 +1026,8 @@ homedecor.register("candlestick_wrought_iron", {
selection_box = cs_cbox, selection_box = cs_cbox,
walkable = false, walkable = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-4, light_source = minetest.LIGHT_MAX-4,
}) })
homedecor.register("candlestick_brass", { homedecor.register("candlestick_brass", {
@ -1018,8 +1042,8 @@ homedecor.register("candlestick_brass", {
selection_box = cs_cbox, selection_box = cs_cbox,
walkable = false, walkable = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-4, light_source = minetest.LIGHT_MAX-4,
}) })
homedecor.register("wall_sconce", { homedecor.register("wall_sconce", {
@ -1038,8 +1062,8 @@ homedecor.register("wall_sconce", {
}, },
walkable = false, walkable = false,
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-4, light_source = minetest.LIGHT_MAX-4,
}) })
local ol_cbox = { local ol_cbox = {
@ -1064,9 +1088,11 @@ homedecor.register("oil_lamp", {
inventory_image = "homedecor_oil_lamp_inv.png", inventory_image = "homedecor_oil_lamp_inv.png",
selection_box = ol_cbox, selection_box = ol_cbox,
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-3, light_source = minetest.LIGHT_MAX-3,
sounds = default.node_sound_glass_defaults(), _sound_def = {
key = "node_sound_glass_defaults",
},
}) })
homedecor.register("oil_lamp_tabletop", { homedecor.register("oil_lamp_tabletop", {
@ -1076,9 +1102,11 @@ homedecor.register("oil_lamp_tabletop", {
inventory_image = "homedecor_oil_lamp_tabletop_inv.png", inventory_image = "homedecor_oil_lamp_tabletop_inv.png",
selection_box = ol_cbox, selection_box = ol_cbox,
collision_box = ol_cbox, collision_box = ol_cbox,
groups = { snappy = 3 }, groups = { snappy = 3, dig_glass=1 },
light_source = default.LIGHT_MAX-3, light_source = minetest.LIGHT_MAX-3,
sounds = default.node_sound_glass_defaults(), _sound_def = {
key = "node_sound_glass_defaults",
},
}) })
local topchains_sbox = { local topchains_sbox = {
@ -1099,7 +1127,7 @@ minetest.register_node(":homedecor:chain_steel_top", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
inventory_image = "basic_materials_chain_steel_inv.png", inventory_image = "basic_materials_chain_steel_inv.png",
groups = {cracky=3}, groups = {cracky=3, dig_glass=1},
selection_box = topchains_sbox, selection_box = topchains_sbox,
}) })
@ -1113,7 +1141,7 @@ minetest.register_node(":homedecor:chain_brass_top", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype = "light", paramtype = "light",
inventory_image = "basic_materials_chain_brass_inv.png", inventory_image = "basic_materials_chain_brass_inv.png",
groups = {cracky=3}, groups = {cracky=3, dig_glass=1},
selection_box = topchains_sbox, selection_box = topchains_sbox,
}) })
@ -1140,8 +1168,10 @@ minetest.register_node(":homedecor:chandelier_steel", {
drawtype = "mesh", drawtype = "mesh",
mesh = "homedecor_chandelier.obj", mesh = "homedecor_chandelier.obj",
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {cracky=3}, groups = {cracky=3, dig_glass=1},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
}) })
minetest.register_node(":homedecor:chandelier_brass", { minetest.register_node(":homedecor:chandelier_brass", {
@ -1167,8 +1197,10 @@ minetest.register_node(":homedecor:chandelier_brass", {
drawtype = "mesh", drawtype = "mesh",
mesh = "homedecor_chandelier.obj", mesh = "homedecor_chandelier.obj",
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {cracky=3}, groups = {cracky=3, dig_glass=1},
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
}) })
homedecor.register("torch_wall", { homedecor.register("torch_wall", {
@ -1196,7 +1228,7 @@ homedecor.register("torch_wall", {
fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 }, fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {cracky=3}, groups = {cracky=3, dig_glass=1},
}) })
-- table lamps and standing lamps -- table lamps and standing lamps
@ -1817,46 +1849,19 @@ minetest.register_alias("chains:chandelier_steel", "homedecor:chande
minetest.register_alias("chains:chandelier_brass", "homedecor:chandelier_brass") 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", "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", "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", "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", "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", "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", "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", "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", "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", "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", "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", "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", "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", "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", "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("3dforniture:torch_wall", "homedecor:torch_wall")
minetest.register_alias("torch_wall", "homedecor:torch_wall") minetest.register_alias("torch_wall", "homedecor:torch_wall")

View File

@ -1,4 +1,4 @@
name = homedecor_lighting name = homedecor_lighting
description = Homedecor mod: lighting description = Homedecor mod: lighting
depends = homedecor_common, default, basic_materials, unifieddyes, creative depends = homedecor_common
optional_depends = moreblocks, building_blocks, darkage, mesecons, digilines, screwdriver 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 = {} 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", { homedecor.register("ceiling_paint", {
description = S("Textured Ceiling Paint"), description = S("Textured Ceiling Paint"),
drawtype = 'signlike', drawtype = 'signlike',
@ -19,7 +22,9 @@ homedecor.register("ceiling_paint", {
wield_image = 'homedecor_ceiling_paint_roller.png', wield_image = 'homedecor_ceiling_paint_roller.png',
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type = "wallmounted" }, selection_box = { type = "wallmounted" },
}) })
@ -31,7 +36,9 @@ homedecor.register("ceiling_tile", {
inventory_image = 'homedecor_ceiling_tile.png', inventory_image = 'homedecor_ceiling_tile.png',
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type = "wallmounted" }, selection_box = { type = "wallmounted" },
}) })
@ -46,7 +53,7 @@ for _, rt in ipairs(rug_types) do
local mesh = m local mesh = m
local nodebox = nil 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 if type(m) == "table" then
mesh = nil mesh = nil
@ -56,7 +63,7 @@ for _, rt in ipairs(rug_types) do
} }
tiles = { tiles = {
"homedecor_rug_"..s..".png", "homedecor_rug_"..s..".png",
"wool_grey.png", wool_grey,
"homedecor_rug_"..s..".png" "homedecor_rug_"..s..".png"
} }
end end
@ -69,7 +76,9 @@ for _, rt in ipairs(rug_types) do
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
walkable = false, walkable = false,
groups = {snappy = 3}, groups = {snappy = 3},
sounds = default.node_sound_leaves_defaults(), _sound_def = {
key = "node_sound_leaves_defaults",
},
selection_box = { type = "wallmounted" }, selection_box = { type = "wallmounted" },
}) })
end end
@ -82,54 +91,59 @@ homedecor.register("flower_pot_"..p, {
mesh = "homedecor_flowerpot.obj", mesh = "homedecor_flowerpot.obj",
tiles = { tiles = {
"homedecor_flower_pot_"..p..".png", "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 }, groups = { snappy = 3, potting_soil=1 },
sounds = default.node_sound_stone_defaults(), _sound_def = {
key = "node_sound_stone_defaults",
},
}) })
end 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 = { for _, f in ipairs(flowers_list) do
{ S("Rose"), "rose", "flowers:rose" }, local flowerdesc, flower, craftwith = unpack(f)
{ 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 homedecor.register("potted_"..flower, {
local flowerdesc, flower, craftwith = unpack(f) 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, { minetest.register_craft({
description = S("Potted flower (@1)", flowerdesc), type = "shapeless",
mesh = "homedecor_potted_plant.obj", output = "homedecor:potted_"..flower,
tiles = { recipe = { craftwith, "homedecor:flower_pot_small" }
"homedecor_flower_pot_terracotta.png", })
{ name = "default_dirt.png", color = 0xff303030 },
"flowers_"..flower..".png"
},
walkable = false,
use_texture_alpha = "clip",
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({ minetest.register_alias("flowers:flower_"..flower.."_pot", "homedecor:potted_"..flower)
type = "shapeless", minetest.register_alias("flowers:potted_"..flower, "homedecor:potted_"..flower)
output = "homedecor:potted_"..flower, minetest.register_alias("flowers:flower_pot", "homedecor:flower_pot_small")
recipe = { craftwith, "homedecor:flower_pot_small" } end
})
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", { homedecor.register("pole_brass", {
@ -147,7 +161,9 @@ homedecor.register("pole_brass", {
fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 }, fixed = { -0.125, -0.5, -0.125, 0.125, 0.5, 0.125 },
}, },
groups = {snappy=3}, groups = {snappy=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
check_for_pole = true check_for_pole = true
}) })
@ -165,7 +181,9 @@ homedecor.register("pole_wrought_iron", {
fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625} fixed = {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}
}, },
groups = {snappy=3}, groups = {snappy=3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
local ft_cbox = { local ft_cbox = {
@ -188,7 +206,9 @@ homedecor.register("fishtank", {
selection_box = ft_cbox, selection_box = ft_cbox,
collision_box = ft_cbox, collision_box = ft_cbox,
groups = {cracky=3,oddly_breakable_by_hand=3}, 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) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = node.param2}) minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = node.param2})
return itemstack return itemstack
@ -206,12 +226,14 @@ homedecor.register("fishtank_lighted", {
"homedecor_fishtank_water_top_lighted.png", "homedecor_fishtank_water_top_lighted.png",
"homedecor_fishtank_sides_lighted.png", "homedecor_fishtank_sides_lighted.png",
}, },
light_source = default.LIGHT_MAX-4, light_source = minetest.LIGHT_MAX-4,
use_texture_alpha = "blend", use_texture_alpha = "blend",
selection_box = ft_cbox, selection_box = ft_cbox,
collision_box = ft_cbox, collision_box = ft_cbox,
groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, 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) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:fishtank", param2 = node.param2}) minetest.set_node(pos, {name = "homedecor:fishtank", param2 = node.param2})
return itemstack return itemstack
@ -259,13 +281,15 @@ homedecor.register("dvd_cd_cabinet", {
description = S("DVD/CD cabinet"), description = S("DVD/CD cabinet"),
mesh = "homedecor_dvd_cabinet.obj", mesh = "homedecor_dvd_cabinet.obj",
tiles = { tiles = {
"default_wood.png", wood_tex,
"homedecor_dvdcd_cabinet_front.png", "homedecor_dvdcd_cabinet_front.png",
"homedecor_dvdcd_cabinet_back.png" "homedecor_dvdcd_cabinet_back.png"
}, },
selection_box = homedecor.nodebox.slab_z(-0.5), selection_box = homedecor.nodebox.slab_z(-0.5),
groups = {choppy=2,oddly_breakable_by_hand=2}, groups = {choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
local pooltable_cbox = { local pooltable_cbox = {
@ -288,7 +312,9 @@ homedecor.register("pool_table", {
selection_box = pooltable_cbox, selection_box = pooltable_cbox,
collision_box = pooltable_cbox, collision_box = pooltable_cbox,
expand = { forward="placeholder" }, 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, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
}) })
@ -312,7 +338,9 @@ homedecor.register("piano", {
selection_box = piano_cbox, selection_box = piano_cbox,
collision_box = piano_cbox, collision_box = piano_cbox,
expand = { right="placeholder" }, 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, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
}) })
@ -328,7 +356,7 @@ homedecor.register("trophy", {
description = S("Trophy"), description = S("Trophy"),
mesh = "homedecor_trophy.obj", mesh = "homedecor_trophy.obj",
tiles = { tiles = {
"default_wood.png", wood_tex,
"homedecor_generic_metal_gold.png" "homedecor_generic_metal_gold.png"
}, },
inventory_image = "homedecor_trophy_inv.png", inventory_image = "homedecor_trophy_inv.png",
@ -349,13 +377,15 @@ homedecor.register("sportbench", {
"homedecor_generic_metal_wrought_iron.png", "homedecor_generic_metal_wrought_iron.png",
"homedecor_generic_metal_bright.png", "homedecor_generic_metal_bright.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }, { name = "homedecor_generic_metal.png", color = homedecor.color_black },
"wool_black.png" wool_black
}, },
inventory_image = "homedecor_sport_bench_inv.png", inventory_image = "homedecor_sport_bench_inv.png",
groups = { snappy=3 }, groups = { snappy=3 },
selection_box = sb_cbox, selection_box = sb_cbox,
walkable = false, walkable = false,
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
local skate_cbox = { local skate_cbox = {
@ -373,7 +403,9 @@ homedecor.register("skateboard", {
groups = {snappy=3}, groups = {snappy=3},
selection_box = skate_cbox, selection_box = skate_cbox,
walkable = false, walkable = false,
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
@ -381,8 +413,8 @@ homedecor_misc.banister_materials = {
{ {
"wood", "wood",
S("wood"), S("wood"),
"default_wood.png", wood_tex,
"default_wood.png", wood_tex,
"group:wood", "group:wood",
"group:stick", "group:stick",
"", "",
@ -519,7 +551,9 @@ homedecor.register("spiral_staircase", {
} }
}, },
groups = {cracky = 1}, 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, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing) after_place_node = function(pos, placer, itemstack, pointed_thing)
local fdir = minetest.dir_to_facedir(placer:get_look_dir()) local fdir = minetest.dir_to_facedir(placer:get_look_dir())
@ -609,7 +643,9 @@ homedecor.register("dartboard", {
}, },
groups = {choppy=2,dig_immediate=2,attached_node=1}, groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true, legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
-- crafting -- crafting
@ -621,7 +657,7 @@ homedecor.register("dartboard", {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:flower_pot_terracotta", output = "homedecor:flower_pot_terracotta",
recipe = { 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" }, { "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta", "homedecor:roof_tile_terracotta" },
}, },
}) })
@ -630,7 +666,7 @@ minetest.register_craft( {
output = "homedecor:flower_pot_green", output = "homedecor:flower_pot_green",
recipe = { recipe = {
{ "", "dye:dark_green", "" }, { "", "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" }, { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
}, },
}) })
@ -638,8 +674,8 @@ minetest.register_craft( {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:flower_pot_black", output = "homedecor:flower_pot_black",
recipe = { recipe = {
{ "dye:black", "dye:black", "dye:black" }, { homedecor.materials.dye_black, homedecor.materials.dye_black, homedecor.materials.dye_black },
{ "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" }, { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
}, },
}) })
@ -648,26 +684,26 @@ minetest.register_craft( {
type = "shapeless", type = "shapeless",
output = "homedecor:ceiling_paint 20", output = "homedecor:ceiling_paint 20",
recipe = { recipe = {
"dye:white", homedecor.materials.dye_white,
"dye:white", homedecor.materials.dye_white,
"default:sand", homedecor.materials.sand,
"bucket:bucket_water", homedecor.materials.water_bucket,
}, },
replacements = { { "bucket:bucket_water","bucket:bucket_empty" } } replacements = { { homedecor.materials.water_bucket,homedecor.materials.empty_bucket } }
}) })
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:ceiling_tile 10", output = "homedecor:ceiling_tile 10",
recipe = { recipe = {
{ "", "dye:white", "" }, { "", homedecor.materials.dye_white, "" },
{ "default:steel_ingot", "default:stone", "default:steel_ingot" }, { homedecor.materials.steel_ingot, homedecor.materials.stone, homedecor.materials.steel_ingot },
}, },
}) })
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:drawer_small", output = "homedecor:drawer_small",
recipe = { recipe = {
{ "group:wood", "default:steel_ingot", "group:wood" }, { "group:wood", homedecor.materials.steel_ingot, "group:wood" },
}, },
}) })
@ -691,9 +727,9 @@ minetest.register_craft( {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:pole_wrought_iron 4", output = "homedecor:pole_wrought_iron 4",
recipe = { recipe = {
{ "default:iron_lump", }, { homedecor.materials.iron_lump, },
{ "default:iron_lump", }, { homedecor.materials.iron_lump, },
{ "default:iron_lump", }, { homedecor.materials.iron_lump, },
}, },
}) })
@ -777,35 +813,26 @@ minetest.register_craft({
output = "homedecor:fishtank", output = "homedecor:fishtank",
recipe = { recipe = {
{ "basic_materials:plastic_sheet", "homedecor:glowlight_small_cube", "basic_materials:plastic_sheet" }, { "basic_materials:plastic_sheet", "homedecor:glowlight_small_cube", "basic_materials:plastic_sheet" },
{ "default:glass", "bucket:bucket_water", "default:glass" }, { homedecor.materials.glass_block, homedecor.materials.water_bucket, homedecor.materials.glass_block },
{ "default:glass", "building_blocks:gravel_spread", "default:glass" }, { 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({ minetest.register_craft({
output = "homedecor:cardboard_box 2", output = "homedecor:cardboard_box 2",
recipe = { recipe = {
{ "default:paper", "", "default:paper" }, { homedecor.materials.paper, "", homedecor.materials.paper },
{ "default:paper", "default:paper", "default:paper" }, { homedecor.materials.paper, homedecor.materials.paper, homedecor.materials.paper },
}, },
}) })
minetest.register_craft({ minetest.register_craft({
output = "homedecor:cardboard_box_big 2", output = "homedecor:cardboard_box_big 2",
recipe = { recipe = {
{ "default:paper", "", "default:paper" }, { homedecor.materials.paper, "", homedecor.materials.paper },
{ "default:paper", "", "default:paper" }, { homedecor.materials.paper, "", homedecor.materials.paper },
{ "default:paper", "default:paper", "default:paper" }, { homedecor.materials.paper, homedecor.materials.paper, homedecor.materials.paper },
},
})
minetest.register_craft( {
output = "homedecor:openframe_bookshelf",
recipe = {
{"group:wood", "", "group:wood"},
{"default:book", "default:book", "default:book"},
{"group:wood", "", "group:wood"},
}, },
}) })
@ -814,18 +841,18 @@ minetest.register_craft( {
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:japanese_wall_top", output = "homedecor:japanese_wall_top",
recipe = { recipe = {
{"group:stick", "default:paper"}, {"group:stick", homedecor.materials.paper},
{"default:paper", "group:stick"}, { homedecor.materials.paper, "group:stick"},
{"group:stick", "default:paper"} {"group:stick", homedecor.materials.paper}
}, },
}) })
minetest.register_craft( { minetest.register_craft( {
output = "homedecor:japanese_wall_top", output = "homedecor:japanese_wall_top",
recipe = { recipe = {
{"default:paper", "group:stick"}, {homedecor.materials.paper, "group:stick"},
{"group:stick", "default:paper"}, {"group:stick", homedecor.materials.paper},
{"default:paper", "group:stick"} {homedecor.materials.paper, "group:stick"}
}, },
}) })
@ -996,7 +1023,9 @@ minetest.register_node(":homedecor:japanese_wall_top", {
groups = {snappy=3}, groups = {snappy=3},
selection_box = jp_cbox, selection_box = jp_cbox,
collision_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", { minetest.register_node(":homedecor:japanese_wall_middle", {
@ -1012,7 +1041,9 @@ minetest.register_node(":homedecor:japanese_wall_middle", {
groups = {snappy=3}, groups = {snappy=3},
selection_box = jp_cbox, selection_box = jp_cbox,
collision_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", { minetest.register_node(":homedecor:japanese_wall_bottom", {
@ -1028,5 +1059,7 @@ minetest.register_node(":homedecor:japanese_wall_bottom", {
groups = {snappy=3}, groups = {snappy=3},
selection_box = jp_cbox, selection_box = jp_cbox,
collision_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 name = homedecor_misc
description = Homedecor mod: miscellaneous description = Homedecor mod: miscellaneous
depends = homedecor_common, default, basic_materials, unifieddyes depends = homedecor_common
optional_depends = building_blocks, technic, bucket, signs_lib, screwdriver 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_front.png",
"homedecor_filing_cabinet_bottom.png" "homedecor_filing_cabinet_bottom.png"
}, },
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree=2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
infotext=S("Filing cabinet"), infotext=S("Filing cabinet"),
inventory = { inventory = {
size=16, size=16,
lockable=true, lockable=true,
}, },
crafts = {
{
recipe = {
{ "", "group:wood", "" },
{ "group:wood", "homedecor:drawer_small", "group:wood" },
{ "", "group:wood", "" },
},
}
}
}) })
local desk_cbox = { local desk_cbox = {
@ -32,13 +43,31 @@ homedecor.register("desk", {
inventory_image = "homedecor_desk_inv.png", inventory_image = "homedecor_desk_inv.png",
selection_box = desk_cbox, selection_box = desk_cbox,
collision_box = desk_cbox, collision_box = desk_cbox,
sounds = default.node_sound_wood_defaults(), _sound_def = {
groups = { snappy = 3 }, key = "node_sound_wood_defaults",
},
groups = { snappy = 3, dig_tree=2 },
expand = { right="placeholder" }, expand = { right="placeholder" },
inventory = { inventory = {
size=24, size=24,
lockable=true, 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") minetest.register_alias("homedecor:desk_r", "air")
@ -60,7 +89,25 @@ homedecor.register("desk_globe", {
collision_box = globe_cbox, collision_box = globe_cbox,
groups = {choppy=2, oddly_breakable_by_hand=2}, groups = {choppy=2, oddly_breakable_by_hand=2},
walkable = false, 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", { homedecor.register("calendar", {
@ -78,72 +125,25 @@ homedecor.register("calendar", {
wall_top = { -4/16, 5/16, -8/16, 4/16, 8/16, 5/16 } wall_top = { -4/16, 5/16, -8/16, 4/16, 8/16, 5/16 }
}, },
use_texture_alpha = "clip", use_texture_alpha = "clip",
groups = {choppy=2,attached_node=1}, groups = {choppy=2,attached_node=1, dig_tree=2},
legacy_wallmounted = true, 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 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) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local date = os.date("%Y-%m-%d") local date = os.date("%Y-%m-%d")
meta:set_string("infotext", S("Date (right-click to update):\n@1", date)) meta:set_string("infotext", S("Date (right-click to update):\n@1", date))
return itemstack return itemstack
end end,
}) crafts = {
{
-- crafting recipe = {
{ "","dye_red","" },
{ "","dye_black","" },
minetest.register_craft({ { "","paper","" }
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" }
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_office name = homedecor_office
description = Homedecor mod: office description = Homedecor mod: office
depends = homedecor_common, default, basic_materials, dye depends = homedecor_common
optional_depends = moreblocks, building_blocks 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 S = minetest.get_translator("homedecor_pictures_and_paintings")
local wood_tex = homedecor.textures.default_wood
local pframe_cbox = { local pframe_cbox = {
type = "fixed", type = "fixed",
fixed = { -0.18, -0.5, -0.08, 0.18, -0.08, 0.18 } 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", inventory_image = "homedecor_picture_frame"..i.."_inv.png",
wield_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, selection_box = pframe_cbox,
walkable = false, walkable = false,
sounds = default.node_sound_glass_defaults() _sound_def = {
key = "node_sound_glass_defaults",
},
}) })
end end
@ -36,14 +40,16 @@ for i = 1,20 do
description = S("Decorative painting #@1", i), description = S("Decorative painting #@1", i),
mesh = "homedecor_painting.obj", mesh = "homedecor_painting.obj",
tiles = { tiles = {
"default_wood.png", wood_tex,
"homedecor_blank_canvas.png", "homedecor_blank_canvas.png",
"homedecor_painting"..i..".png" "homedecor_painting"..i..".png"
}, },
selection_box = p_cbox, selection_box = p_cbox,
walkable = false, walkable = false,
groups = {snappy=3}, groups = {snappy=3, dig_tree = 3},
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
end end
@ -60,7 +66,7 @@ minetest.register_craft({
output = "homedecor:blank_canvas", output = "homedecor:blank_canvas",
recipe = { recipe = {
{ "", "group:stick", "" }, { "", "group:stick", "" },
{ "group:stick", "wool:white", "group:stick" }, { "group:stick", homedecor.materials["wool_white"], "group:stick" },
{ "", "group:stick", "" }, { "", "group:stick", "" },
} }
}) })
@ -129,12 +135,12 @@ local painting_patterns = {
for i,recipe in pairs(painting_patterns) do for i,recipe in pairs(painting_patterns) do
local item1 = "dye:"..recipe[1][1] local item1 = homedecor.materials["dye_"..recipe[1][1]]
local item2 = "dye:"..recipe[1][2] local item2 = homedecor.materials["dye_"..recipe[1][2]]
local item3 = "dye:"..recipe[1][3] local item3 = homedecor.materials["dye_"..recipe[1][3]]
local item4 = "dye:"..recipe[2][1] local item4 = homedecor.materials["dye_"..recipe[2][1]]
local item5 = "dye:"..recipe[2][2] local item5 = homedecor.materials["dye_"..recipe[2][2]]
local item6 = "dye:"..recipe[2][3] local item6 = homedecor.materials["dye_"..recipe[2][3]]
minetest.register_craft({ minetest.register_craft({
output = "homedecor:painting_"..i, output = "homedecor:painting_"..i,
@ -147,16 +153,28 @@ for i,recipe in pairs(painting_patterns) do
end end
local picture_dyes = { local picture_dyes = {
{"dye:brown", "dye:green"}, -- the figure sitting by the tree, wielding a pick {"dye_brown", "dye_green"}, -- the figure sitting by the tree, wielding a pick
{"dye:green", "dye:blue"} -- the "family photo" {"dye_green", "dye_blue"} -- the "family photo"
} }
for i in ipairs(picture_dyes) do for i in ipairs(picture_dyes) do
minetest.register_craft({ minetest.register_craft({
output = "homedecor:picture_frame"..i, output = "homedecor:picture_frame"..i,
recipe = { 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" }, { "homedecor:blank_canvas", "group:stick" },
}, },
}) })
end 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 name = homedecor_pictures_and_paintings
description = Homedecor mod: 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}, groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
crafts = {
{
recipe = {
{'', '', ''},
{'', 'steel_ingot', ''},
{'group:stick', 'coal_lump', 'group:stick'},
}
}
}
}) })
local fdir_to_left = { local fdir_to_left = {
@ -121,7 +130,20 @@ homedecor.register("tv", {
end, end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:tv_off", param2 = node.param2}) 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", { homedecor.register("tv_off", {
@ -150,33 +172,7 @@ homedecor.register("tv_off", {
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:tv", param2 = node.param2}) minetest.set_node(pos, {name = "homedecor:tv", param2 = node.param2})
end, end,
drop = "homedecor:tv" 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'},
}
}) })
minetest.register_alias("plasmascreen:screen1", "air") minetest.register_alias("plasmascreen:screen1", "air")

View File

@ -1,3 +1,3 @@
name = homedecor_plasmascreen name = homedecor_plasmascreen
depends = default, homedecor_common, homedecor_electronics depends = homedecor_common
optional_depends = screwdriver 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", { minetest.register_node(":homedecor:skylight", {
description = S("Glass Skylight"), description = S("Glass Skylight"),
drawtype = "raillike", drawtype = "raillike",
tiles = { "default_glass.png" }, tiles = { homedecor.textures.glass },
wield_image = "default_glass.png", wield_image = homedecor.textures.glass,
inventory_image = "homedecor_skylight_inv.png", inventory_image = "homedecor_skylight_inv.png",
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
paramtype = "light", paramtype = "light",
sounds = default.node_sound_glass_defaults(), _sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = homedecor.nodebox.slab_y(0.1), selection_box = homedecor.nodebox.slab_y(0.1),
}) })
@ -21,9 +23,11 @@ minetest.register_node(":homedecor:skylight_frosted", {
wield_image = "homedecor_skylight_frosted.png", wield_image = "homedecor_skylight_frosted.png",
inventory_image = "homedecor_skylight_frosted_inv.png", inventory_image = "homedecor_skylight_frosted_inv.png",
use_texture_alpha = "blend", use_texture_alpha = "blend",
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
paramtype = "light", paramtype = "light",
sounds = default.node_sound_glass_defaults(), _sound_def = {
key = "node_sound_glass_defaults",
},
selection_box = homedecor.nodebox.slab_y(0.1), 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", inventory_image = "homedecor_shingles_"..s.."_inv.png",
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = { snappy = 3 }, groups = { snappy = 3, dig_tree = 2 },
sounds = default.node_sound_wood_defaults(), _sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = homedecor.nodebox.slab_y(0.1), selection_box = homedecor.nodebox.slab_y(0.1),
}) })
end end
@ -93,7 +99,9 @@ homedecor_roofing.register_outer_corner = function(modname, subname, groups, slo
collision_box = ocorner_cbox, collision_box = ocorner_cbox,
groups = groups, groups = groups,
on_place = minetest.rotate_node, on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults() _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
end end
@ -114,7 +122,9 @@ homedecor_roofing.register_inner_corner = function(modname, subname, groups, slo
collision_box = icorner_cbox, collision_box = icorner_cbox,
groups = groups, groups = groups,
on_place = minetest.rotate_node, on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults() _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
end end
@ -137,7 +147,9 @@ homedecor_roofing.register_slope = function(modname, subname, recipeitem, groups
use_texture_alpha = "blend", use_texture_alpha = "blend",
groups = groups, groups = groups,
on_place = minetest.rotate_node, on_place = minetest.rotate_node,
sounds = default.node_sound_wood_defaults() _sound_def = {
key = "node_sound_wood_defaults",
},
}) })
-- convert between flat shingles and slopes -- convert between flat shingles and slopes
@ -260,19 +272,19 @@ end
-- corners -- corners
homedecor_roofing.register_roof("homedecor", "wood", homedecor_roofing.register_roof("homedecor", "wood",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_wood.png" }, { "homedecor_shingles_wood.png" },
S("Wood Shingles") S("Wood Shingles")
) )
homedecor_roofing.register_roof("homedecor", "asphalt", homedecor_roofing.register_roof("homedecor", "asphalt",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_asphalt.png" }, { "homedecor_shingles_asphalt.png" },
S("Asphalt Shingles") S("Asphalt Shingles")
) )
homedecor_roofing.register_roof("homedecor", "terracotta", homedecor_roofing.register_roof("homedecor", "terracotta",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_terracotta.png" }, { "homedecor_shingles_terracotta.png" },
S("Terracotta Shingles") S("Terracotta Shingles")
) )
@ -281,46 +293,58 @@ homedecor_roofing.register_roof("homedecor", "terracotta",
homedecor_roofing.register_slope("homedecor", "wood", homedecor_roofing.register_slope("homedecor", "wood",
"homedecor:shingles_wood", "homedecor:shingles_wood",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_wood.png" }, { "homedecor_shingles_wood.png" },
S("Wood Shingles") S("Wood Shingles")
) )
homedecor_roofing.register_slope("homedecor", "asphalt", homedecor_roofing.register_slope("homedecor", "asphalt",
"homedecor:shingles_asphalt", "homedecor:shingles_asphalt",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_asphalt.png" }, { "homedecor_shingles_asphalt.png" },
S("Asphalt Shingles") S("Asphalt Shingles")
) )
homedecor_roofing.register_slope("homedecor", "terracotta", homedecor_roofing.register_slope("homedecor", "terracotta",
"homedecor:shingles_terracotta", "homedecor:shingles_terracotta",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_terracotta.png" }, { "homedecor_shingles_terracotta.png" },
S("Terracotta Shingles") S("Terracotta Shingles")
) )
homedecor_roofing.register_slope("homedecor", "glass", homedecor_roofing.register_slope("homedecor", "glass",
"homedecor:shingles_glass", "homedecor:shingles_glass",
{ snappy = 3 }, { snappy = 3, dig_tree = 2 },
{ "homedecor_shingles_glass.png", "homedecor_shingles_wood.png" }, { "homedecor_shingles_glass.png", "homedecor_shingles_wood.png" },
S("Glass Shingles") 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", { homedecor.register("chimney", {
description = S("Chimney"), description = S("Chimney"),
mesh = "homedecor_chimney.obj", mesh = "homedecor_chimney.obj",
tiles = { tiles = {
"homedecor_chimney_tb.png", "homedecor_chimney_tb.png",
"default_brick.png" brick_tex
}, },
selection_box = homedecor.nodebox.bar_y(0.25), selection_box = homedecor.nodebox.bar_y(0.25),
groups = {cracky=3}, groups = {cracky=3, dig_tree = 2},
sounds = default.node_sound_stone_defaults() _sound_def = {
key = "node_sound_stone_defaults",
},
}) })
-- crafting -- 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( { minetest.register_craft( {
output = "homedecor:skylight 4", output = "homedecor:skylight 4",

View File

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