diff --git a/init.lua b/init.lua index cd7ec552..1b5ea12c 100644 --- a/init.lua +++ b/init.lua @@ -13,6 +13,7 @@ -- License: GPL -- +dofile(minetest.get_modpath("homedecor").."/television.lua") dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua") dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua") dofile(minetest.get_modpath("homedecor").."/exterior_door_fancy.lua") @@ -273,24 +274,6 @@ minetest.register_node("homedecor:table_legs_wrought_iron", { walkable = true, }) -minetest.register_node('homedecor:television', { - description = "Small CRT Television", - tiles = { 'homedecor_television_top.png', - 'homedecor_television_bottom.png', - 'homedecor_television_right.png', - 'homedecor_television_left.png', - 'homedecor_television_back.png', - 'homedecor_television_front.png'}, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, - light_source = LIGHT_MAX - 1, - groups = { snappy = 3 }, - sounds = default.node_sound_leaves_defaults(), -}) - - minetest.register_node('homedecor:stereo', { description = "Stereo Receiver", tiles = { 'homedecor_stereo_top.png', diff --git a/television.lua b/television.lua new file mode 100644 index 00000000..783bd7b2 --- /dev/null +++ b/television.lua @@ -0,0 +1,27 @@ +-- This file provides a semi-animated television. + +minetest.register_node('homedecor:television', { + description = "Small CRT Television", + tiles = { 'homedecor_television_top.png', + 'homedecor_television_bottom.png', + 'homedecor_television_right.png', + 'homedecor_television_left.png', + 'homedecor_television_back.png', + { name="homedecor_television_front_animated.png", + animation={ + type="vertical_frames", + aspect_w=16, + aspect_h=16, + length=80.0 + } + } + }, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + light_source = LIGHT_MAX - 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), +}) + diff --git a/textures/homedecor_television_front_animated.png b/textures/homedecor_television_front_animated.png new file mode 100644 index 00000000..6347b8ce Binary files /dev/null and b/textures/homedecor_television_front_animated.png differ