1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-06-28 04:50:21 +02:00

Split the big "homedecor" mod into multiple sub-mods

Any of these new submods can be run without any other
components that were once part of the big "homedecor"
mod, other than homedecor_common and homedecor_i18n

Reduced dependencies where possible, but each submod still
has its various dependencies more or less the same as before,
i.e. some need basic_materials, others need unifieddyes,
some need building_blocks, and so on.

All of the stuff that used to be under homedecor/handlers
got moved to homedecor_common, as did any models and/or textures
that are used by more than one other homedecor component.

All the miscellaneous items that didn't warrant their own
mod ended up in homedecor_misc, which can also be thought
of as the remains of the original "homedecor" mod, renamed.
This commit is contained in:
Vanessa Dannenberg
2019-04-20 15:49:36 -04:00
parent 95590f23c5
commit b08c0905c0
732 changed files with 4520 additions and 4430 deletions

View File

@ -0,0 +1,5 @@
homedecor_common
default
basic_materials
homedecor_i18n
building_blocks?

View File

@ -0,0 +1,209 @@
-- Nodes that would affect the local temperature e.g. fans, heater, A/C
local S = homedecor_i18n.gettext
homedecor.register("air_conditioner", {
description = S("Air Conditioner"),
mesh = "homedecor_ac.obj",
tiles = {
"homedecor_ac.png",
"default_glass.png"
},
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
selection_box = { type="regular" },
})
-- fans
minetest.register_entity(":homedecor:mesh_desk_fan", {
collisionbox = homedecor.nodebox.null,
visual = "mesh",
mesh = "homedecor_desk_fan.b3d",
textures = {"homedecor_desk_fan_uv.png"},
visual_size = {x=10, y=10},
})
local add_mesh_desk_fan_entity = function(pos)
local param2 = minetest.get_node(pos).param2
local entity = minetest.add_entity(pos, "homedecor:mesh_desk_fan")
if param2 == 0 then
entity:setyaw(3.142) -- 180 degrees
elseif minetest.get_node(pos).param2 == 1 then
entity:setyaw(3.142/2) -- 90 degrees
elseif minetest.get_node(pos).param2 == 3 then
entity:setyaw((-3.142/2)) -- 270 degrees
else
entity:setyaw(0)
end
return entity
end
homedecor.register("desk_fan", {
description = S("Desk Fan"),
groups = {oddly_breakable_by_hand=2},
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5, -0.1875, 0.1875, -0.375, 0.1875}, -- NodeBox1
}
},
tiles = {"homedecor_desk_fan_body.png"},
inventory_image = "homedecor_desk_fan_inv.png",
wield_image = "homedecor_desk_fan_inv.png",
selection_box = { type = "regular" },
on_rotate = screwdriver.disallow,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("active", "no")
add_mesh_desk_fan_entity(pos)
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local meta = minetest.get_meta(pos)
local entities = minetest.get_objects_inside_radius(pos, 0.1)
local entity = entities[1] or add_mesh_desk_fan_entity(pos)
if meta:get_string("active") == "no" then
meta:set_string("active", "yes")
entity:set_animation({x=0,y=96}, 24, 0)
else
meta:set_string("active", "no")
entity:set_animation({x=0,y=0}, 1, 0)
end
end,
after_dig_node = function(pos)
local entities = minetest.get_objects_inside_radius(pos, 0.1)
if entities[1] then entities[1]:remove() end
end,
})
-- ceiling fan
homedecor.register("ceiling_fan", {
description = S("Ceiling Fan"),
tiles = {
{ name="homedecor_ceiling_fan_top.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5} },
{ name="homedecor_ceiling_fan_bottom.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5} },
'homedecor_ceiling_fan_sides.png',
},
inventory_image = "homedecor_ceiling_fan_inv.png",
node_box = {
type = "fixed",
fixed = {
{ -0.5, 0.495, -0.5, 0.5, 0.495, 0.5 },
{ -0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625 }
}
},
groups = { snappy = 3 },
light_source = default.LIGHT_MAX-1,
sounds = default.node_sound_glass_defaults(),
})
-- heating devices
homedecor.register("space_heater", {
description = S("Space heater"),
tiles = { 'homedecor_heater_tb.png',
'homedecor_heater_tb.png',
'homedecor_heater_sides.png',
'homedecor_heater_sides.png',
'homedecor_heater_back.png',
'homedecor_heater_front.png'
},
inventory_image = "homedecor_heater_inv.png",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5, 0.0625, 0.1875, 0, 0.3125},
}
},
selection_box = {
type = "fixed",
fixed = {-0.1875, -0.5, 0.0625, 0.1875, 0, 0.3125}
}
})
local r_cbox = homedecor.nodebox.slab_z(-0.25)
homedecor.register("radiator", {
mesh = "homedecor_radiator.obj",
tiles = {
"homedecor_generic_metal.png",
"homedecor_radiator_controls.png"
},
inventory_image = "homedecor_radiator_inv.png",
description = S("Radiator heater"),
groups = {snappy=3},
selection_box = r_cbox,
collision_box = r_cbox,
sounds = default.node_sound_wood_defaults(),
})
-- crafting
minetest.register_craft({
output = "homedecor:air_conditioner",
recipe = {
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
{ "default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
},
})
minetest.register_craft({
output = "homedecor:air_conditioner",
recipe = {
{ "default:steel_ingot", "building_blocks:grate", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
{ "default:steel_ingot", "basic_materials:motor", "default:steel_ingot" },
},
})
minetest.register_craft({
output = "homedecor:ceiling_fan",
recipe = {
{ "basic_materials:motor" },
{ "homedecor:fan_blades" },
{ "homedecor:glowlight_small_cube" }
}
})
minetest.register_craft({
output = "homedecor:ceiling_fan",
recipe = {
{ "basic_materials:motor" },
{ "homedecor:fan_blades" },
{ "homedecor:glowlight_small_cube" }
}
})
minetest.register_craft( {
output = "homedecor:desk_fan",
recipe = {
{"default:steel_ingot", "homedecor:fan_blades", "basic_materials:motor"},
{"", "default:steel_ingot", ""}
},
})
minetest.register_craft( {
output = "homedecor:space_heater",
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", "homedecor:fan_blades", "basic_materials:motor"},
{"basic_materials:plastic_sheet", "basic_materials:heating_element", "basic_materials:plastic_sheet"}
},
})
minetest.register_craft( {
output = "homedecor:radiator",
recipe = {
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" },
{ "basic_materials:ic", "basic_materials:heating_element", "" },
{ "default:steel_ingot", "basic_materials:heating_element", "default:steel_ingot" }
},
})

View File

@ -0,0 +1,75 @@
# Blender v2.73 (sub 0) OBJ File: 'ac.blend'
# www.blender.org
o Cylinder
v -0.500000 -0.500000 0.500000
v -0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 0.125000 0.500000
v -0.500000 0.125000 -0.500000
v 0.500000 0.125000 -0.500000
v 0.500000 0.125000 0.500000
v -0.500000 0.125001 0.500000
v -0.500000 0.125001 -0.500000
v 0.500000 0.125001 -0.500000
v 0.500000 0.125001 0.500000
v -0.500000 0.500000 0.500000
v -0.500000 0.500000 -0.500000
v 0.500000 0.500000 -0.500000
v 0.500000 0.500000 0.500000
v -0.500000 0.374999 0.500000
v -0.500000 0.250001 -0.500000
v 0.500000 0.250001 -0.500000
v 0.500000 0.250001 0.500000
v -0.500000 0.250001 0.500000
v -0.500000 0.374999 -0.500000
v 0.500000 0.374999 -0.500000
v 0.500000 0.374999 0.500000
vt 1.000000 1.000000
vt 0.500000 1.000000
vt 0.500000 0.687500
vt 1.000000 0.687500
vt 0.000000 1.000000
vt 0.000000 0.687500
vt 0.500000 0.375000
vt 1.000000 0.375000
vt 0.000000 0.187500
vt 0.500000 0.187500
vt 1.000000 0.125000
vt 0.000000 0.125000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt -0.000000 0.750000
vt -0.000000 0.625000
vt 1.000000 0.625000
vt 1.000000 0.750000
vt -0.000000 0.875000
vt 1.000000 0.875000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
g Cylinder_Cylinder_main
s off
f 5/1/1 6/2/1 2/3/1 1/4/1
f 6/2/2 7/5/2 3/6/2 2/3/2
f 7/1/3 8/2/3 4/3/3 3/4/3
f 8/4/4 5/3/4 1/7/4 4/8/4
f 1/6/5 2/9/5 3/10/5 4/3/5
f 8/10/6 7/3/6 6/6/6 5/9/6
g Cylinder_Cylinder_glass-tb
f 21/11/1 18/12/1 10/13/1 9/14/1
f 18/11/2 19/12/2 11/13/2 10/14/2
f 19/11/3 20/12/3 12/13/3 11/14/3
f 20/11/4 21/12/4 9/13/4 12/14/4
f 16/13/6 15/14/6 14/1/6 13/5/6
f 24/15/3 20/16/3 19/17/3 23/18/3
f 23/15/2 19/16/2 18/17/2 22/18/2
f 22/15/1 18/16/1 21/17/1 17/18/1
f 13/1/1 14/5/1 22/19/1 17/20/1
f 14/1/2 15/5/2 23/19/2 22/20/2
f 15/1/3 16/5/3 24/19/3 23/20/3
f 16/1/4 13/5/4 17/19/4 24/20/4
f 21/16/4 20/17/4 24/18/4 17/15/4

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB