mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-01-12 01:20:18 +01:00
add hd bedroom
This commit is contained in:
parent
c843fca9f1
commit
8e4df1637f
@ -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 = {
|
|
||||||
}
|
|
||||||
|
|
@ -2,6 +2,10 @@ 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 = "default_wood.png", "wool_white.png"
|
||||||
|
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
||||||
|
if not minetest.get_modpath("wool") then wool_tex = "[combine:16x16^[noalpha^[colorize:#ffffff" end
|
||||||
|
|
||||||
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 +35,29 @@ local kbed_cbox = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
local bed_on_rightclick = minetest.registered_nodes["beds:bed"].on_rightclick
|
local bed_on_rightclick =
|
||||||
|
minetest.registered_nodes["beds:bed"] and minetest.registered_nodes["beds:bed"].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,11 +73,10 @@ 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
|
||||||
|
return itemstack
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -78,18 +84,20 @@ 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 +105,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)
|
||||||
|
if bed_on_rightclick then
|
||||||
bed_on_rightclick(pos, node, clicker)
|
bed_on_rightclick(pos, node, clicker)
|
||||||
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
drop = "homedecor:bed_regular"
|
drop = "homedecor:bed_regular"
|
||||||
@ -107,20 +117,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,7 +146,9 @@ 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)
|
||||||
|
if bed_on_rightclick then
|
||||||
bed_on_rightclick(pos, node, clicker)
|
bed_on_rightclick(pos, node, clicker)
|
||||||
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -159,8 +173,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 +201,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 = {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user