Skip to content
Snippets Groups Projects
Commit 269db07a authored by Vanessa Ezekowitz's avatar Vanessa Ezekowitz
Browse files

add space heater

rename fans.lua -> climate-control.lua and move air conditioner into it
along with the new heater.
parent 9e6e26e1
No related branches found
No related tags found
No related merge requests found
-- 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", {
collisionbox = { 0, 0, 0, 0, 0, 0 },
visual = "mesh",
......@@ -83,3 +141,5 @@ minetest.register_node("homedecor:desk_fan", {
entity_remove[1]:remove()
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_bathroom.lua")
dofile(homedecor.modpath.."/furniture_recipes.lua")
dofile(homedecor.modpath.."/fans.lua")
dofile(homedecor.modpath.."/climate-control.lua")
dofile(homedecor.modpath.."/locked.lua")
......
......@@ -253,31 +253,6 @@ for c in ipairs(curtaincolors) do
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" }
for _, color in ipairs(welcome_mat_colors) do
......
homedecor/textures/homedecor_heater_back.png

442 B

homedecor/textures/homedecor_heater_front.png

551 B

homedecor/textures/homedecor_heater_sides.png

501 B

homedecor/textures/homedecor_heater_tb.png

436 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment