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:
Vanessa Ezekowitz 2014-07-18 10:22:44 -04:00
parent 9e6e26e1ed
commit 269db07a00
8 changed files with 69 additions and 26 deletions

View File

@ -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", {
collisionbox = { 0, 0, 0, 0, 0, 0 },
visual = "mesh",
@ -83,3 +141,5 @@ minetest.register_node("homedecor:desk_fan", {
entity_remove[1]:remove()
end,
})

View File

@ -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"}
},
})

View File

@ -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")

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B