Compare commits
24 Commits
2019-05-30
...
2019-06-07
Author | SHA1 | Date | |
---|---|---|---|
13862c1a48 | |||
e289e79aea | |||
80ab12710b | |||
1b94c940d7 | |||
df44dd3dad | |||
bff90189fc | |||
b407f06dc4 | |||
e6dc2c5508 | |||
bde2bf2bf6 | |||
ea160a6519 | |||
631813bb2d | |||
f33636d473 | |||
cbb41f7d98 | |||
c98ec41ba7 | |||
84c3933fd4 | |||
968cdfd549 | |||
c457874d03 | |||
67acbd6d59 | |||
fdb37bdaf5 | |||
ab8bf5586f | |||
2f3c12eb2a | |||
4174737a1a | |||
11771e12cb | |||
b3337921a1 |
@ -1,3 +1,3 @@
|
|||||||
default
|
default
|
||||||
creative
|
creative
|
||||||
|
intllib?
|
||||||
|
@ -40,41 +40,41 @@ local door_list = {
|
|||||||
custom_model = "homedecor_door_fancy"
|
custom_model = "homedecor_door_fancy"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name = "wood_glass_oak",
|
{ name = "french_oak",
|
||||||
description = "Glass and Wood, Oak-colored",
|
description = "French door, Oak-colored",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = {
|
sounds = {
|
||||||
main = default.node_sound_glass_defaults(),
|
main = default.node_sound_glass_defaults(),
|
||||||
},
|
},
|
||||||
backface = true,
|
backface = true,
|
||||||
alpha = true,
|
alpha = true,
|
||||||
custom_model = "homedecor_door_wood_glass"
|
custom_model = "homedecor_door_french"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name = "wood_glass_mahogany",
|
{ name = "french_mahogany",
|
||||||
description = "Glass and Wood, Mahogany-colored",
|
description = "French door, Mahogany-colored",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = {
|
sounds = {
|
||||||
main = default.node_sound_glass_defaults(),
|
main = default.node_sound_glass_defaults(),
|
||||||
},
|
},
|
||||||
backface = true,
|
backface = true,
|
||||||
alpha = true,
|
alpha = true,
|
||||||
custom_model = "homedecor_door_wood_glass"
|
custom_model = "homedecor_door_french"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name = "wood_glass_white",
|
{ name = "french_white",
|
||||||
description = "Glass and Wood, White",
|
description = "French door, White",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = {
|
sounds = {
|
||||||
main = default.node_sound_glass_defaults(),
|
main = default.node_sound_glass_defaults(),
|
||||||
},
|
},
|
||||||
backface = true,
|
backface = true,
|
||||||
alpha = true,
|
alpha = true,
|
||||||
custom_model = "homedecor_door_wood_glass"
|
custom_model = "homedecor_door_french"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name = "bedroom",
|
{ name = "basic_panel",
|
||||||
description = "White Bedroom Door",
|
description = "Basic white panel Door",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = {
|
sounds = {
|
||||||
main = default.node_sound_wood_defaults(),
|
main = default.node_sound_wood_defaults(),
|
||||||
@ -95,8 +95,8 @@ local door_list = {
|
|||||||
custom_model = "homedecor_door_wrought_iron"
|
custom_model = "homedecor_door_wrought_iron"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ name = "woodglass2",
|
{ name = "carolina",
|
||||||
description = "Wooden door with glass insert, type 2",
|
description = "Wooden Carolina door",
|
||||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||||
sounds = {
|
sounds = {
|
||||||
main = default.node_sound_wood_defaults(),
|
main = default.node_sound_wood_defaults(),
|
||||||
@ -166,7 +166,7 @@ end
|
|||||||
local hd_3d = minetest.get_modpath("homedecor_3d_extras")
|
local hd_3d = minetest.get_modpath("homedecor_3d_extras")
|
||||||
|
|
||||||
for _, door in ipairs(door_list) do
|
for _, door in ipairs(door_list) do
|
||||||
doors.register(door.name, {
|
doors.register("homedecor_"..door.name, {
|
||||||
tiles = {{ name = "homedecor_door_"..door.name..".png", backface_culling = door.backface }},
|
tiles = {{ name = "homedecor_door_"..door.name..".png", backface_culling = door.backface }},
|
||||||
description = door.description,
|
description = door.description,
|
||||||
inventory_image = "homedecor_door_"..door.name.."_inv.png",
|
inventory_image = "homedecor_door_"..door.name.."_inv.png",
|
||||||
@ -177,9 +177,8 @@ for _, door in ipairs(door_list) do
|
|||||||
mesecons = mesecons
|
mesecons = mesecons
|
||||||
})
|
})
|
||||||
|
|
||||||
local nn_a = "doors:"..door.name.."_a"
|
local nn_a = "doors:homedecor_"..door.name.."_a"
|
||||||
local nn_b = "doors:"..door.name.."_b"
|
local nn_b = "doors:homedecor_"..door.name.."_b"
|
||||||
|
|
||||||
|
|
||||||
if door.alpha then
|
if door.alpha then
|
||||||
local def = hd_doors_clone_node(nn_a)
|
local def = hd_doors_clone_node(nn_a)
|
||||||
@ -204,6 +203,9 @@ for _, door in ipairs(door_list) do
|
|||||||
|
|
||||||
old_doors[#old_doors + 1] = "homedecor:door_"..door.name.."_left"
|
old_doors[#old_doors + 1] = "homedecor:door_"..door.name.."_left"
|
||||||
old_doors[#old_doors + 1] = "homedecor:door_"..door.name.."_right"
|
old_doors[#old_doors + 1] = "homedecor:door_"..door.name.."_right"
|
||||||
|
|
||||||
|
minetest.register_alias("doors:"..door.name.."_a", "doors:homedecor_"..door.name.."_a")
|
||||||
|
minetest.register_alias("doors:"..door.name.."_b", "doors:homedecor_"..door.name.."_b")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Gates
|
-- Gates
|
||||||
@ -696,19 +698,64 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- aliases
|
-- aliases
|
||||||
|
|
||||||
minetest.register_alias("homedecor:jpn_door_top", "air")
|
minetest.register_alias("homedecor:jpn_door_top", "air")
|
||||||
minetest.register_alias("homedecor:jpn_door_bottom", "homedecor:door_japanese_closed")
|
minetest.register_alias("homedecor:jpn_door_top_open", "air")
|
||||||
|
|
||||||
minetest.register_alias("homedecor:jpn_door_top_open", "air")
|
minetest.register_alias("homedecor:jpn_door_bottom", "homedecor:door_japanese_closed")
|
||||||
minetest.register_alias("homedecor:jpn_door_bottom_open", "homedecor:door_japanese_open")
|
minetest.register_alias("homedecor:jpn_door_bottom_open", "homedecor:door_japanese_open")
|
||||||
|
|
||||||
minetest.register_alias("homedecor:door_glass_right", "doors:door_glass_b")
|
minetest.register_alias("homedecor:door_glass_right", "doors:door_glass_b")
|
||||||
minetest.register_alias("homedecor:door_glass_left", "doors:door_glass_a")
|
minetest.register_alias("homedecor:door_glass_left", "doors:door_glass_a")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:wood_glass_oak_a", "doors:homedecor_french_oak_a")
|
||||||
|
minetest.register_alias("doors:wood_glass_oak_b", "doors:homedecor_french_oak_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:wood_glass_white_a", "doors:homedecor_french_white_a")
|
||||||
|
minetest.register_alias("doors:wood_glass_white_b", "doors:homedecor_french_white_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:wood_glass_mahogany_a", "doors:homedecor_french_mahogany_a")
|
||||||
|
minetest.register_alias("doors:wood_glass_mahogany_b", "doors:homedecor_french_mahogany_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:homedecor_wood_glass_oak_a", "doors:homedecor_french_oak_a")
|
||||||
|
minetest.register_alias("doors:homedecor_wood_glass_oak_b", "doors:homedecor_french_oak_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:homedecor_wood_glass_white_a", "doors:homedecor_french_white_a")
|
||||||
|
minetest.register_alias("doors:homedecor_wood_glass_white_b", "doors:homedecor_french_white_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:homedecor_wood_glass_mahogany_a", "doors:homedecor_french_mahogany_a")
|
||||||
|
minetest.register_alias("doors:homedecor_wood_glass_mahogany_b", "doors:homedecor_french_mahogany_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:homedecor_woodglass2_a", "doors:homedecor_carolina_a")
|
||||||
|
minetest.register_alias("doors:homedecor_woodglass2_b", "doors:homedecor_carolina_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:woodglass2_a", "doors:homedecor_carolina_a")
|
||||||
|
minetest.register_alias("doors:woodglass2_b", "doors:homedecor_carolina_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:homedecor_bedroom_a", "doors:homedecor_basic_panel_a")
|
||||||
|
minetest.register_alias("doors:homedecor_bedroom_b", "doors:homedecor_basic_panel_b")
|
||||||
|
|
||||||
|
minetest.register_alias("doors:bedroom_a", "doors:homedecor_basic_panel_a")
|
||||||
|
minetest.register_alias("doors:bedroom_b", "doors:homedecor_basic_panel_b")
|
||||||
|
|
||||||
-- flip old homedecor doors around, since they use minetest_game doors API now
|
-- flip old homedecor doors around, since they use minetest_game doors API now
|
||||||
|
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_wood_glass_oak_left"
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_wood_glass_oak_right"
|
||||||
|
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_wood_glass_white_left"
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_wood_glass_white_right"
|
||||||
|
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_wood_glass_mahogany_left"
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_wood_glass_mahogany_right"
|
||||||
|
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_woodglass2_left"
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_woodglass2_right"
|
||||||
|
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_bedroom_left"
|
||||||
|
old_doors[#old_doors + 1] = "homedecor:door_bedroom_right"
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
name = ":homedecor:convert_doors",
|
name = ":homedecor:convert_doors_3",
|
||||||
label = "Convert Homedecor doors to mtg doors API",
|
label = "Convert Homedecor doors to mtg doors API",
|
||||||
nodenames = old_doors,
|
nodenames = old_doors,
|
||||||
run_at_every_load = false,
|
run_at_every_load = false,
|
||||||
@ -717,10 +764,12 @@ minetest.register_lbm({
|
|||||||
local newparam2 = (node.param2 + 2) % 4
|
local newparam2 = (node.param2 + 2) % 4
|
||||||
local e = string.find(node.name, "_", -7)
|
local e = string.find(node.name, "_", -7)
|
||||||
local dir = string.sub(node.name, e+1)
|
local dir = string.sub(node.name, e+1)
|
||||||
local newname = "doors:"..string.sub(node.name, 16, e-1)
|
local newname = "doors:homedecor_"..string.sub(node.name, 16, e-1)
|
||||||
if dir == "right" then
|
if dir == "right" then
|
||||||
|
print("Want to replace "..node.name.." with "..newname.."_a")
|
||||||
minetest.set_node(pos, {name = newname.."_a", param2 = newparam2 })
|
minetest.set_node(pos, {name = newname.."_a", param2 = newparam2 })
|
||||||
else
|
else
|
||||||
|
print("Want to replace "..node.name.." with "..newname.."_b")
|
||||||
minetest.set_node(pos, {name = newname.."_b", param2 = newparam2 })
|
minetest.set_node(pos, {name = newname.."_b", param2 = newparam2 })
|
||||||
end
|
end
|
||||||
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "doors:hidden"})
|
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "doors:hidden"})
|
||||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -2,9 +2,10 @@
|
|||||||
local S = homedecor.gettext
|
local S = homedecor.gettext
|
||||||
|
|
||||||
function homedecor.toggle_switch(pos, node, clicker, itemstack, pointed_thing)
|
function homedecor.toggle_switch(pos, node, clicker, itemstack, pointed_thing)
|
||||||
if minetest.is_protected(pos, clicker:get_player_name()) then
|
if not clicker then return false end
|
||||||
minetest.record_protection_violation(pos,
|
local playername = clicker:get_player_name()
|
||||||
sender:get_player_name())
|
if minetest.is_protected(pos, playername) then
|
||||||
|
minetest.record_protection_violation(pos, playername)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local sep = string.find(node.name, "_o", -5)
|
local sep = string.find(node.name, "_o", -5)
|
||||||
|
@ -58,61 +58,10 @@ homedecor.register("chains", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("torch_wall", {
|
|
||||||
description = S("Wall Torch"),
|
|
||||||
mesh = "forniture_torch.obj",
|
|
||||||
tiles = {
|
|
||||||
{
|
|
||||||
name="forniture_torch_flame.png",
|
|
||||||
animation={
|
|
||||||
type="vertical_frames",
|
|
||||||
aspect_w=40,
|
|
||||||
aspect_h=40,
|
|
||||||
length=1.0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_black },
|
|
||||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
|
||||||
"forniture_coal.png",
|
|
||||||
},
|
|
||||||
inventory_image="forniture_torch_inv.png",
|
|
||||||
walkable = false,
|
|
||||||
light_source = 14,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
|
|
||||||
},
|
|
||||||
groups = {cracky=3},
|
|
||||||
})
|
|
||||||
|
|
||||||
local wl_cbox = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.2, -0.5, 0, 0.2, 0.5, 0.5 },
|
|
||||||
}
|
|
||||||
|
|
||||||
homedecor.register("wall_lamp", {
|
|
||||||
description = S("Wall Lamp"),
|
|
||||||
mesh = "homedecor_wall_lamp.obj",
|
|
||||||
tiles = {
|
|
||||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
|
||||||
homedecor.lux_wood,
|
|
||||||
"homedecor_light.png",
|
|
||||||
"homedecor_generic_metal_wrought_iron.png"
|
|
||||||
},
|
|
||||||
use_texture_alpha = true,
|
|
||||||
inventory_image = "homedecor_wall_lamp_inv.png",
|
|
||||||
groups = {snappy=3},
|
|
||||||
light_source = 11,
|
|
||||||
selection_box = wl_cbox,
|
|
||||||
walkable = false
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_alias("3dforniture:bars", "homedecor:bars")
|
minetest.register_alias("3dforniture:bars", "homedecor:bars")
|
||||||
minetest.register_alias("3dforniture:L_binding_bars", "homedecor:L_binding_bars")
|
minetest.register_alias("3dforniture:L_binding_bars", "homedecor:L_binding_bars")
|
||||||
minetest.register_alias("3dforniture:chains", "homedecor:chains")
|
minetest.register_alias("3dforniture:chains", "homedecor:chains")
|
||||||
minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
|
|
||||||
|
|
||||||
minetest.register_alias('bars', 'homedecor:bars')
|
minetest.register_alias('bars', 'homedecor:bars')
|
||||||
minetest.register_alias('binding_bars', 'homedecor:L_binding_bars')
|
minetest.register_alias('binding_bars', 'homedecor:L_binding_bars')
|
||||||
minetest.register_alias('chains', 'homedecor:chains')
|
minetest.register_alias('chains', 'homedecor:chains')
|
||||||
minetest.register_alias('torch_wall', 'homedecor:torch_wall')
|
|
||||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 594 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |