mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-13 11:30:19 +02:00
Compare commits
22 Commits
2018-09-13
...
0.4.16
Author | SHA1 | Date | |
---|---|---|---|
75eb750e0a | |||
e08e262377 | |||
b22a11f617 | |||
9427967784 | |||
8658cc27fc | |||
752cb473a0 | |||
9e0d558d54 | |||
3ea86f5c3f | |||
d05d03d5d9 | |||
55e2b03a50 | |||
78fcbd04db | |||
b50b7423b8 | |||
c741642057 | |||
5c52111bec | |||
503c05a09e | |||
ab94f9dc6a | |||
4d6f0c07c2 | |||
5fb16c4e33 | |||
b37e6ade7a | |||
c79f14bd89 | |||
e2a04b52b9 | |||
5dde3896f3 |
@ -4,9 +4,7 @@ allow_defined_top = true
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"unpack",
|
||||
"dump",
|
||||
table = { fields = { "copy", "getn" } },
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
@ -19,7 +17,6 @@ read_globals = {
|
||||
"mesecon",
|
||||
"unifieddyes",
|
||||
"creative",
|
||||
"homedecor_i18n",
|
||||
}
|
||||
|
||||
globals = {
|
||||
|
@ -1,57 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
minetest.register_alias("building_blocks:stair_tar", "stairs:stair_Tar")
|
||||
minetest.register_alias("building_blocks:slab_marble", "stairs:slab_Marble")
|
||||
minetest.register_alias("building_blocks:stair_marble", "stairs:stair_Marble")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar")
|
||||
end
|
||||
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
@ -1,4 +1,3 @@
|
||||
default
|
||||
homedecor_i18n
|
||||
moreblocks?
|
||||
stairs?
|
||||
|
@ -1,7 +1,633 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local modpath = minetest.get_modpath("building_blocks")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_node("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = S("Adobe"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Roof block"),
|
||||
groups = {snappy=3},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:terrycloth_towel 2',
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Tarmac_spread 4',
|
||||
recipe = {
|
||||
{"group:tar_block", "group:tar_block"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:gravel_spread 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:gravel", "default:gravel"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:brobble_spread 4',
|
||||
recipe = {
|
||||
{"default:brick", "default:cobble", "default:brick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Fireplace 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Adobe 3',
|
||||
recipe = {
|
||||
{"default:sand"},
|
||||
{"default:clay"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Roofing 10',
|
||||
recipe = {
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:BWtile 10',
|
||||
recipe = {
|
||||
{"group:marble", "group:tar_block"},
|
||||
{"group:tar_block", "group:marble"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:grate 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:glass", "default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:woodglass 1',
|
||||
recipe = {
|
||||
{"default:wood"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:wood", "default:junglewood"},
|
||||
{"default:junglewood", "default:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:junglewood", "default:wood"},
|
||||
{"default:wood", "default:junglewood"},
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks 2',
|
||||
recipe = {
|
||||
{'group:stick', '' , 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'building_blocks:sticks'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:fakegrass 2',
|
||||
recipe = {
|
||||
{'default:leaves'},
|
||||
{"default:dirt"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:smoothglass",
|
||||
recipe = "default:glass"
|
||||
})
|
||||
minetest.register_node("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Streak Free Glass"),
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_sglass.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_grate.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = S("Fireplace"),
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron_fireplace.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Wood Framed Glass"),
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_wglass.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = S("Terrycloth towel"),
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Tarmac Spread"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "raillike",
|
||||
description = S("Chess board tiling"),
|
||||
tiles = {"building_blocks_BWtile.png"},
|
||||
inventory_image = "building_blocks_bwtile_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
-- Translators: "Brobble" is a portmanteau of "Brick" and "Cobble".
|
||||
-- Translate however you see fit.
|
||||
description = S("Brobble Spread"),
|
||||
tiles = {"building_blocks_brobble.png"},
|
||||
inventory_image = "building_blocks_brobble_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Gravel Spread"),
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_gravel_footstep", gain=0.5},
|
||||
dug = {name="default_gravel_footstep", gain=1.0},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Hardwood"),
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"marble",
|
||||
"building_blocks:Marble",
|
||||
{
|
||||
description = "Marble",
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"hardwood",
|
||||
"building_blocks:hardwood",
|
||||
{
|
||||
description = "Hardwood",
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"fakegrass",
|
||||
"building_blocks:fakegrass",
|
||||
{
|
||||
description = "Grass",
|
||||
tiles = {"default_grass.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"tar",
|
||||
"building_blocks:Tar",
|
||||
{
|
||||
description = "Tar",
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
groups = {crumbly=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"grate",
|
||||
"building_blocks:grate",
|
||||
{
|
||||
description = "Grate",
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"Adobe",
|
||||
"building_blocks:Adobe",
|
||||
{
|
||||
description = "Adobe",
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"Roofing",
|
||||
"building_blocks:Roofing",
|
||||
{
|
||||
description = "Roofing",
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
else
|
||||
bb_stairs = {}
|
||||
|
||||
-- Node will be called stairs:stair_<subname>
|
||||
function bb_stairs.register_stair(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("building_blocks:stair_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
-- Flipped recipe for the silly minecrafters
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{"", "", recipeitem},
|
||||
{"", recipeitem, recipeitem},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Node will be called stairs:slab_<subname>
|
||||
function bb_stairs.register_slab(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("building_blocks:slab_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:slab_' .. subname .. ' 3',
|
||||
recipe = {
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Nodes will be called stairs:{stair,slab}_<subname>
|
||||
function bb_stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
||||
bb_stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
||||
bb_stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
||||
end
|
||||
bb_stairs.register_stair_and_slab("marble","building_blocks:Marble",
|
||||
{cracky=3},
|
||||
{"building_blocks_marble.png"},
|
||||
S("Marble stair"),
|
||||
S("Marble slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("hardwood","building_blocks:hardwood",
|
||||
{choppy=1,flammable=1},
|
||||
{"building_blocks_hardwood.png"},
|
||||
S("Hardwood stair"),
|
||||
S("Hardwood slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("fakegrass","building_blocks:fakegrass",
|
||||
{crumbly=3},
|
||||
{"default_grass.png"},
|
||||
S("Grass stair"),
|
||||
S("Grass slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("tar","building_blocks:Tar",
|
||||
{crumbly=1},
|
||||
{"building_blocks_tar.png"},
|
||||
S("Tar stair"),
|
||||
S("Tar slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("grate","building_blocks:grate",
|
||||
{cracky=1},
|
||||
{"building_blocks_grate.png"},
|
||||
S("Grate Stair"),
|
||||
S("Grate Slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Adobe", "building_blocks:Adobe",
|
||||
{crumbly=3},
|
||||
{"building_blocks_Adobe.png"},
|
||||
S("Adobe stair"),
|
||||
S("Adobe slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Roofing", "building_blocks:Roofing",
|
||||
{snappy=3},
|
||||
{"building_blocks_Roofing.png"},
|
||||
S("Roofing stair"),
|
||||
S("Roofing slab")
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:hardwood",
|
||||
burntime = 28,
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = S("Fake Grass"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
image = "building_blocks_sticks.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:tar_base", {
|
||||
description = S("Tar base"),
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
--Tar
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:knife 1',
|
||||
recipe = {
|
||||
{"group:tar_block"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
|
||||
minetest.register_node("building_blocks:Tar", {
|
||||
description = S("Tar"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, tar_block = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Marble", {
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:sticks",
|
||||
burntime = 5,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:Tar",
|
||||
burntime = 40,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:Tar",
|
||||
recipe = "building_blocks:tar_base",
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = S("Tar Knife"),
|
||||
inventory_image = "building_blocks_knife.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses=100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "building_blocks:Marble 9",
|
||||
recipe = {
|
||||
{"default:clay", "group:tar_block", "default:clay"},
|
||||
{"group:tar_block","default:clay", "group:tar_block"},
|
||||
{"default:clay", "group:tar_block","default:clay"},
|
||||
}
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -1,226 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local stairs_groups_names = {"cracky","choppy","flammable","crumbly","snappy"}
|
||||
|
||||
local function building_blocks_stairs(nodename, def)
|
||||
minetest.register_node(nodename, def)
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
local mod, name = nodename:match("(.*):(.*)")
|
||||
minetest.register_alias(mod .. ":slab_" .. name, "stairs:slab_" .. name)
|
||||
minetest.register_alias(mod .. ":stair_" .. name, "stairs:stair_" .. name)
|
||||
local stairs_groups = {}
|
||||
for _, groupname in ipairs(stairs_groups_names) do
|
||||
stairs_groups[groupname] = def.groups[groupname]
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all(
|
||||
mod,
|
||||
name,
|
||||
nodename,
|
||||
{
|
||||
description = def.description,
|
||||
tiles = def.tiles,
|
||||
groups = stairs_groups,
|
||||
sounds = def.sounds,
|
||||
}
|
||||
)
|
||||
else
|
||||
stairs.register_stair_and_slab(name,nodename,
|
||||
stairs_groups,
|
||||
def.tiles,
|
||||
("%s Stair"):format(def.description),
|
||||
("%s Slab"):format(def.description),
|
||||
def.sounds
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
building_blocks_stairs("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Streak Free Glass"),
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Wood Framed Glass"),
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
building_blocks_stairs("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = S("Adobe"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = S("Fake Grass"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Hardwood"),
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Roof block"),
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Tar", {
|
||||
description = S("Tar"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, tar_block = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Marble", {
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
-- Translators: "Brobble" is a portmanteau of "Brick" and "Cobble".
|
||||
-- Translate however you see fit.
|
||||
description = S("Brobble Spread"),
|
||||
tiles = {"building_blocks_brobble.png"},
|
||||
inventory_image = "building_blocks_brobble_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Gravel Spread"),
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_gravel_footstep", gain=0.5},
|
||||
dug = {name="default_gravel_footstep", gain=1.0},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Tarmac Spread"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = S("Terrycloth towel"),
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Chess board tiling"),
|
||||
tiles = {
|
||||
"building_blocks_BWtile.png",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png",
|
||||
"building_blocks_BWtile.png"
|
||||
},
|
||||
inventory_image = "building_blocks_bwtile_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = S("Fireplace"),
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron_fireplace.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
@ -1,23 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
image = "building_blocks_sticks.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
minetest.register_craftitem("building_blocks:tar_base", {
|
||||
description = S("Tar base"),
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = S("Tar Knife"),
|
||||
inventory_image = "building_blocks_knife.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses=100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
@ -1,170 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks 2',
|
||||
recipe = {
|
||||
{'group:stick', '' , 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Adobe 3',
|
||||
recipe = {
|
||||
{"default:sand"},
|
||||
{"default:clay"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:brobble_spread 4',
|
||||
recipe = {
|
||||
{"default:brick", "default:cobble", "default:brick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:BWtile 10',
|
||||
recipe = {
|
||||
{"group:marble", "group:tar_block"},
|
||||
{"group:tar_block", "group:marble"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:fakegrass 2',
|
||||
recipe = {
|
||||
{'default:leaves'},
|
||||
{"default:dirt"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Fireplace 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:grate 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:glass", "default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:gravel_spread 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:gravel", "default:gravel"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:wood", "default:junglewood"},
|
||||
{"default:junglewood", "default:wood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:junglewood", "default:wood"},
|
||||
{"default:wood", "default:junglewood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:knife 1',
|
||||
recipe = {
|
||||
{"group:tar_block"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "building_blocks:Marble 9",
|
||||
recipe = {
|
||||
{"default:clay", "group:tar_block", "default:clay"},
|
||||
{"group:tar_block","default:clay", "group:tar_block"},
|
||||
{"default:clay", "group:tar_block","default:clay"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Roofing 10',
|
||||
recipe = {
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'building_blocks:sticks'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Tarmac_spread 4',
|
||||
recipe = {
|
||||
{"group:tar_block", "group:tar_block"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:terrycloth_towel 2',
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:woodglass 1',
|
||||
recipe = {
|
||||
{"default:wood"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:smoothglass",
|
||||
recipe = "default:glass"
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:Tar",
|
||||
recipe = "building_blocks:tar_base",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:hardwood",
|
||||
burntime = 28,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:sticks",
|
||||
burntime = 5,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:Tar",
|
||||
burntime = 40,
|
||||
})
|
@ -3,14 +3,14 @@ local S = homedecor_i18n.gettext
|
||||
|
||||
local chains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
|
||||
fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
|
||||
}
|
||||
|
||||
local topchains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
|
||||
{ -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 }
|
||||
{ -0.1, -0.625, -0.1, 0.1, 0.4, 0.1 }
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ minetest.register_node("chains:chain_top_brass", {
|
||||
minetest.register_node("chains:chandelier", {
|
||||
description = S("Chandelier (wrought iron)"),
|
||||
paramtype = "light",
|
||||
light_source = 12,
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
@ -99,7 +99,7 @@ minetest.register_node("chains:chandelier", {
|
||||
minetest.register_node("chains:chandelier_brass", {
|
||||
description = S("Chandelier (brass)"),
|
||||
paramtype = "light",
|
||||
light_source = 12,
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
|
6
computer/locale/es.txt
Normal file
6
computer/locale/es.txt
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
# Language: Español
|
||||
# Author: Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Plastic sheet = Placa de Plastico
|
||||
Unprocessed Plastic base = Base de Plastico No Procesada
|
@ -33,10 +33,10 @@ local colors = { "computer_cyan.png", "computer_magenta.png", "computer_red.png"
|
||||
|
||||
local background = "image[0,0;3.55,6.66;computer_black.png]"
|
||||
local buttons = "button[3,4.5;0.6,0.6;left;<]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;"..minetest.formspec_escape(S("L")).."]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;L]"
|
||||
.."button[4.2,4.5;0.6,0.6;down;v]"
|
||||
.."button[4.2,5.3;0.6,0.6;drop;V]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;"..minetest.formspec_escape(S("R")).."]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;R]"
|
||||
.."button[5.4,4.5;0.6,0.6;right;>]"
|
||||
.."button[3.5,3;2,2;new;"..minetest.formspec_escape(S("New Game")).."]"
|
||||
|
||||
@ -231,7 +231,7 @@ local function step(pos, fields)
|
||||
local scr = { formsize, background,
|
||||
t.boardstring, t.previewstring,
|
||||
draw_shape(t.cur, t.x, t.y, t.rot, boardx, boardy),
|
||||
"label[3.8,0.1;"..S("Next...").."]label[3.8,2.7;"..S("Score: "),
|
||||
"label[3.8,0.1;Next...]label[3.8,2.7;Score: ",
|
||||
t.score, close, buttons }
|
||||
|
||||
|
||||
|
@ -16,8 +16,8 @@ local function start_smoke(pos, node, clicker, chimney)
|
||||
end, s_handle)
|
||||
end
|
||||
minetest.delete_particlespawner(id)
|
||||
this_spawner_meta:set_int("smoky", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("smoky", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
return
|
||||
end
|
||||
|
||||
@ -34,7 +34,7 @@ local function start_smoke(pos, node, clicker, chimney)
|
||||
})
|
||||
if chimney == 1 then
|
||||
this_spawner_meta:set_int("smoky", id)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
else
|
||||
s_handle = minetest.sound_play("fire_small", {
|
||||
pos = pos,
|
||||
@ -62,40 +62,47 @@ local function stop_smoke(pos)
|
||||
end, s_handle)
|
||||
end
|
||||
|
||||
this_spawner_meta:set_int("smoky", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("smoky", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
end
|
||||
|
||||
minetest.register_node("fake_fire:ice_fire", {
|
||||
inventory_image = "ice_fire_inv.png",
|
||||
description = S("Ice fire"),
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1},
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name="ice_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
start_smoke(pos, node, clicker)
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
minetest.sound_play("fire_extinguish", {
|
||||
pos = pos, max_hear_distance = 5
|
||||
})
|
||||
end,
|
||||
drop = ""
|
||||
})
|
||||
-- FLAME TYPES
|
||||
local flame_types = {
|
||||
{ "fake", S("Fake fire") },
|
||||
{ "ice", S("Ice fire") },
|
||||
}
|
||||
|
||||
minetest.register_alias("fake_fire:fake_fire", "fire:permanent_flame")
|
||||
for _, f in ipairs(flame_types) do
|
||||
local name, desc = unpack(f)
|
||||
minetest.register_node("fake_fire:"..name.."_fire", {
|
||||
inventory_image = name.."_fire_inv.png",
|
||||
description = desc,
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1},
|
||||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
waving = 1,
|
||||
tiles = {
|
||||
{name=name.."_fire_animated.png", animation={type="vertical_frames",
|
||||
aspect_w=16, aspect_h=16, length=1.5}},
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
start_smoke(pos, node, clicker)
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = function (pos)
|
||||
stop_smoke(pos)
|
||||
minetest.sound_play("fire_extinguish", {
|
||||
pos = pos, max_hear_distance = 5
|
||||
})
|
||||
end,
|
||||
drop = ""
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("fake_fire:fancy_fire", {
|
||||
inventory_image = "fancy_fire_inv.png",
|
||||
@ -183,18 +190,43 @@ for _, mat in ipairs(materials) do
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("fake_fire:flint_and_steel", "fire:flint_and_steel")
|
||||
|
||||
minetest.override_item("default:ice", {
|
||||
on_ignite = function(pos, igniter)
|
||||
local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(flame_pos).name == "air" then
|
||||
minetest.set_node(flame_pos, {name = "fake_fire:ice_fire"})
|
||||
-- FLINT and STEEL
|
||||
minetest.register_tool("fake_fire:flint_and_steel", {
|
||||
description = S("Flint and steel"),
|
||||
inventory_image = "flint_and_steel.png",
|
||||
liquids_pointable = false,
|
||||
stack_max = 1,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level=0,
|
||||
groupcaps={flamable = {uses=65, maxlevel=1}}
|
||||
},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then
|
||||
if string.find(minetest.get_node(pointed_thing.under).name, "ice") then
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:ice_fire"})
|
||||
else
|
||||
minetest.set_node(pointed_thing.above, {name="fake_fire:fake_fire"})
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), S("This area is protected!"))
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
itemstack:add_wear(65535/65)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
-- CRAFTS
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = 'fake_fire:flint_and_steel',
|
||||
recipe = {"default:obsidian_shard", "default:steel_ingot"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
|
@ -12,9 +12,12 @@ minetest.register_node("homedecor:bathroom_tiles_dark", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_medium", {
|
||||
@ -28,9 +31,12 @@ minetest.register_node("homedecor:bathroom_tiles_medium", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:bathroom_tiles_light", {
|
||||
@ -44,9 +50,12 @@ minetest.register_node("homedecor:bathroom_tiles_light", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
groups = {cracky=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
local tr_cbox = {
|
||||
@ -164,3 +173,21 @@ minetest.register_lbm({
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:recolor_bathroom_tiles",
|
||||
label = "Convert bathroom tiles to use UD extended palette",
|
||||
run_at_every_load = false,
|
||||
nodenames = {
|
||||
"homedecor:bathroom_tiles_light",
|
||||
"homedecor:bathroom_tiles_medium",
|
||||
"homedecor:bathroom_tiles_dark",
|
||||
},
|
||||
action = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("palette") ~= "ext" then
|
||||
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -52,11 +52,13 @@ homedecor.register("bed_regular", {
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
if not placer:get_player_control().sneak then
|
||||
return homedecor.bed_expansion(pos, placer, itemstack, pointed_thing)
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
homedecor.unextend_bed(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
@ -65,7 +67,9 @@ homedecor.register("bed_regular", {
|
||||
homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true)
|
||||
return itemstack
|
||||
else
|
||||
homedecor.beds_on_rightclick(pos, node, clicker)
|
||||
-- if minetest.get_modpath("beds") then
|
||||
-- beds.on_rightclick(pos, clicker)
|
||||
-- end
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
@ -89,13 +93,18 @@ homedecor.register("bed_extended", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
expand = { forward = "air" },
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
homedecor.unextend_bed(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
homedecor.beds_on_rightclick(pos, node, clicker)
|
||||
return itemstack
|
||||
end,
|
||||
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
-- local itemname = itemstack:get_name()
|
||||
-- if minetest.get_modpath("beds") then
|
||||
-- beds.on_rightclick(pos, clicker)
|
||||
-- end
|
||||
-- return itemstack
|
||||
-- end,
|
||||
drop = "homedecor:bed_regular"
|
||||
})
|
||||
|
||||
@ -120,18 +129,23 @@ homedecor.register("bed_kingsize", {
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
local inv = digger:get_inventory()
|
||||
if digger:get_player_control().sneak and inv:room_for_item("main", "homedecor:bed_regular 2") then
|
||||
inv:remove_item("main", "homedecor:bed_kingsize 1")
|
||||
inv:add_item("main", "homedecor:bed_regular 2")
|
||||
end
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
homedecor.beds_on_rightclick(pos, node, clicker)
|
||||
return itemstack
|
||||
end,
|
||||
-- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
-- local itemname = itemstack:get_name()
|
||||
-- if minetest.get_modpath("beds") then
|
||||
-- beds.on_rightclick(pos, clicker)
|
||||
-- end
|
||||
-- return itemstack
|
||||
-- end
|
||||
})
|
||||
|
||||
for _, w in pairs({ N_("mahogany"), N_("oak") }) do
|
||||
|
@ -89,7 +89,7 @@ for _, c in ipairs(bookcolors) do
|
||||
if data.title and data.title ~= "" then
|
||||
meta:set_string("infotext", data.title)
|
||||
end
|
||||
if not creative.is_enabled_for(plname) then
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
@ -156,20 +156,13 @@ for _, c in ipairs(bookcolors) do
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
if form_name ~= BOOK_FORMNAME then
|
||||
return false
|
||||
if form_name ~= BOOK_FORMNAME or not fields.save then
|
||||
return
|
||||
end
|
||||
local player_name = player:get_player_name()
|
||||
local pos = player_current_book[player_name]
|
||||
if not pos then
|
||||
return true
|
||||
end
|
||||
if not pos then return end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
if owner ~= "" and player_name ~= owner or not fields.save then
|
||||
player_current_book[player_name] = nil
|
||||
return true
|
||||
end
|
||||
meta:set_string("title", fields.title or "")
|
||||
meta:set_string("text", fields.text or "")
|
||||
meta:set_string("owner", player_name)
|
||||
@ -178,9 +171,6 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
|
||||
end
|
||||
minetest.log("action", S("@1 has written in a book (title: \"@2\"): \"@3\" at location @4",
|
||||
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:getpos())))
|
||||
|
||||
player_current_book[player_name] = nil
|
||||
return true
|
||||
end)
|
||||
|
||||
minetest.register_alias("homedecor:book", "homedecor:book_grey")
|
||||
|
@ -25,6 +25,7 @@ minetest.register_entity("homedecor:mesh_desk_fan", {
|
||||
})
|
||||
|
||||
local add_mesh_desk_fan_entity = function(pos)
|
||||
print("in add_mesh_desk_fan_entity()")
|
||||
local param2 = minetest.get_node(pos).param2
|
||||
local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan")
|
||||
if param2 == 0 then
|
||||
|
@ -546,17 +546,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:shutter_colored",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:shutter",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:shutter_oak",
|
||||
@ -878,28 +867,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:curtain_closed",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:curtain_closed",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:curtain_open",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:curtain_open",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
local mats = {
|
||||
{ "brass", "homedecor:pole_brass" },
|
||||
{ "wrought_iron", "homedecor:pole_wrought_iron" },
|
||||
@ -1228,6 +1195,7 @@ minetest.register_craft( {
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_half 6",
|
||||
recipe = {
|
||||
{ "dye:white", "dye:white", "dye:white" },
|
||||
{ "default:glass", "homedecor:power_crystal", "default:glass", },
|
||||
}
|
||||
})
|
||||
@ -1235,38 +1203,11 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_half 6",
|
||||
recipe = {
|
||||
{ "dye:white", "dye:white", "dye:white" },
|
||||
{"moreblocks:super_glow_glass", "moreblocks:glow_glass", "moreblocks:super_glow_glass", },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_half",
|
||||
recipe = {
|
||||
{"homedecor:glowlight_small_cube","homedecor:glowlight_small_cube"},
|
||||
{"homedecor:glowlight_small_cube","homedecor:glowlight_small_cube"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_half",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"homedecor:glowlight_quarter",
|
||||
"homedecor:glowlight_quarter"
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:glowlight_half",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:glowlight_half",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_quarter 6",
|
||||
recipe = {
|
||||
@ -1274,17 +1215,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:glowlight_quarter",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:glowlight_quarter",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_small_cube 8",
|
||||
recipe = {
|
||||
@ -1309,14 +1239,20 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:glowlight_small_cube",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:glowlight_small_cube",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_half",
|
||||
recipe = {
|
||||
{"homedecor:glowlight_small_cube","homedecor:glowlight_small_cube"},
|
||||
{"homedecor:glowlight_small_cube","homedecor:glowlight_small_cube"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:glowlight_half",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"homedecor:glowlight_quarter",
|
||||
"homedecor:glowlight_quarter"
|
||||
}
|
||||
})
|
||||
|
||||
@ -2291,17 +2227,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bathroom_tiles_light",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bathroom_tiles_light",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bathroom_tiles_medium 4",
|
||||
recipe = {
|
||||
@ -2310,17 +2235,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bathroom_tiles_medium",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bathroom_tiles_medium",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bathroom_tiles_dark 4",
|
||||
recipe = {
|
||||
@ -2329,17 +2243,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bathroom_tiles_dark",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bathroom_tiles_dark",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
-- misc electrical
|
||||
|
||||
minetest.register_craft( {
|
||||
@ -2573,17 +2476,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_regular",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bed_kingsize",
|
||||
recipe = {
|
||||
@ -2591,29 +2483,6 @@ minetest.register_craft( {
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_kingsize",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_kingsize",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:bed_kingsize",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:bed_regular",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:bottle_green",
|
||||
recipe = {
|
||||
@ -2974,17 +2843,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:desk_lamp",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:desk_lamp",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:hanging_lantern 2",
|
||||
recipe = {
|
||||
@ -3062,7 +2920,7 @@ minetest.register_craft({
|
||||
recipe = {
|
||||
{ "", "technic:brass_ingot", ""},
|
||||
{ "", "homedecor:chainlink_brass", ""},
|
||||
{ "default:glass", "homedecor:glowlight_small_cube", "default:glass"}
|
||||
{ "default:glass", "homedecor:glowlight_small", "default:glass"}
|
||||
},
|
||||
})
|
||||
|
||||
@ -3070,7 +2928,7 @@ minetest.register_craft({
|
||||
output = "homedecor:ceiling_lamp",
|
||||
recipe = {
|
||||
{ "", "chains:chain_top_brass", ""},
|
||||
{ "default:glass", "homedecor:glowlight_small_cube", "default:glass"}
|
||||
{ "default:glass", "homedecor:glowlight_small", "default:glass"}
|
||||
},
|
||||
})
|
||||
|
||||
@ -3092,29 +2950,23 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.settings:get_bool("homedecor.disable_coin_crafting") == false then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:coin 5",
|
||||
recipe = {"moreblocks:micro_goldblock_1", "default:sword_stone"}
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:coin 5",
|
||||
recipe = {"moreblocks:micro_goldblock_1", "default:sword_stone"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:coin 15",
|
||||
recipe = {"default:gold_ingot", "default:sword_steel"}
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:coin 15",
|
||||
recipe = {"default:gold_ingot", "default:sword_steel"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:coin 50",
|
||||
recipe = {"default:goldblock", "default:sword_mese"}
|
||||
})
|
||||
else
|
||||
if minetest.settings:get("log_mods") then
|
||||
minetest.log("[HomeDecor] " .. S("coin crafting is disabled!"))
|
||||
end
|
||||
end
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:coin 50",
|
||||
recipe = {"default:goldblock", "default:sword_mese"}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:lattice_wood 8",
|
||||
@ -3162,28 +3014,10 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stained_glass 3",
|
||||
output = "homedecor:stained_glass",
|
||||
recipe = {
|
||||
{"", "dye:blue", ""},
|
||||
{"dye:red", "xpanes:pane_flat", "dye:green"},
|
||||
{"", "dye:yellow", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stained_glass 2",
|
||||
recipe = {
|
||||
{"", "dye:blue", ""},
|
||||
{"dye:red", "cottages:glass_pane_side", "dye:green"},
|
||||
{"", "dye:yellow", ""},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stained_glass 2",
|
||||
recipe = {
|
||||
{"", "dye:blue", ""},
|
||||
{"dye:red", "cottages:glass_pane", "dye:green"},
|
||||
{"dye:red", "xpanes:pane", "dye:green"},
|
||||
{"", "dye:yellow", ""},
|
||||
},
|
||||
})
|
||||
@ -3273,19 +3107,6 @@ for i in ipairs(homedecor.banister_materials) do
|
||||
})
|
||||
end
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "",
|
||||
palette = "split",
|
||||
neutral_node = "homedecor:banister_wood_horizontal",
|
||||
type = "shapeless",
|
||||
output_prefix = "homedecor:banister_wood_horizontal_",
|
||||
output_suffix = "",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE",
|
||||
}
|
||||
})
|
||||
|
||||
if (minetest.get_modpath("technic") and minetest.get_modpath("dye") and minetest.get_modpath("bees")) then
|
||||
technic.register_separating_recipe({ input = {"bees:wax 1"}, output = {"homedecor:oil_extract 2","dye:yellow 1"} })
|
||||
end
|
||||
|
@ -1,7 +1,6 @@
|
||||
default
|
||||
unifieddyes
|
||||
homedecor_i18n
|
||||
creative
|
||||
building_blocks?
|
||||
signs_lib?
|
||||
moreblocks?
|
||||
@ -12,5 +11,3 @@ bucket?
|
||||
beds?
|
||||
flowers?
|
||||
3d_armor?
|
||||
skinsdb?
|
||||
mesecons?
|
||||
|
@ -4,8 +4,6 @@ local S = homedecor_i18n.gettext
|
||||
|
||||
local function N_(x) return x end
|
||||
|
||||
local m_rules = mesecon and mesecon.rules and mesecon.rules.pplate
|
||||
|
||||
-- doors
|
||||
|
||||
local function isSolid(pos, adjust)
|
||||
@ -266,7 +264,6 @@ for i, side in ipairs(sides) do
|
||||
drop = "homedecor:door_"..doorname.."_left",
|
||||
mesecons = {
|
||||
effector = {
|
||||
rules = m_rules,
|
||||
action_on = function(pos,node)
|
||||
local isClosed = getClosed(pos)
|
||||
if isClosed then
|
||||
@ -408,7 +405,6 @@ for i, g in ipairs(gate_list) do
|
||||
end,
|
||||
mesecons = {
|
||||
effector = {
|
||||
rules = m_rules,
|
||||
action_on = function(pos,node) homedecor.flip_gate(pos,node,nil,gate, "closed") end
|
||||
}
|
||||
}
|
||||
@ -437,7 +433,6 @@ for i, g in ipairs(gate_list) do
|
||||
return itemstack
|
||||
end
|
||||
def.mesecons.effector = {
|
||||
rules = m_rules,
|
||||
action_off = function(pos,node) homedecor.flip_gate(pos,node,nil,gate, "open") end
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ minetest.register_alias("homedecor:deckchair_head", "air")
|
||||
homedecor.register("deckchair_striped_blue", {
|
||||
mesh = "homedecor_deckchair.obj",
|
||||
tiles = {"homedecor_deckchair_striped_blue.png"},
|
||||
description = S("Deck Chair (blue striped)"),
|
||||
description = S("Deck Chair"),
|
||||
groups = { snappy = 3 },
|
||||
expand = { forward="placeholder" },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -251,7 +251,6 @@ homedecor.register("swing", {
|
||||
place_on = "bottom"
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local placer_name = placer:get_player_name() or ""
|
||||
local isceiling, pos = homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||
if isceiling then
|
||||
local height = 0
|
||||
@ -264,7 +263,7 @@ homedecor.register("swing", {
|
||||
|
||||
if not testreg or not testreg.buildable_to then
|
||||
if i < 1 then
|
||||
minetest.chat_send_player(placer_name, "No room under there to hang a swing.")
|
||||
minetest.chat_send_player(placer:get_player_name(), "No room under there to hang a swing.")
|
||||
return itemstack
|
||||
else
|
||||
break
|
||||
@ -280,11 +279,11 @@ homedecor.register("swing", {
|
||||
|
||||
minetest.set_node({ x=pos.x, y=pos.y-height, z=pos.z }, { name = "homedecor:swing", param2 = fdir })
|
||||
|
||||
if not creative.is_enabled_for(placer_name) then
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(placer_name, "You have to point at the bottom side of an overhanging object to place a swing.")
|
||||
minetest.chat_send_player(placer:get_player_name(), "You have to point at the bottom side of an overhanging object to place a swing.")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
@ -368,7 +367,7 @@ local shrub_cbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
|
||||
for _, color in ipairs(homedecor.shrub_colors) do
|
||||
minetest.register_node("homedecor:shrubbery_large_"..color, {
|
||||
description = S("Shrubbery (large, @1)", S(color)),
|
||||
description = S("Shrubbery (@1)", S(color)),
|
||||
drawtype = "mesh",
|
||||
mesh = "homedecor_cube.obj",
|
||||
tiles = {"homedecor_shrubbery_"..color..".png"},
|
||||
|
@ -83,7 +83,9 @@ homedecor.register("kitchen_chair_padded", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
pos.y = pos.y+0 -- where do I put my ass ?
|
||||
@ -108,7 +110,9 @@ homedecor.register("armchair", {
|
||||
node_box = ac_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
})
|
||||
|
||||
@ -231,6 +235,8 @@ minetest.register_lbm({
|
||||
local param2 = paletteidx + new_fdir
|
||||
local newname = "homedecor:armchair"
|
||||
|
||||
print(name, dump(a), dump(b), dump(color).."("..dump(paletteidx)..")", dump(param2))
|
||||
|
||||
if node.name == "homedecor:chair" then
|
||||
newname = "homedecor:kitchen_chair_wood"
|
||||
elseif string.find(node.name, "homedecor:chair_") then
|
||||
|
@ -70,17 +70,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:armchair",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:armchair",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:kitchen_chair_padded",
|
||||
@ -90,17 +79,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:kitchen_chair_padded",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:kitchen_chair_padded",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:kitchen_chair_wood",
|
||||
@ -128,17 +106,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:standing_lamp_off",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "homedecor:table_lamp_off",
|
||||
@ -164,34 +131,14 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
output = "homedecor:standing_lamp_off",
|
||||
recipe = {
|
||||
{ "wool:white", "default:torch", "wool:white"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "moreblocks:slab_wood", "" },
|
||||
{ "homedecor:table_lamp_off"},
|
||||
{ "group:stick"},
|
||||
{ "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
{ "cottages:wool", "default:torch", "cottages:wool"},
|
||||
{ "", "group:stick", ""},
|
||||
{ "", "moreblocks:slab_wood", "" },
|
||||
},
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "homedecor:table_lamp_off",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "homedecor:table_lamp_off",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:toilet",
|
||||
recipe = {
|
||||
|
@ -213,24 +213,20 @@ homedecor.register("soda_machine", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local playername = clicker:get_player_name()
|
||||
local wielditem = clicker:get_wielded_item()
|
||||
local wieldname = wielditem:get_name()
|
||||
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
|
||||
local fdir = node.param2
|
||||
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
|
||||
if wieldname == "homedecor:coin" then
|
||||
wielditem:take_item()
|
||||
clicker:set_wielded_item(wielditem)
|
||||
minetest.spawn_item(pos_drop, "homedecor:soda_can")
|
||||
minetest.sound_play("insert_coin", {
|
||||
pos=pos, max_hear_distance = 5
|
||||
})
|
||||
if not creative.is_enabled_for(playername) then
|
||||
wielditem:take_item()
|
||||
clicker:set_wielded_item(wielditem)
|
||||
return wielditem
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(playername, S("Please insert a coin in the machine."))
|
||||
minetest.chat_send_player(clicker:get_player_name(), S("Please insert a coin in the machine."))
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -104,7 +104,7 @@ local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2, poin
|
||||
ctrl_node_def.after_place_node(pos, placer, itemstack, pointed_thing)
|
||||
end
|
||||
|
||||
if not creative.is_enabled_for(placer_name) then
|
||||
if not homedecor.expect_infinite_stacks then
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
@ -211,21 +211,22 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
|
||||
local rightnode = minetest.get_node(rightpos)
|
||||
|
||||
local inv = placer:get_inventory()
|
||||
local lastdye = unifieddyes.last_used_dye[placer_name]
|
||||
|
||||
if leftnode.name == "homedecor:bed_regular" then
|
||||
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
|
||||
local meta = minetest.get_meta(pos)
|
||||
local leftmeta = minetest.get_meta(leftpos)
|
||||
|
||||
local meta = minetest.get_meta(leftpos)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
minetest.swap_node(leftpos, { name = newname, param2 = param2})
|
||||
minetest.set_node(leftpos, { name = newname, param2 = param2})
|
||||
meta:set_string("dye", lastdye)
|
||||
inv:add_item("main", lastdye)
|
||||
elseif rightnode.name == "homedecor:bed_regular" then
|
||||
local newname = string.gsub(thisnode.name, "_regular", "_kingsize")
|
||||
local meta = minetest.get_meta(pos)
|
||||
local rightmeta = minetest.get_meta(rightpos)
|
||||
|
||||
local meta = minetest.get_meta(rightpos)
|
||||
minetest.set_node(rightpos, {name = "air"})
|
||||
minetest.swap_node(pos, { name = newname, param2 = param2})
|
||||
minetest.set_node(pos, { name = newname, param2 = param2})
|
||||
meta:set_string("dye", lastdye)
|
||||
inv:add_item("main", lastdye)
|
||||
end
|
||||
|
||||
local toppos = {x=pos.x, y=pos.y+1.0, z=pos.z}
|
||||
@ -234,7 +235,14 @@ function homedecor.bed_expansion(pos, placer, itemstack, pointed_thing, trybunks
|
||||
if trybunks and is_buildable_to(placer_name, toppos, topposfwd) then
|
||||
local newname = string.gsub(thisnode.name, "_regular", "_extended")
|
||||
local newparam2 = param2 % 8
|
||||
minetest.swap_node(toppos, { name = thisnode.name, param2 = param2})
|
||||
if inv:contains_item("main", lastdye) then
|
||||
minetest.set_node(toppos, { name = thisnode.name, param2 = param2})
|
||||
if lastdye then inv:remove_item("main", lastdye.." 1") end
|
||||
else
|
||||
minetest.set_node(toppos, { name = thisnode.name, param2 = newparam2})
|
||||
minetest.chat_send_player(placer_name, "Ran out of "..lastdye..", using neutral color.")
|
||||
unifieddyes.last_used_dye[placer_name] = nil
|
||||
end
|
||||
minetest.swap_node(pos, { name = newname, param2 = param2})
|
||||
itemstack:take_item()
|
||||
end
|
||||
@ -257,8 +265,6 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
if not pos then return itemstack end
|
||||
|
||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local meta = itemstack:get_meta()
|
||||
local pindex = meta:get_int("palette_index")
|
||||
|
||||
local abovepos = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
local abovenode = minetest.get_node(abovepos)
|
||||
@ -362,6 +368,14 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
fdir = right_fwd_node.param2
|
||||
pos = fwd_pos
|
||||
new_place_name = string.gsub(right_fwd_node.name, "_diagonal_.-$", "_horizontal")
|
||||
|
||||
-- try to follow a horizontal with another of the same
|
||||
elseif left_node and string.find(left_node.name, "homedecor:banister_.*_horizontal") then
|
||||
fdir = left_node.param2
|
||||
new_place_name = left_node.name
|
||||
elseif right_node and string.find(right_node.name, "homedecor:banister_.*_horizontal") then
|
||||
fdir = right_node.param2
|
||||
new_place_name = right_node.name
|
||||
end
|
||||
|
||||
-- manually invert left-right orientation
|
||||
@ -373,7 +387,7 @@ function homedecor.place_banister(itemstack, placer, pointed_thing)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.set_node(pos, {name = new_place_name, param2 = fdir+pindex})
|
||||
minetest.set_node(pos, {name = new_place_name, param2 = fdir})
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
|
@ -19,6 +19,4 @@ dofile(handlerpath.."registration.lua")
|
||||
-- some nodes have particle spawners
|
||||
dofile(handlerpath.."water_particles.lua")
|
||||
|
||||
|
||||
dofile(handlerpath.."mt_game_beds_functions.lua")
|
||||
dofile(handlerpath.."sit.lua")
|
||||
|
@ -1,175 +0,0 @@
|
||||
-- This file is a partial copy of functions.lua from minetest_game's beds mod
|
||||
-- with changes needed for homedecor's beds.
|
||||
|
||||
local pi = math.pi
|
||||
local is_sp = minetest.is_singleplayer()
|
||||
local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
|
||||
if enable_respawn == nil then
|
||||
enable_respawn = true
|
||||
end
|
||||
|
||||
-- Helper functions
|
||||
|
||||
local function get_look_yaw(pos)
|
||||
local n = minetest.get_node(pos)
|
||||
local fdir = n.param2 % 4
|
||||
if fdir == 0 then
|
||||
return pi / 2, fdir
|
||||
elseif fdir == 1 then
|
||||
return -pi / 2, fdir
|
||||
elseif fdir == 3 then
|
||||
return pi, fdir
|
||||
else
|
||||
return 0, fdir
|
||||
end
|
||||
end
|
||||
|
||||
local function is_night_skip_enabled()
|
||||
local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
|
||||
if enable_night_skip == nil then
|
||||
enable_night_skip = true
|
||||
end
|
||||
return enable_night_skip
|
||||
end
|
||||
|
||||
local function check_in_beds(players)
|
||||
local in_bed = beds.player
|
||||
if not players then
|
||||
players = minetest.get_connected_players()
|
||||
end
|
||||
|
||||
for n, player in ipairs(players) do
|
||||
local name = player:get_player_name()
|
||||
if not in_bed[name] then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
return #players > 0
|
||||
end
|
||||
|
||||
local function get_player_in_bed()
|
||||
local player_in_bed = 0
|
||||
for k,v in pairs(beds.player) do
|
||||
player_in_bed = player_in_bed + 1
|
||||
end
|
||||
return player_in_bed
|
||||
end
|
||||
|
||||
local function lay_down(player, pos, bed_pos, state, skip)
|
||||
local name = player:get_player_name()
|
||||
local hud_flags = player:hud_get_flags()
|
||||
|
||||
if not player or not name then
|
||||
return
|
||||
end
|
||||
|
||||
-- stand up
|
||||
if state ~= nil and not state then
|
||||
local p = beds.pos[name] or nil
|
||||
if beds.player[name] ~= nil then
|
||||
beds.player[name] = nil
|
||||
end
|
||||
-- skip here to prevent sending player specific changes (used for leaving players)
|
||||
if skip then
|
||||
return
|
||||
end
|
||||
if p then
|
||||
player:setpos(p)
|
||||
end
|
||||
|
||||
-- physics, eye_offset, etc
|
||||
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||
player:set_look_horizontal(math.random(1, 180) / 100)
|
||||
default.player_attached[name] = false
|
||||
player:set_physics_override(1, 1, 1)
|
||||
hud_flags.wielditem = true
|
||||
default.player_set_animation(player, "stand" , 30)
|
||||
|
||||
-- lay down
|
||||
else
|
||||
beds.player[name] = 1
|
||||
beds.pos[name] = pos
|
||||
-- physics, eye_offset, etc
|
||||
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
|
||||
local yaw, fdir = get_look_yaw(bed_pos)
|
||||
player:set_look_horizontal(yaw)
|
||||
local offsets = {
|
||||
[0] = {0.5, 0},
|
||||
[1] = {-0.5, 0},
|
||||
[2] = {0, -0.5},
|
||||
[3] = {0, 0.5}
|
||||
}
|
||||
local p = {x = bed_pos.x + offsets[fdir][1], y = bed_pos.y, z = bed_pos.z + offsets[fdir][2]}
|
||||
player:set_physics_override(0, 0, 0)
|
||||
player:setpos(p)
|
||||
default.player_attached[name] = true
|
||||
hud_flags.wielditem = false
|
||||
default.player_set_animation(player, "lay" , 0)
|
||||
end
|
||||
|
||||
player:hud_set_flags(hud_flags)
|
||||
end
|
||||
|
||||
local function update_formspecs(finished)
|
||||
local ges = #minetest.get_connected_players()
|
||||
local player_in_bed = get_player_in_bed()
|
||||
local form_n
|
||||
local is_majority = (ges / 2) < player_in_bed
|
||||
|
||||
if finished then
|
||||
form_n = beds.formspec .. "label[2.7,11; Good morning.]"
|
||||
else
|
||||
form_n = beds.formspec .. "label[2.2,11;" .. tostring(player_in_bed) ..
|
||||
" of " .. tostring(ges) .. " players are in bed]"
|
||||
if is_majority and is_night_skip_enabled() then
|
||||
form_n = form_n .. "button_exit[2,8;4,0.75;force;Force night skip]"
|
||||
end
|
||||
end
|
||||
|
||||
for name,_ in pairs(beds.player) do
|
||||
minetest.show_formspec(name, "beds_form", form_n)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Public functions
|
||||
|
||||
function homedecor.beds_on_rightclick(pos, node, player)
|
||||
local name = player:get_player_name()
|
||||
local ppos = player:getpos()
|
||||
local tod = minetest.get_timeofday()
|
||||
|
||||
if tod > 0.2 and tod < 0.805 then
|
||||
if beds.player[name] then
|
||||
lay_down(player, nil, nil, false)
|
||||
end
|
||||
minetest.chat_send_player(name, "You can only sleep at night.")
|
||||
return
|
||||
end
|
||||
|
||||
-- move to bed
|
||||
if not beds.player[name] then
|
||||
lay_down(player, ppos, pos)
|
||||
beds.set_spawns() -- save respawn positions when entering bed
|
||||
else
|
||||
lay_down(player, nil, nil, false)
|
||||
end
|
||||
|
||||
if not is_sp then
|
||||
update_formspecs(false)
|
||||
end
|
||||
|
||||
-- skip the night and let all players stand up
|
||||
if check_in_beds() then
|
||||
minetest.after(2, function()
|
||||
if not is_sp then
|
||||
update_formspecs(is_night_skip_enabled())
|
||||
end
|
||||
if is_night_skip_enabled() then
|
||||
beds.skip_night()
|
||||
beds.kick_players()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
@ -30,8 +30,8 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname)
|
||||
end, s_handle)
|
||||
end
|
||||
minetest.delete_particlespawner(id)
|
||||
this_spawner_meta:set_int("active", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("active", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
return
|
||||
end
|
||||
|
||||
@ -109,6 +109,6 @@ function homedecor.stop_particle_spawner(pos)
|
||||
end, s_handle)
|
||||
end
|
||||
|
||||
this_spawner_meta:set_int("active", 0)
|
||||
this_spawner_meta:set_int("sound", 0)
|
||||
this_spawner_meta:set_int("active", nil)
|
||||
this_spawner_meta:set_int("sound", nil)
|
||||
end
|
||||
|
@ -11,8 +11,12 @@ local modpath = minetest.get_modpath("homedecor")
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
homedecor = {}
|
||||
homedecor.modpath = modpath
|
||||
homedecor = {
|
||||
modpath = modpath,
|
||||
|
||||
-- infinite stacks
|
||||
expect_infinite_stacks = minetest.settings:get_bool("creative_mode") and not minetest.get_modpath("unified_inventory")
|
||||
}
|
||||
|
||||
-- Determine if the item being pointed at is the underside of a node (e.g a ceiling)
|
||||
function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||
@ -119,6 +123,4 @@ dofile(modpath.."/wardrobe.lua")
|
||||
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
||||
if minetest.settings:get_bool("log_mod") then
|
||||
minetest.log("action", "[HomeDecor] " .. S("Loaded!"))
|
||||
end
|
||||
print("[HomeDecor] " .. S("Loaded!"))
|
||||
|
@ -46,7 +46,9 @@ minetest.register_node("homedecor:glowlight_half", {
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:glowlight_quarter", {
|
||||
@ -84,7 +86,9 @@ minetest.register_node("homedecor:glowlight_quarter", {
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:glowlight_small_cube", {
|
||||
@ -122,7 +126,9 @@ minetest.register_node("homedecor:glowlight_small_cube", {
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
homedecor.register("plasma_lamp", {
|
||||
@ -443,6 +449,7 @@ local function reg_lamp(suffix, nxt, light, brightness)
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
selection_box = tlamp_cbox,
|
||||
@ -450,17 +457,14 @@ local function reg_lamp(suffix, nxt, light, brightness)
|
||||
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1,
|
||||
not_in_creative_inventory=((light ~= nil) and 1) or nil,
|
||||
},
|
||||
drop = "homedecor:table_lamp_off",
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "homedecor:table_lamp_"..repl[suffix]
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"homedecor:table_lamp_off"}, inherit_color = true },
|
||||
}
|
||||
}
|
||||
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
homedecor.register("standing_lamp_"..suffix, {
|
||||
@ -476,6 +480,7 @@ local function reg_lamp(suffix, nxt, light, brightness)
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
walkable = false,
|
||||
light_source = light,
|
||||
groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1,
|
||||
@ -489,12 +494,9 @@ local function reg_lamp(suffix, nxt, light, brightness)
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
on_construct = unifieddyes.on_construct,
|
||||
--expand = { top="air" },
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"homedecor:standing_lamp_off"}, inherit_color = true },
|
||||
}
|
||||
}
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
expand = { top="air" },
|
||||
})
|
||||
|
||||
-- for old maps that had the original 3dforniture mod
|
||||
@ -533,7 +535,9 @@ homedecor.register("desk_lamp", {
|
||||
groups = {snappy=3, ud_param2_colorable = 1},
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew
|
||||
})
|
||||
|
||||
@ -735,3 +739,28 @@ minetest.register_lbm({
|
||||
meta:set_string("dye", "unifieddyes:"..color)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "homedecor:recolor_lighting",
|
||||
label = "Convert some kinds of lights to use UD extended palette",
|
||||
run_at_every_load = false,
|
||||
nodenames = {
|
||||
"homedecor:table_lamp_off",
|
||||
"homedecor:table_lamp_low",
|
||||
"homedecor:table_lamp_med",
|
||||
"homedecor:table_lamp_hi",
|
||||
"homedecor:table_lamp_max",
|
||||
"homedecor:standing_lamp_off",
|
||||
"homedecor:standing_lamp_low",
|
||||
"homedecor:standing_lamp_med",
|
||||
"homedecor:standing_lamp_hi",
|
||||
"homedecor:standing_lamp_max",
|
||||
},
|
||||
action = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("palette") ~= "ext" then
|
||||
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -396,7 +396,7 @@ local n = { 1, 2 }
|
||||
|
||||
for _, i in ipairs(n) do
|
||||
homedecor.register("picture_frame"..i, {
|
||||
description = S("Picture Frame "..i),
|
||||
description = S("Picture Frame"),
|
||||
mesh = "homedecor_picture_frame.obj",
|
||||
tiles = {
|
||||
"homedecor_picture_frame_image"..i..".png",
|
||||
@ -483,19 +483,23 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
|
||||
local name, matdesc, tile1, tile2 = unpack(mat)
|
||||
local nodename = "banister_"..name.."_"..side
|
||||
|
||||
local groups = { snappy = 3, not_in_creative_inventory = 1 }
|
||||
local cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -9/16, -3/16, 5/16, 9/16, 24/16, 8/16 }
|
||||
}
|
||||
|
||||
if side == "horizontal" then
|
||||
groups = { snappy = 3 }
|
||||
cbox = {
|
||||
type = "fixed",
|
||||
fixed = { -8/16, -8/16, 5/16, 8/16, 8/16, 8/16 }
|
||||
}
|
||||
else
|
||||
minetest.register_alias(string.gsub("homedecor:"..nodename, "diagonal_", ""), "homedecor:"..nodename)
|
||||
end
|
||||
|
||||
local def = {
|
||||
homedecor.register(nodename, {
|
||||
description = S("Banister for Stairs (@1, @2)", matdesc, sidedesc),
|
||||
mesh = "homedecor_banister_"..side..".obj",
|
||||
tiles = {
|
||||
@ -503,36 +507,12 @@ for _, side in ipairs({"diagonal_left", "diagonal_right", "horizontal"}) do
|
||||
tile2,
|
||||
},
|
||||
inventory_image = "homedecor_banister_"..name.."_inv.png",
|
||||
groups = groups,
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
groups = { snappy = 3},
|
||||
on_place = homedecor.place_banister,
|
||||
drop = "homedecor:banister_"..name.."_horizontal",
|
||||
}
|
||||
|
||||
if side ~= "horizontal" then
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
end
|
||||
|
||||
if name == "wood" then
|
||||
def.airbrush_replacement_node = "homedecor:banister_wood_"..side.."_grey"
|
||||
def.groups.ud_param2_colorable = 1
|
||||
def.paramtype2 = "colorfacedir"
|
||||
end
|
||||
homedecor.register(nodename, def)
|
||||
|
||||
if name == "wood" then
|
||||
local nn = "homedecor:"..nodename
|
||||
local def2 = table.copy(minetest.registered_items[nn])
|
||||
def2.tiles = {
|
||||
homedecor.white_wood,
|
||||
homedecor.white_wood
|
||||
}
|
||||
def2.inventory_image = "homedecor_banister_wood_colored_inv.png"
|
||||
def2.groups.not_in_creative_inventory = 1
|
||||
|
||||
unifieddyes.generate_split_palette_nodes(nn, def2, "homedecor:banister_"..name.."_horizontal")
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -34,14 +34,16 @@ homedecor.register("shutter", {
|
||||
wield_image = inv,
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
airbrush_replacement_node = "homedecor:shutter_colored",
|
||||
ud_replacement_node = "homedecor:shutter_colored",
|
||||
groups = { snappy = 3, ud_param2_colorable = 1 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
selection_box = shutter_cbox,
|
||||
node_box = shutter_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node
|
||||
})
|
||||
|
||||
homedecor.register("shutter_colored", {
|
||||
@ -58,7 +60,10 @@ homedecor.register("shutter_colored", {
|
||||
node_box = shutter_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
drop = "homedecor:shutter"
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
@ -6,75 +6,6 @@ local wd_cbox = {
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||
}
|
||||
|
||||
-- cache set_textures function (fallback to old version)
|
||||
-- default.player_set_textures is deprecated and will be removed in future
|
||||
local set_player_textures =
|
||||
minetest.get_modpath("player_api") and player_api.set_textures
|
||||
or default.player_set_textures
|
||||
|
||||
local armor_mod_path = minetest.get_modpath("3d_armor")
|
||||
|
||||
local skinslist = {"male1", "male2", "male3", "male4", "male5"}
|
||||
local default_skin = "character.png"
|
||||
|
||||
local skinsdb_mod_path = minetest.get_modpath("skinsdb")
|
||||
if skinsdb_mod_path then
|
||||
for _, shrt in ipairs(skinslist) do
|
||||
for _, prefix in ipairs({"", "fe"}) do
|
||||
local skin_name = prefix..shrt
|
||||
local skin_obj = skins.new("homedecor_clothes_"..skin_name..".png") -- Texture PNG file as key to be compatible in set_player_skin
|
||||
skin_obj:set_preview("homedecor_clothes_"..skin_name.."_preview.png")
|
||||
skin_obj:set_texture("homedecor_clothes_"..skin_name..".png")
|
||||
skin_obj:set_meta("name", "Wardrobe "..skin_name)
|
||||
skin_obj:set_meta("author", 'Calinou and Jordach')
|
||||
skin_obj:set_meta("license", 'WTFPL')
|
||||
local file = io.open(homedecor.modpath.."/textures/homedecor_clothes_"..skin_name..".png", "r")
|
||||
skin_obj:set_meta("format", skins.get_skin_format(file))
|
||||
file:close()
|
||||
skin_obj:set_meta("in_inventory_list", false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function homedecor.get_player_skin(player)
|
||||
local skin = player:get_attribute("homedecor:player_skin")
|
||||
if not skin or skin == "" then
|
||||
return default_skin, true
|
||||
end
|
||||
return skin, false
|
||||
end
|
||||
|
||||
function homedecor.set_player_skin(player, skin, save)
|
||||
skin = skin or default_skin
|
||||
if skinsdb_mod_path then
|
||||
skins.set_player_skin(player, skin)
|
||||
elseif armor_mod_path then -- if 3D_armor's installed, let it set the skin
|
||||
armor.textures[player:get_player_name()].skin = skin
|
||||
armor:update_player_visuals(player)
|
||||
else
|
||||
set_player_textures(player, { skin })
|
||||
end
|
||||
|
||||
if save then
|
||||
if skin == default_skin then
|
||||
skin = "default"
|
||||
player:set_attribute("homedecor:player_skin", "")
|
||||
else
|
||||
player:set_attribute("homedecor:player_skin", skin)
|
||||
end
|
||||
if save == "player" then -- if player action
|
||||
minetest.log("verbose",
|
||||
S("player @1 sets skin to @2", player:get_player_name(), skin) ..
|
||||
(armor_mod_path and ' [3d_armor]' or '')
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function homedecor.unset_player_skin(player)
|
||||
homedecor.set_player_skin(player, nil, true)
|
||||
end
|
||||
|
||||
homedecor.register("wardrobe", {
|
||||
mesh = "homedecor_bedroom_wardrobe.obj",
|
||||
tiles = {
|
||||
@ -96,16 +27,16 @@ homedecor.register("wardrobe", {
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local skins = {"male1", "male2", "male3", "male4", "male5"}
|
||||
-- textures made by the Minetest community (mostly Calinou and Jordach)
|
||||
local clothes_strings = ""
|
||||
for i = 1,5 do
|
||||
clothes_strings = clothes_strings..
|
||||
"image_button_exit["..(i-1)..".5,0;1.1,2;homedecor_clothes_"..skinslist[i].."_preview.png;"..skinslist[i]..";]"..
|
||||
"image_button_exit["..(i-1)..".5,2;1.1,2;homedecor_clothes_fe"..skinslist[i].."_preview.png;fe"..skinslist[i]..";]"
|
||||
"image_button_exit["..(i-1)..".5,0;1.1,2;homedecor_clothes_"..skins[i].."_preview.png;"..skins[i]..";]"..
|
||||
"image_button_exit["..(i-1)..".5,2;1.1,2;homedecor_clothes_fe"..skins[i].."_preview.png;fe"..skins[i]..";]"
|
||||
end
|
||||
meta:set_string("formspec", "size[5.5,8.5]"..default.gui_bg..default.gui_bg_img..default.gui_slots..
|
||||
"vertlabel[0,0.5;"..minetest.formspec_escape(S("Clothes")).."]"..
|
||||
"button_exit[0,3.29;0.6,0.6;default;x]"..
|
||||
clothes_strings..
|
||||
"vertlabel[0,5.2;"..minetest.formspec_escape(S("Storage")).."]"..
|
||||
"list[current_name;main;0.5,4.5;5,2;]"..
|
||||
@ -113,17 +44,26 @@ homedecor.register("wardrobe", {
|
||||
"listring[]")
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
if fields.default then
|
||||
homedecor.set_player_skin(sender, nil, "player")
|
||||
return
|
||||
end
|
||||
local skins = {"male1", "male2", "male3", "male4", "male5"}
|
||||
local playerName = sender:get_player_name()
|
||||
local armor_mod = minetest.get_modpath("3d_armor")
|
||||
|
||||
for i = 1,5 do
|
||||
if fields[skinslist[i]] then
|
||||
homedecor.set_player_skin(sender, "homedecor_clothes_"..skinslist[i]..".png", "player")
|
||||
if fields[skins[i]] then
|
||||
if armor_mod then -- if 3D_armor's installed, let it set the skin
|
||||
armor.textures[playerName].skin = "homedecor_clothes_"..skins[i]..".png"
|
||||
armor:update_player_visuals(sender)
|
||||
break
|
||||
end
|
||||
default.player_set_textures(sender, { "homedecor_clothes_"..skins[i]..".png" })
|
||||
break
|
||||
elseif fields["fe"..skinslist[i]] then
|
||||
homedecor.set_player_skin(sender, "homedecor_clothes_fe"..skinslist[i]..".png", "player")
|
||||
elseif fields["fe"..skins[i]] then
|
||||
if armor_mod then
|
||||
armor.textures[playerName].skin = "homedecor_clothes_fe"..skins[i]..".png"
|
||||
armor:update_player_visuals(sender)
|
||||
break
|
||||
end
|
||||
default.player_set_textures(sender, { skin = "homedecor_clothes_fe"..skins[i]..".png" })
|
||||
break
|
||||
end
|
||||
end
|
||||
@ -132,14 +72,3 @@ homedecor.register("wardrobe", {
|
||||
|
||||
minetest.register_alias("homedecor:wardrobe_bottom", "homedecor:wardrobe")
|
||||
minetest.register_alias("homedecor:wardrobe_top", "air")
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local skin = player:get_attribute("homedecor:player_skin")
|
||||
|
||||
if skin and skin ~= "" then
|
||||
-- setting player skin on connect has no effect, so delay skin change
|
||||
minetest.after(1, function(player, skin)
|
||||
homedecor.set_player_skin(player, skin)
|
||||
end, player, skin)
|
||||
end
|
||||
end)
|
||||
|
@ -112,8 +112,10 @@ minetest.register_node("homedecor:curtain_closed", {
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = { type = "wallmounted" },
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
||||
@ -127,7 +129,7 @@ minetest.register_node("homedecor:curtain_closed", {
|
||||
})
|
||||
|
||||
minetest.register_node("homedecor:curtain_open", {
|
||||
description = S("Curtains (open)"),
|
||||
description = S("Curtains"),
|
||||
tiles = { "homedecor_curtain_open.png" },
|
||||
inventory_image = "homedecor_curtain_open.png",
|
||||
drawtype = 'signlike',
|
||||
@ -139,8 +141,10 @@ minetest.register_node("homedecor:curtain_open", {
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
selection_box = { type = "wallmounted" },
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local topnode = minetest.get_node({x=pos.x, y=pos.y+1.0, z=pos.z})
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,6 @@ cd "$(dirname "${BASH_SOURCE[0]}")/..";
|
||||
|
||||
# Extract translatable strings.
|
||||
xgettext --from-code=UTF-8 \
|
||||
--language=Lua \
|
||||
--sort-by-file \
|
||||
--keyword=S \
|
||||
--keyword=NS:1,2 \
|
||||
--keyword=N_ \
|
||||
|
@ -32,25 +32,6 @@ minetest.register_entity("itemframes:item",{
|
||||
if self.nodename == "itemframes:pedestal" then
|
||||
self.object:set_properties({automatic_rotate = 1})
|
||||
end
|
||||
if self.texture ~= nil and self.nodename ~= nil then
|
||||
local entity_pos = vector.round(self.object:get_pos())
|
||||
local objs = minetest.get_objects_inside_radius(entity_pos, 0.5)
|
||||
for _, obj in ipairs(objs) do
|
||||
if obj ~= self.object and
|
||||
obj:get_luaentity() and
|
||||
obj:get_luaentity().name == "itemframes:item" and
|
||||
obj:get_luaentity().nodename == self.nodename and
|
||||
obj:get_properties() and
|
||||
obj:get_properties().textures and
|
||||
obj:get_properties().textures[1] == self.texture then
|
||||
minetest.log("action","[itemframes] Removing extra " ..
|
||||
self.texture .. " found in " .. self.nodename .. " at " ..
|
||||
minetest.pos_to_string(entity_pos))
|
||||
self.object:remove()
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
get_staticdata = function(self)
|
||||
if self.nodename ~= nil and self.texture ~= nil then
|
||||
@ -138,7 +119,7 @@ minetest.register_node("itemframes:frame",{
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, dig_immediate = 2},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = default.node_sound_defaults(),
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -201,7 +182,7 @@ minetest.register_node("itemframes:pedestal",{
|
||||
tiles = {"itemframes_pedestal.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_defaults(),
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -247,31 +228,24 @@ minetest.register_node("itemframes:pedestal",{
|
||||
|
||||
-- automatically restore entities lost from frames/pedestals
|
||||
-- due to /clearobjects or similar
|
||||
minetest.register_lbm({
|
||||
label = "Maintain itemframe and pedestal entities",
|
||||
name = "itemframes:maintain_entities",
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"itemframes:frame", "itemframes:pedestal"},
|
||||
run_at_every_load = true,
|
||||
action = function(pos, node)
|
||||
minetest.after(0,
|
||||
function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local itemstring = meta:get_string("item")
|
||||
if itemstring ~= "" then
|
||||
local entity_pos = pos
|
||||
if node.name == "itemframes:pedestal" then
|
||||
entity_pos = {x=pos.x,y=pos.y+1,z=pos.z}
|
||||
end
|
||||
local objs = minetest.get_objects_inside_radius(entity_pos, 0.5)
|
||||
if #objs == 0 then
|
||||
minetest.log("action","[itemframes] Replacing missing " ..
|
||||
itemstring .. " in " .. node.name .. " at " ..
|
||||
minetest.pos_to_string(pos))
|
||||
update_item(pos, node)
|
||||
end
|
||||
end
|
||||
end,
|
||||
pos, node)
|
||||
interval = 15,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local num
|
||||
|
||||
if node.name == "itemframes:frame" then
|
||||
num = #minetest.get_objects_inside_radius(pos, 0.5)
|
||||
elseif node.name == "itemframes:pedestal" then
|
||||
pos.y = pos.y + 1
|
||||
num = #minetest.get_objects_inside_radius(pos, 0.5)
|
||||
pos.y = pos.y - 1
|
||||
end
|
||||
|
||||
if num > 0 then return end
|
||||
update_item(pos, node)
|
||||
end
|
||||
})
|
||||
|
||||
@ -299,4 +273,4 @@ minetest.register_craft({
|
||||
if minetest.get_modpath("mesecons_mvps") then
|
||||
mesecon.register_mvps_stopper("itemframes:frame")
|
||||
mesecon.register_mvps_stopper("itemframes:pedestal")
|
||||
end
|
||||
end
|
||||
|
@ -28,6 +28,7 @@ minetest.register_node("lavalamp:lavalamp", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = 14,
|
||||
@ -38,6 +39,8 @@ minetest.register_node("lavalamp:lavalamp", {
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "lavalamp:lavalamp_off"
|
||||
minetest.swap_node(pos, node)
|
||||
@ -56,6 +59,7 @@ minetest.register_node("lavalamp:lavalamp_off", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
place_param2 = 240,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
@ -66,16 +70,13 @@ minetest.register_node("lavalamp:lavalamp_off", {
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
drop = "lavalamp:lavalamp",
|
||||
on_construct = unifieddyes.on_construct,
|
||||
after_place_node = unifieddyes.recolor_on_place,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "lavalamp:lavalamp"
|
||||
minetest.swap_node(pos, node)
|
||||
return itemstack
|
||||
end,
|
||||
drop = {
|
||||
items = {
|
||||
{items = {"lavalamp:lavalamp"}, inherit_color = true },
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -87,17 +88,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "lavalamp:lavalamp",
|
||||
palette = "extended",
|
||||
type = "shapeless",
|
||||
neutral_node = "lavalamp:lavalamp",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
-- convert to param2 coloring
|
||||
|
||||
local colors = {
|
||||
@ -146,3 +136,20 @@ minetest.register_lbm({
|
||||
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
name = "lavalamp:recolor",
|
||||
label = "Convert 89-color lamps to use UD extended palette",
|
||||
run_at_every_load = false,
|
||||
nodenames = {
|
||||
"lavalamp:lavalamp",
|
||||
"lavalamp:lavalamp_off"
|
||||
},
|
||||
action = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if meta:get_string("palette") ~= "ext" then
|
||||
minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] })
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -25,7 +25,9 @@ minetest.register_node("lrfurn:armchair", {
|
||||
node_box = armchair_cbox,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
@ -56,23 +58,13 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "lrfurn:armchair",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "lrfurn:armchair",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
-- convert old static nodes to param2 color
|
||||
|
||||
lrfurn.old_static_armchairs = {}
|
||||
|
||||
for _, color in ipairs(lrfurn.colors) do
|
||||
table.insert(lrfurn.old_static_armchairs, "lrfurn:armchair_"..color)
|
||||
print("lrfurn:armchair_"..color)
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
|
@ -1,4 +1,3 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
lrfurn = {}
|
||||
screwdriver = screwdriver or {}
|
||||
@ -39,9 +38,9 @@ function lrfurn.check_right(pos, fdir, long, placer)
|
||||
return false
|
||||
elseif minetest.is_protected(pos2, placer:get_player_name()) then
|
||||
if not long then
|
||||
minetest.chat_send_player(placer:get_player_name(), S("Someone else owns the spot where other end goes!"))
|
||||
minetest.chat_send_player(placer:get_player_name(), "Someone else owns the spot where other end goes!")
|
||||
else
|
||||
minetest.chat_send_player(placer:get_player_name(), S("Someone else owns the spot where the middle or far end goes!"))
|
||||
minetest.chat_send_player(placer:get_player_name(), "Someone else owns the spot where the middle or far end goes!")
|
||||
end
|
||||
return false
|
||||
end
|
||||
@ -51,7 +50,7 @@ function lrfurn.check_right(pos, fdir, long, placer)
|
||||
if node3 and node3.name ~= "air" then
|
||||
return false
|
||||
elseif minetest.is_protected(pos3, placer:get_player_name()) then
|
||||
minetest.chat_send_player(placer:get_player_name(), S("Someone else owns the spot where the other end goes!"))
|
||||
minetest.chat_send_player(placer:get_player_name(), "Someone else owns the spot where the other end goes!")
|
||||
return false
|
||||
end
|
||||
end
|
||||
@ -61,11 +60,10 @@ end
|
||||
|
||||
function lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
local node = minetest.get_node(pos)
|
||||
local colorbits = node.param2 - (node.param2 % 8)
|
||||
local yaw = placer:get_look_yaw()
|
||||
local dir = minetest.yaw_to_dir(yaw-1.5)
|
||||
local fdir = minetest.dir_to_wallmounted(dir)
|
||||
minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits })
|
||||
minetest.swap_node(pos, { name = node.name, param2 = fdir })
|
||||
end
|
||||
|
||||
dofile(minetest.get_modpath("lrfurn").."/longsofas.lua")
|
||||
|
@ -26,6 +26,7 @@ minetest.register_node("lrfurn:longsofa", {
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(pos, placer:get_player_name()) then return true end
|
||||
|
||||
@ -41,6 +42,7 @@ minetest.register_node("lrfurn:longsofa", {
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
@ -70,17 +72,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "lrfurn:longsofa",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "lrfurn:longsofa",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
-- convert old static nodes to param2 colorization
|
||||
|
||||
lrfurn.old_static_longsofas = {}
|
||||
|
@ -26,6 +26,7 @@ minetest.register_node("lrfurn:sofa", {
|
||||
on_rotate = screwdriver.disallow,
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(pos, placer:get_player_name()) then return true end
|
||||
|
||||
@ -41,6 +42,7 @@ minetest.register_node("lrfurn:sofa", {
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
@ -70,17 +72,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
unifieddyes.register_color_craft({
|
||||
output = "lrfurn:sofa",
|
||||
palette = "wallmounted",
|
||||
type = "shapeless",
|
||||
neutral_node = "lrfurn:sofa",
|
||||
recipe = {
|
||||
"NEUTRAL_NODE",
|
||||
"MAIN_DYE"
|
||||
}
|
||||
})
|
||||
|
||||
-- convert old static nodes to param2 color
|
||||
|
||||
lrfurn.old_static_sofas = {}
|
||||
|
Reference in New Issue
Block a user