1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-27 17:30:17 +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

@ -18,8 +18,10 @@ minetest.register_node(":lrfurn:sofa", {
palette = "unifieddyes_palette_colorwallmounted.png",
inventory_image = "lrfurn_sofa_inv.png",
wield_scale = { x = 0.6, y = 0.6, z = 0.6 },
groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(),
groups = {snappy=3, ud_param2_colorable = 1, dig_tree=2},
_sound_def = {
key = "node_sound_wood_defaults",
},
selection_box = sofa_cbox,
node_box = sofa_cbox,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
@ -31,7 +33,7 @@ minetest.register_node(":lrfurn:sofa", {
local fdir = minetest.dir_to_facedir(placer:get_look_dir(), false)
if lrfurn.check_right(pos, fdir, false, placer) then
if not creative.is_enabled_for(playername) then
if not minetest.is_creative_enabled(playername) then
itemstack:take_item()
end
else
@ -42,20 +44,15 @@ minetest.register_node(":lrfurn:sofa", {
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not clicker:is_player() then
return itemstack
end
pos.y = pos.y-0.5
clicker:setpos(pos)
return itemstack
return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 2)
end
})
minetest.register_craft({
output = "lrfurn:sofa",
recipe = {
{"wool:white", "wool:white", "", },
{"stairs:slab_wood", "stairs:slab_wood", "", },
{homedecor.materials.wool_white, homedecor.materials.wool_white, "", },
{homedecor.materials.slab_wood, homedecor.materials.slab_wood, "", },
{"group:stick", "group:stick", "", }
}
})
@ -63,7 +60,7 @@ minetest.register_craft({
minetest.register_craft({
output = "lrfurn:sofa",
recipe = {
{"wool:white", "wool:white", "", },
{homedecor.materials.wool_white, homedecor.materials.wool_white, "", },
{"moreblocks:slab_wood", "moreblocks:slab_wood", "", },
{"group:stick", "group:stick", "", }
}