From 269db07a00c1a99f9d6ba31ef283fc0de8b101d6 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 18 Jul 2014 10:22:44 -0400 Subject: [PATCH] add space heater rename fans.lua -> climate-control.lua and move air conditioner into it along with the new heater. --- homedecor/{fans.lua => climate-control.lua} | 60 ++++++++++++++++++ homedecor/crafts.lua | 8 +++ homedecor/init.lua | 2 +- homedecor/misc-nodes.lua | 25 -------- homedecor/textures/homedecor_heater_back.png | Bin 0 -> 442 bytes homedecor/textures/homedecor_heater_front.png | Bin 0 -> 551 bytes homedecor/textures/homedecor_heater_sides.png | Bin 0 -> 501 bytes homedecor/textures/homedecor_heater_tb.png | Bin 0 -> 436 bytes 8 files changed, 69 insertions(+), 26 deletions(-) rename homedecor/{fans.lua => climate-control.lua} (66%) create mode 100644 homedecor/textures/homedecor_heater_back.png create mode 100644 homedecor/textures/homedecor_heater_front.png create mode 100644 homedecor/textures/homedecor_heater_sides.png create mode 100644 homedecor/textures/homedecor_heater_tb.png diff --git a/homedecor/fans.lua b/homedecor/climate-control.lua similarity index 66% rename from homedecor/fans.lua rename to homedecor/climate-control.lua index 4d269f09..973cc499 100644 --- a/homedecor/fans.lua +++ b/homedecor/climate-control.lua @@ -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, }) + + diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index 6004b65f..80c9d38f 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -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"} + }, +}) diff --git a/homedecor/init.lua b/homedecor/init.lua index 3e323c4a..643906c1 100644 --- a/homedecor/init.lua +++ b/homedecor/init.lua @@ -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") diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index 4463a566..02db03ac 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.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 diff --git a/homedecor/textures/homedecor_heater_back.png b/homedecor/textures/homedecor_heater_back.png new file mode 100644 index 0000000000000000000000000000000000000000..149dd5cf09f9a513f976260c30dfc8e05e3e46e5 GIT binary patch literal 442 zcmV;r0Y(0aP)8n;5QO*VjuhlF=_LyG`@fN4S8mk_;_c3)SU7NH0%6=~DuM*|!_CZ+RFd+OGWlUW z01vP}e+Q`Q+uJ+9%yf4VlHzV- z40k7aKA(=q9Tu4xz{}-qrpt25L=6Raxh$lp>Mn~iv#fA;0KIn+A=!Jc(VJh~4FE}Z zzu)fw=6ME?84)2O1vax?EmBo?b9YrEnVDuj&$GMNnE>np0L(-kB{R)Tgky|#UDtIb z*_!VHm}&V?%@JXh$IRw=7Lm=Lo(;e>O{x+R5qUTqMD%kai@h2024IYliPoBk+-^5j z1yWU26`;HA&A`n5CRqWvw~B=1x{l2jZEy0Y#N9JNO7C4nD~WX-J6i-*t=AENGM%KV zW@c-x_qGe*?zPXE`E_sWqHb<@@O=%g*N@lN_wt8?h?;4w8vqf$ygWZW{oa+qvYgxv kpsJ{9nO2I3F*Y*z0~L_`E8!tPumAu607*qoM6N<$f>~6n0{o&d;|IuUNm(dsNa4(mUP_Cj?t5 zFLhlvO$z`|PgBqH9LHgd-Tbd^j7TXB08-NNSVd9j`!nC4EtiYq@d#iL(e`(L2Z+EJ zD~du&SyiW|X|y(4tG<_6mIpyF9*+hAh-kOlC&{v|n=lLjKx-X_AtLkrSy>+9I2r_S zU6)8z)v4<`V@%t2#%Ru2UDrw}A$qIx5DgUKU$qg@7>$UGaYO_FDW&VWgE{~J*Zma7 zF=IHN$JR4(91>9!g<9*OA~VLqFv#<~?|Xo3`002ovPDHLkV1j|E{80b^ literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_heater_sides.png b/homedecor/textures/homedecor_heater_sides.png new file mode 100644 index 0000000000000000000000000000000000000000..ffce09cf80d58f19ddc447dc240bf729d4eb5012 GIT binary patch literal 501 zcmVq1;P={IJ%Vs^a^4 zOoWK4l8BJLnIV<00ljy8R#ilpnW`=`$V^p@NO&^yaU7>FC?^2Ky4`M7#mo`m9t!~5 zsj3Ja5!j_mTQtVNh9GD}^lnRbnd$CexO)|e@YMUa^`kR@(cM(CadN-`r zRY2z7Y*7A^ort)5RkhYK3rlqs;O@+HZz$Te0MLC5sWpWvBjOSOJA-sowKaV_c^t#t zMP!VD@tWDG6x!)sbQ}ZOVc?I4%^EH%%n2nz5SM1~^0G0rdqC22&POpKsF^_xnR&HE rV@x87NMO+7MF-H}2T7roQzicf1JXd1QQAR-00000NkvXXu0mjfpmORM literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_heater_tb.png b/homedecor/textures/homedecor_heater_tb.png new file mode 100644 index 0000000000000000000000000000000000000000..88a7a270b1b7b406ad3e688d297f0349b072a1cf GIT binary patch literal 436 zcmV;l0ZaagP)<~4LZfZbAonwoCFEr<)z3&5mA0JP<}X`0{>n> zzJA{KU&nFOT18}xK}19}=Ums-%zE$Jw!OZ-J?=nNYpu0bRV}6DOf&Po?-9{jyW1jn zC!+H_0Yn6VIj6hVT8Rk27~_^e_Jo;BDYe$T5s`>U0THrxZOy{-8}dwl;v4p0&iQw)oG1Y9Ze|xH zK56>Dv*_dF9RL7T6_EtdoD+b1)G7eIyu3Xw03eexa}JEVFH3Wei0SS`e5*ywOhgeu zRF-8)3b}`>)moYPl0_E|%q$|ZURBF3sp`5e?w;#**MW!tlxy|5bm!S4!fYl79~S^% zW|^h6mOy1@W&l{0cGp4gJ^vv2a~wxRVaB$t?m1BNmOz3eB6{y;)>;E7qKu)c23(Wo e$)cyg{rC-{jsr5W@@S6$0000