1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-11-16 07:10:35 +01:00

add hd electronics + hd exterior group fixes

This commit is contained in:
unknown 2022-04-10 23:29:59 -04:00
parent 10c80e0fd2
commit 828cd4d62a
5 changed files with 147 additions and 156 deletions

View File

@ -27,8 +27,10 @@ homedecor.materials = {
wool_green = "wool:green", wool_green = "wool:green",
wool_dark_green = "wool:dark_green", wool_dark_green = "wool:dark_green",
wool_brown = "wool:brown", wool_brown = "wool:brown",
wool_black = "wool:black",
slab_stone = "stairs:slab_stone", slab_stone = "stairs:slab_stone",
slab_wood = "stairs:slab_wood", slab_wood = "stairs:slab_wood",
glass_block = "default_glass",
} }
if minetest.get_modpath("moreores") then if minetest.get_modpath("moreores") then
@ -83,6 +85,7 @@ elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then
iron_lump = "fl_ores:iron_ore", iron_lump = "fl_ores:iron_ore",
slab_stone = "fl_stone:stone_slab", slab_stone = "fl_stone:stone_slab",
slab_wood = "fl_trees:apple_plank_slab", slab_wood = "fl_trees:apple_plank_slab",
glass_block = "fl_glass:framed_glass"
} }
elseif minetest.get_modpath("hades_core") then elseif minetest.get_modpath("hades_core") then
homedecor.materials = { homedecor.materials = {

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

@ -21,7 +21,7 @@ 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,
@ -57,7 +57,7 @@ homedecor.register("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" },
_sound_def = { _sound_def = {
key = "node_sound_wood_defaults", key = "node_sound_wood_defaults",
@ -83,7 +83,7 @@ homedecor.register("stonepath", {
minetest.registered_nodes["mapgen_stone"].tiles[1], 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 = {
@ -148,7 +148,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 = {
@ -178,7 +178,7 @@ 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 },
_sound_def = { _sound_def = {
key = "node_sound_wood_defaults", key = "node_sound_wood_defaults",
}, },
@ -312,7 +312,7 @@ homedecor.register("well", {
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" },
@ -370,7 +370,7 @@ 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},
_sound_def = { _sound_def = {
key = "node_sound_leaves_defaults", key = "node_sound_leaves_defaults",
}, },
@ -396,7 +396,7 @@ 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},
_sound_def = { _sound_def = {
key = "node_sound_leaves_defaults", key = "node_sound_leaves_defaults",
}, },