torches are 2d only

This commit is contained in:
TenPlus1 2016-11-17 10:53:05 +00:00
parent fd8d05ecc4
commit f0dfaca074
2 changed files with 51 additions and 0 deletions

View File

@ -29,8 +29,58 @@ minetest.register_node("real_torch:torch", {
}) })
-- override default torches to burn out after 8-10 minutes -- override default torches to burn out after 8-10 minutes
-- also converts 3D torches back into 2D.
minetest.override_item("default:torch", { minetest.override_item("default:torch", {
description = "Torch",
drawtype = "torchlike",
tiles = {
{
name = "default_torch_on_floor_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0
},
},
{
name="default_torch_on_ceiling_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0
},
},
{
name="default_torch_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 3.0
},
},
},
inventory_image = "default_torch_on_floor.png",
wield_image = "default_torch_on_floor.png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
is_ground_content = false,
walkable = false,
light_source = default.LIGHT_MAX - 1,
selection_box = {
type = "wallmounted",
wall_top = {-0.1, 0.5 - 0.6, -0.1, 0.1, 0.5, 0.1},
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5 + 0.6, 0.1},
wall_side = {-0.5, -0.3, -0.1, -0.5 + 0.3, 0.3, 0.1},
},
groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
on_timer = function(pos, elapsed) on_timer = function(pos, elapsed)
local p2 = minetest.get_node(pos).param2 local p2 = minetest.get_node(pos).param2
minetest.set_node(pos, {name = "real_torch:torch", param2 = p2}) minetest.set_node(pos, {name = "real_torch:torch", param2 = p2})

View File

@ -11,3 +11,4 @@ Changelog:
- 0.1 - Initial upload - 0.1 - Initial upload
- 0.2 - Punching unlit torch with coal powder relights torch - 0.2 - Punching unlit torch with coal powder relights torch
- 0.3 - Torches are 2D and override any that are 3D