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.
This commit is contained in:
Vanessa Ezekowitz 2012-09-25 18:33:25 -04:00
parent 9d0e238f84
commit 961943019c
3 changed files with 28 additions and 18 deletions

View File

@ -13,6 +13,7 @@
-- License: GPL -- License: GPL
-- --
dofile(minetest.get_modpath("homedecor").."/television.lua")
dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua") dofile(minetest.get_modpath("homedecor").."/foldingdoors_oak.lua")
dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua") dofile(minetest.get_modpath("homedecor").."/foldingdoors_mahogany.lua")
dofile(minetest.get_modpath("homedecor").."/exterior_door_fancy.lua") dofile(minetest.get_modpath("homedecor").."/exterior_door_fancy.lua")
@ -273,24 +274,6 @@ minetest.register_node("homedecor:table_legs_wrought_iron", {
walkable = true, 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', { minetest.register_node('homedecor:stereo', {
description = "Stereo Receiver", description = "Stereo Receiver",
tiles = { 'homedecor_stereo_top.png', tiles = { 'homedecor_stereo_top.png',

27
television.lua Normal file
View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB