diff --git a/init.lua b/init.lua index 5e5bd23..0876b94 100644 --- a/init.lua +++ b/init.lua @@ -29,8 +29,58 @@ minetest.register_node("real_torch:torch", { }) -- override default torches to burn out after 8-10 minutes +-- also converts 3D torches back into 2D. 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) local p2 = minetest.get_node(pos).param2 minetest.set_node(pos, {name = "real_torch:torch", param2 = p2}) diff --git a/readme.md b/readme.md index a05bdf8..1b1d4f2 100644 --- a/readme.md +++ b/readme.md @@ -11,3 +11,4 @@ Changelog: - 0.1 - Initial upload - 0.2 - Punching unlit torch with coal powder relights torch +- 0.3 - Torches are 2D and override any that are 3D