From 961943019cab54032ecae3a4369e18843f3e61d8 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Tue, 25 Sep 2012 18:33:25 -0400 Subject: [PATCH] Television has been moved to a separate file and now shows an 8-image slideshow, similar to Jordach's old TV mod, but using the game's animated texture feature and a vertical strip of images instead of an ABM. Animation time set for 80 seconds, so each of the 8 images shows for 10 seconds. --- init.lua | 19 +----------- television.lua | 27 ++++++++++++++++++ .../homedecor_television_front_animated.png | Bin 0 -> 3406 bytes 3 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 television.lua create mode 100644 textures/homedecor_television_front_animated.png diff --git a/init.lua b/init.lua index cd7ec55..1b5ea12 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 0000000..783bd7b --- /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 0000000000000000000000000000000000000000..6347b8ce3b7400eea6ffaedacff802a435304045 GIT binary patch literal 3406 zcmV-U4YBfxP)J-lZU#F_bl`B^U zg8}?{kvuv~UM z%XK*-#)%S%ieni|87U={PNY%NKzp|ezyTob@M6KsPNltK3V=lZc+eezR;a;%F-9w+ zwLxMud;xGyESF|aEjbrn0|L&@yQp?eBtc3;P=Qfs3>u+k|X9x_8 zky)O%%k#kSbw>@CR|zj|Z_HMiPK>0Jyo= z9k-*rMGCjKIimrvP9lRu%@#e*>0>|c1%guE7{mZs4giLd5$ZsgLBK{)(3X)vG7@<0 zpwBJFC|NEzOF8G(;Se%e4gd{5h{8w+l>!ng)rdvLvk7I5Q4(pLD?z8tcAMkIILTyy z1HeIN#0jwoWNfMch6%Ql7zoh@4U$o;TZtSGV#Y`YfC9j)Klr_&G6QK^k#2>0taK<% zAatTkB2BLi@rZIxe)osJ4*+CsZ4Lf6K>;9@O8vLbFXM~X?XPYF09jgE`Y*r#hX})v zODTVSc>@4nUS9sc_~Flf{&NHX00IC220#G-fJG)>fWR+)@#ocQ71q|)Zf|Uah-1VE zQ6Ywib;NDN`-n$~KH?B@fOu_VV{L7X1HdOoe$DARoDwvekU*$dnOG>LjWz~_l#xh; ztREgs)cWqPZj|meDPSB&u{3caC}>oQqE=I6X57zH}d<&Xibcz!%#rl zwOz-yIa5Mo6eXh$a(8jI^zaLSCF6qe5E0U8Ou$l6(K1p-am-v!7v{4rnGGUU^7I6l z$@1BSDa&!jqtSy-gsA;687JED(v}cRCZ{U-7_9yM{Ygq7gHGevvYm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