torches are 2d only
This commit is contained in:
parent
fd8d05ecc4
commit
f0dfaca074
50
init.lua
50
init.lua
@ -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})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user