mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 08:20:21 +01:00
add space heater
rename fans.lua -> climate-control.lua and move air conditioner into it along with the new heater.
This commit is contained in:
parent
9e6e26e1ed
commit
269db07a00
@ -1,3 +1,61 @@
|
|||||||
|
-- Nodes that would affect the local temperature e.g. fans, heater, A/C
|
||||||
|
|
||||||
|
local S = homedecor.gettext
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:air_conditioner', {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
description = S("Air Conditioner"),
|
||||||
|
tiles = { 'homedecor_ac_tb.png',
|
||||||
|
'homedecor_ac_tb.png',
|
||||||
|
'homedecor_ac_sides.png',
|
||||||
|
'homedecor_ac_sides.png',
|
||||||
|
'homedecor_ac_back.png',
|
||||||
|
'homedecor_ac_front.png'},
|
||||||
|
sunlight_propagates = false,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0.124, 0.5 }, -- off by just a tad to force the adjoining faces to be drawn.
|
||||||
|
{-0.5, 0.125, -0.5, 0.5, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_box = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node('homedecor:space_heater', {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
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'},
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
walkable = true,
|
||||||
|
groups = { snappy = 3 },
|
||||||
|
sounds = default.node_sound_leaves_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}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- fans
|
||||||
|
|
||||||
minetest.register_entity("homedecor:mesh_desk_fan", {
|
minetest.register_entity("homedecor:mesh_desk_fan", {
|
||||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -83,3 +141,5 @@ minetest.register_node("homedecor:desk_fan", {
|
|||||||
entity_remove[1]:remove()
|
entity_remove[1]:remove()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -2090,3 +2090,11 @@ minetest.register_craft( {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "homedecor:space_heater",
|
||||||
|
recipe = {
|
||||||
|
{"homedecor:plastic_sheeting", "homedecor:heating_element", "homedecor:plastic_sheeting"},
|
||||||
|
{"homedecor:plastic_sheeting", "homedecor:fan_blades", "homedecor:motor"},
|
||||||
|
{"homedecor:plastic_sheeting", "homedecor:heating_element", "homedecor:plastic_sheeting"}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
@ -99,7 +99,7 @@ dofile(homedecor.modpath.."/furniture.lua")
|
|||||||
dofile(homedecor.modpath.."/furniture_medieval.lua")
|
dofile(homedecor.modpath.."/furniture_medieval.lua")
|
||||||
dofile(homedecor.modpath.."/furniture_bathroom.lua")
|
dofile(homedecor.modpath.."/furniture_bathroom.lua")
|
||||||
dofile(homedecor.modpath.."/furniture_recipes.lua")
|
dofile(homedecor.modpath.."/furniture_recipes.lua")
|
||||||
dofile(homedecor.modpath.."/fans.lua")
|
dofile(homedecor.modpath.."/climate-control.lua")
|
||||||
|
|
||||||
dofile(homedecor.modpath.."/locked.lua")
|
dofile(homedecor.modpath.."/locked.lua")
|
||||||
|
|
||||||
|
@ -253,31 +253,6 @@ for c in ipairs(curtaincolors) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node('homedecor:air_conditioner', {
|
|
||||||
drawtype = "nodebox",
|
|
||||||
description = S("Air Conditioner"),
|
|
||||||
tiles = { 'homedecor_ac_tb.png',
|
|
||||||
'homedecor_ac_tb.png',
|
|
||||||
'homedecor_ac_sides.png',
|
|
||||||
'homedecor_ac_sides.png',
|
|
||||||
'homedecor_ac_back.png',
|
|
||||||
'homedecor_ac_front.png'},
|
|
||||||
sunlight_propagates = false,
|
|
||||||
paramtype = "light",
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
walkable = true,
|
|
||||||
groups = { snappy = 3 },
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.124, 0.5 }, -- off by just a tad to force the adjoining faces to be drawn.
|
|
||||||
{-0.5, 0.125, -0.5, 0.5, 0.5, 0.5 },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
||||||
})
|
|
||||||
|
|
||||||
local welcome_mat_colors = { "green", "brown", "grey" }
|
local welcome_mat_colors = { "green", "brown", "grey" }
|
||||||
|
|
||||||
for _, color in ipairs(welcome_mat_colors) do
|
for _, color in ipairs(welcome_mat_colors) do
|
||||||
|
BIN
homedecor/textures/homedecor_heater_back.png
Normal file
BIN
homedecor/textures/homedecor_heater_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 442 B |
BIN
homedecor/textures/homedecor_heater_front.png
Normal file
BIN
homedecor/textures/homedecor_heater_front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 551 B |
BIN
homedecor/textures/homedecor_heater_sides.png
Normal file
BIN
homedecor/textures/homedecor_heater_sides.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 501 B |
BIN
homedecor/textures/homedecor_heater_tb.png
Normal file
BIN
homedecor/textures/homedecor_heater_tb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 436 B |
Loading…
Reference in New Issue
Block a user