1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-06-28 04:50:21 +02: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
124 changed files with 2584 additions and 2597 deletions

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

@ -59,7 +59,9 @@ minetest.register_node(":lrfurn:coffeetable", {
paramtype2 = "facedir",
use_texture_alpha = "blend",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = {
type = "fixed",
fixed = {
@ -108,7 +110,7 @@ minetest.register_craft({
output = "lrfurn:coffeetable",
recipe = {
{"", "", "", },
{"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood", },
{homedecor.materials.slab_wood, homedecor.materials.slab_wood, homedecor.materials.slab_wood, },
{"group:stick", "", "group:stick", }
}
})

View File

@ -17,7 +17,9 @@ minetest.register_node(":lrfurn:endtable", {
paramtype2 = "facedir",
use_texture_alpha = "blend",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
node_box = {
type = "fixed",
fixed = {
@ -43,7 +45,7 @@ minetest.register_craft({
output = "lrfurn:endtable",
recipe = {
{"", "", "", },
{"stairs:slab_wood", "stairs:slab_wood", "", },
{homedecor.materials.slab_wood, homedecor.materials.slab_wood, "", },
{"group:stick", "group:stick", "", }
}
})

View File

@ -19,7 +19,7 @@ local tabletop_materials = {
}
}
leg_materials = {
local leg_materials = {
{ "brass", S("brass") },
{ "wrought_iron", S("wrought iron") },
{ "wood", S("wood") }
@ -35,8 +35,10 @@ for _, t in ipairs(leg_materials) do
wield_image = "homedecor_table_legs_"..name..".png",
walkable = false,
use_texture_alpha = "blend",
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = {
type = "fixed",
fixed = { -0.37, -0.5, -0.37, 0.37, 0.5, 0.37 }
@ -55,13 +57,13 @@ local tables_cbox = {
}
for i, mat in ipairs(tabletop_materials) do
local m, small_s, small_r, large = unpack(mat)
local m = unpack(mat)
local s
if m == "glass" then
s = default.node_sound_glass_defaults()
s = "node_sound_glass_defaults"
else
s = default.node_sound_wood_defaults()
s = "node_sound_wood_defaults"
end
for _, shape in ipairs(table_shapes) do
@ -78,8 +80,10 @@ for i, mat in ipairs(tabletop_materials) do
},
wield_image = 'homedecor_'..m..'_table_'..shape..'_inv.png',
use_texture_alpha = "blend",
groups = { snappy = 3 },
sounds = s,
groups = { snappy = 3, dig_tree=2 },
_sound_def = {
key = s,
},
selection_box = tables_cbox,
collision_box = tables_cbox,
on_place = function(itemstack, placer, pointed_thing)
@ -101,7 +105,7 @@ for i, mat in ipairs(tabletop_materials) do
})
for _, l in ipairs(leg_materials) do
local leg_mat, desc = unpack(l)
local leg_mat = unpack(l)
homedecor.register(string.format("%s_table_%s_with_%s_legs", m, shape, leg_mat), {
description = string.format("%s %s table with %s legs", shape, m, leg_mat),
@ -114,8 +118,10 @@ for i, mat in ipairs(tabletop_materials) do
"homedecor_table_legs_"..leg_mat..".png",
},
use_texture_alpha = "blend",
groups = { snappy = 3 },
sounds = s,
groups = { snappy = 3, dig_tree=2 },
_sound_def = {
key = s
},
})
end
end
@ -156,7 +162,9 @@ for _, t in ipairs(table_colors) do
},
},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
_sound_def = {
key = "node_sound_wood_defaults",
},
})
end
@ -165,9 +173,9 @@ end
minetest.register_craft( {
output = "homedecor:glass_table_small_round_b 15",
recipe = {
{ "", "default:glass", "" },
{ "default:glass", "default:glass", "default:glass" },
{ "", "default:glass", "" },
{ "", homedecor.materials.glass_block, "" },
{ homedecor.materials.glass_block, homedecor.materials.glass_block, homedecor.materials.glass_block },
{ "", homedecor.materials.glass_block, "" },
},
})
@ -232,9 +240,9 @@ minetest.register_craft({
minetest.register_craft( {
output = "homedecor:table_legs_wrought_iron 3",
recipe = {
{ "", "default:iron_lump", "" },
{ "", "default:iron_lump", "" },
{ "default:iron_lump", "default:iron_lump", "default:iron_lump" },
{ "", homedecor.materials.iron_lump, "" },
{ "", homedecor.materials.iron_lump, "" },
{ homedecor.materials.iron_lump, homedecor.materials.iron_lump, homedecor.materials.iron_lump },
},
})
@ -290,7 +298,7 @@ minetest.register_craft({
output = "homedecor:table_mahogany",
recipe = {
"homedecor:table",
"dye:brown",
homedecor.materials.dye_brown,
},
})
@ -308,7 +316,7 @@ minetest.register_craft({
output = "homedecor:table_white",
recipe = {
"homedecor:table",
"dye:white",
homedecor.materials.dye_white,
},
})

View File

@ -1,4 +1,4 @@
name = homedecor_tables
description = Homedecor mod: tables
depends = homedecor_common, default, basic_materials
optional_depends = creative
depends = homedecor_common
optional_depends = creative, default, basic_materials