mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-01-11 17:10:18 +01:00
add hd exterior
This commit is contained in:
parent
7fb775647d
commit
10c80e0fd2
@ -16,6 +16,8 @@ homedecor.materials = {
|
||||
dye_black = "dye:black",
|
||||
dye_white = "dye:white",
|
||||
dye_green = "dye:green",
|
||||
dye_red = "dye:red",
|
||||
dye_yellow = "dye:yellow",
|
||||
silicon = "mesecons_materials:silicon",
|
||||
string = "farming:string",
|
||||
paper = "default:paper",
|
||||
@ -24,7 +26,9 @@ homedecor.materials = {
|
||||
wool_grey = "wool:grey",
|
||||
wool_green = "wool:green",
|
||||
wool_dark_green = "wool:dark_green",
|
||||
wool_brown = "wool:brown"
|
||||
wool_brown = "wool:brown",
|
||||
slab_stone = "stairs:slab_stone",
|
||||
slab_wood = "stairs:slab_wood",
|
||||
}
|
||||
|
||||
if minetest.get_modpath("moreores") then
|
||||
@ -68,6 +72,8 @@ elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then
|
||||
dye_black = "fl_dyes:black_dye",
|
||||
dye_white = "fl_dyes:white_dye",
|
||||
dye_green = "fl_dyes:green_dye",
|
||||
dye_red = "fl_dyes:red_dye",
|
||||
dye_yellow = "fl_dyes:yellow_dye",
|
||||
copper_ingot = "fl_ores:copper_ingot",
|
||||
tin_ingot = "fl_ores:tin_ingot",
|
||||
silver_ingot = "fl_ores:iron_ingot",
|
||||
@ -75,6 +81,8 @@ elseif minetest.get_modpath("fl_ores") and minetest.get_modpath("fl_stone") then
|
||||
string = "fl_plantlife:oxeye_daisy",
|
||||
paper = "basic_materials:plastic_sheet",
|
||||
iron_lump = "fl_ores:iron_ore",
|
||||
slab_stone = "fl_stone:stone_slab",
|
||||
slab_wood = "fl_trees:apple_plank_slab",
|
||||
}
|
||||
elseif minetest.get_modpath("hades_core") then
|
||||
homedecor.materials = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = homedecor_common
|
||||
description = Homedecor mod: common
|
||||
depends = basic_materials
|
||||
optional_depends = screwdriver, hopper, default, creative, sound_api
|
||||
optional_depends = screwdriver, hopper, default, creative, sound_api, fl_stone, fl_mapgen
|
||||
|
@ -1,22 +0,0 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_comment_line_length = 999
|
||||
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"unpack",
|
||||
"dump",
|
||||
table = { fields = { "copy", "getn" } },
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
"creative",
|
||||
"default",
|
||||
"homedecor",
|
||||
"screwdriver",
|
||||
}
|
||||
|
||||
globals = {
|
||||
}
|
||||
|
@ -25,18 +25,32 @@ homedecor.register("barbecue", {
|
||||
light_source = 9,
|
||||
selection_box = bbq_cbox,
|
||||
collision_box = bbq_cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
-- no need for placeholder it appears
|
||||
expand = { top="air" },
|
||||
crafts = {
|
||||
{
|
||||
recipe = {
|
||||
{ "","homedecor:fence_chainlink","" },
|
||||
{ "steel_ingot","fake_fire:embers","steel_ingot" },
|
||||
{ "basic_materials:steel_bar","steel_ingot","basic_materials:steel_bar" }
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:barbecue_meat", "air")
|
||||
|
||||
local wood_tex = "default_wood.png"
|
||||
if not minetest.get_modpath("default") then wood_tex = "[combine:16x16^[noalpha^[colorize:#654321" end
|
||||
|
||||
homedecor.register("doghouse", {
|
||||
mesh = "homedecor_doghouse.obj",
|
||||
tiles = {
|
||||
"homedecor_shingles_terracotta.png",
|
||||
"default_wood.png",
|
||||
wood_tex,
|
||||
"building_blocks_towel.png"
|
||||
},
|
||||
description = S("Doghouse"),
|
||||
@ -45,8 +59,19 @@ homedecor.register("doghouse", {
|
||||
collision_box = homedecor.nodebox.slab_y(1.5),
|
||||
groups = {snappy=3},
|
||||
expand = { top="placeholder" },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
|
||||
crafts = {
|
||||
{
|
||||
recipe = {
|
||||
{"homedecor:shingles_terracotta", "homedecor:shingles_terracotta", "homedecor:shingles_terracotta"},
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:wood", "building_blocks:terrycloth_towel", "group:wood"}
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("homedecor:doghouse_roof", "air")
|
||||
@ -55,7 +80,7 @@ minetest.register_alias("homedecor:doghouse_base", "homedecor:doghouse")
|
||||
homedecor.register("stonepath", {
|
||||
description = S("Garden stone path"),
|
||||
tiles = {
|
||||
"default_stone.png"
|
||||
minetest.registered_nodes["mapgen_stone"].tiles[1],
|
||||
},
|
||||
inventory_image = "homedecor_stonepath_inv.png",
|
||||
groups = { snappy=3 },
|
||||
@ -76,7 +101,35 @@ homedecor.register("stonepath", {
|
||||
type = "fixed",
|
||||
fixed = { -0.4375, -0.5, -0.4375, 0.4375, -0.4, 0.4375 }
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_stone_defaults",
|
||||
},
|
||||
crafts = {
|
||||
{
|
||||
output = "homedecor:stonepath 16",
|
||||
recipe = {
|
||||
{ "slab_stone","","slab_stone" },
|
||||
{ "","slab_stone","" },
|
||||
{ "slab_stone","","slab_stone" }
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "homedecor:stonepath 16",
|
||||
recipe = {
|
||||
{ "moreblocks:slab_stone","","moreblocks:slab_stone" },
|
||||
{ "","moreblocks:slab_stone","" },
|
||||
{ "moreblocks:slab_stone","","moreblocks:slab_stone" }
|
||||
},
|
||||
},
|
||||
{
|
||||
output = "homedecor:stonepath 3",
|
||||
recipe = {
|
||||
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" },
|
||||
{ "","moreblocks:micro_stone_1","" },
|
||||
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" }
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
local lattice_colors = {
|
||||
@ -110,7 +163,9 @@ homedecor.register("lattice_"..name, {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 0.44, 0.5, 0.5, 0.5}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
@ -124,7 +179,9 @@ homedecor.register("swing", {
|
||||
inventory_image = "homedecor_swing_inv.png",
|
||||
use_texture_alpha = "clip",
|
||||
groups = { snappy=3, oddly_breakable_by_hand=3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
walkable = false,
|
||||
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil,
|
||||
node_box = {
|
||||
@ -172,7 +229,7 @@ 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 minetest.is_creative_enabled(placer_name) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
@ -190,7 +247,30 @@ homedecor.register("swing", {
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
crafts = {
|
||||
{
|
||||
recipe = {
|
||||
{ "string","","string" },
|
||||
{ "string","","string" },
|
||||
{ "string","slab_wood","string" }
|
||||
},
|
||||
},
|
||||
{
|
||||
recipe = {
|
||||
{ "string","","string" },
|
||||
{ "string","","string" },
|
||||
{ "string","moreblocks:slab_wood","string" }
|
||||
},
|
||||
},
|
||||
{
|
||||
recipe = {
|
||||
{ "string","","string" },
|
||||
{ "string","","string" },
|
||||
{ "string","moreblocks:panel_wood_1","string" }
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
homedecor.register("swing_rope", {
|
||||
@ -209,14 +289,24 @@ homedecor.register("swing_rope", {
|
||||
selection_box = homedecor.nodebox.null
|
||||
})
|
||||
|
||||
local water_tex = "default_water.png"
|
||||
if not minetest.get_modpath("default") then water_tex = "[combine:16x16^[noalpha^[colorize:#00008b" end
|
||||
local cobble_tex = minetest.registered_nodes["mapgen_stone"].tiles[1]
|
||||
local stone_drop = minetest.registered_nodes["mapgen_stone"].drop
|
||||
if stone_drop and type(stone_drop) == "string" then
|
||||
cobble_tex = minetest.registered_nodes[stone_drop].tiles[1]
|
||||
elseif stone_drop and type(stone_drop) == "table" then
|
||||
cobble_tex = minetest.registered_nodes[stone_drop.items[1].items[1]].tiles[1]
|
||||
end
|
||||
|
||||
homedecor.register("well", {
|
||||
mesh = "homedecor_well.obj",
|
||||
tiles = {
|
||||
"homedecor_rope_texture.png",
|
||||
{ name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
|
||||
"default_water.png",
|
||||
"default_cobble.png",
|
||||
"default_wood.png",
|
||||
water_tex,
|
||||
cobble_tex,
|
||||
wood_tex,
|
||||
"homedecor_shingles_wood.png"
|
||||
},
|
||||
inventory_image = "homedecor_well_inv.png",
|
||||
@ -226,8 +316,19 @@ homedecor.register("well", {
|
||||
selection_box = homedecor.nodebox.slab_y(2),
|
||||
collision_box = homedecor.nodebox.slab_y(2),
|
||||
expand = { top="placeholder" },
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_wood_defaults",
|
||||
},
|
||||
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil,
|
||||
crafts = {
|
||||
{
|
||||
recipe = {
|
||||
{ "homedecor:shingles_wood", "homedecor:shingles_wood", "homedecor:shingles_wood" },
|
||||
{ "group:wood", "group:stick", "group:wood" },
|
||||
{ "group:stone", "", "group:stone" }
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.get_modpath("bucket") then
|
||||
@ -270,7 +371,17 @@ for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = "clip",
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_leaves_defaults",
|
||||
},
|
||||
crafts = {
|
||||
{
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"homedecor:shrubbery_"..color
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node(":homedecor:shrubbery_"..color, {
|
||||
@ -286,104 +397,45 @@ for color, color_loc in pairs(homedecor_exterior.shrub_colors) do
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = "clip",
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
_sound_def = {
|
||||
key = "node_sound_leaves_defaults",
|
||||
},
|
||||
selection_box = shrub_cbox,
|
||||
collision_box = shrub_cbox,
|
||||
crafts = {
|
||||
{
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"homedecor:shrubbery_large_"..color
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if color ~= "green" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_large_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_large_green",
|
||||
homedecor.materials["dye_"..color]
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_green",
|
||||
homedecor.materials["dye_"..color]
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- crafting
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:chimney 2",
|
||||
recipe = {
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:doghouse",
|
||||
recipe = {
|
||||
{"homedecor:shingles_terracotta", "homedecor:shingles_terracotta", "homedecor:shingles_terracotta"},
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:wood", "building_blocks:terrycloth_towel", "group:wood"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:well",
|
||||
recipe = {
|
||||
{ "homedecor:shingles_wood", "homedecor:shingles_wood", "homedecor:shingles_wood" },
|
||||
{ "group:wood", "group:stick", "group:wood" },
|
||||
{ "group:stone", "", "group:stone" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stonepath 16",
|
||||
recipe = {
|
||||
{ "stairs:slab_stone","","stairs:slab_stone" },
|
||||
{ "","stairs:slab_stone","" },
|
||||
{ "stairs:slab_stone","","stairs:slab_stone" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stonepath 16",
|
||||
recipe = {
|
||||
{ "moreblocks:slab_stone","","moreblocks:slab_stone" },
|
||||
{ "","moreblocks:slab_stone","" },
|
||||
{ "moreblocks:slab_stone","","moreblocks:slab_stone" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:stonepath 3",
|
||||
recipe = {
|
||||
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" },
|
||||
{ "","moreblocks:micro_stone_1","" },
|
||||
{ "moreblocks:micro_stone_1","","moreblocks:micro_stone_1" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:barbecue",
|
||||
recipe = {
|
||||
{ "","homedecor:fence_chainlink","" },
|
||||
{ "default:steel_ingot","fake_fire:embers","default:steel_ingot" },
|
||||
{ "basic_materials:steel_bar","default:steel_ingot","basic_materials:steel_bar" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:swing",
|
||||
recipe = {
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","stairs:slab_wood","farming:string" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:swing",
|
||||
recipe = {
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","moreblocks:slab_wood","farming:string" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:swing",
|
||||
recipe = {
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","","farming:string" },
|
||||
{ "farming:string","moreblocks:panel_wood_1","farming:string" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "homedecor:lattice_wood 8",
|
||||
recipe = {
|
||||
@ -397,7 +449,7 @@ minetest.register_craft({
|
||||
output = "homedecor:lattice_white_wood 8",
|
||||
recipe = {
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
{"group:wood", "dye:white", "group:wood"},
|
||||
{"group:wood", homedecor.materials["dye_white"], "group:wood"},
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
},
|
||||
})
|
||||
@ -416,7 +468,7 @@ minetest.register_craft({
|
||||
recipe = {
|
||||
{"group:stick", "group:wood", "group:stick"},
|
||||
{"group:wood", "group:leaves", "group:wood"},
|
||||
{"group:stick", "dye:white", "group:stick"},
|
||||
{"group:stick", homedecor.materials["dye_white"], "group:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
@ -430,46 +482,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
for color, _ in pairs(homedecor_exterior.shrub_colors) do
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_large_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_"..color
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_large_"..color
|
||||
}
|
||||
})
|
||||
|
||||
if color ~= "green" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_large_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_large_green",
|
||||
"dye:"..color
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "homedecor:shrubbery_"..color,
|
||||
recipe = {
|
||||
"homedecor:shrubbery_green",
|
||||
"dye:"..color
|
||||
}
|
||||
})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- aliases
|
||||
|
||||
minetest.register_alias("homedecor:well_top", "air")
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = homedecor_exterior
|
||||
description = Homedecor mod: exterior
|
||||
depends = homedecor_common, default, dye, creative, basic_materials
|
||||
depends = homedecor_common
|
||||
optional_depends = moreblocks, building_blocks, bucket, screwdriver
|
||||
|
@ -321,6 +321,14 @@ homedecor.register("chimney", {
|
||||
})
|
||||
|
||||
-- crafting
|
||||
minetest.register_craft({
|
||||
output = "homedecor:chimney 2",
|
||||
recipe = {
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
{ "default:clay_brick", "", "default:clay_brick" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "homedecor:skylight 4",
|
||||
|
Loading…
Reference in New Issue
Block a user