diff --git a/README.md b/README.md index b0ed219..ee8a218 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # 2D Torches [2d_torches] Simple mod for MTG that makes default torches look 2D (just like in older versions) +**Depends:** default +**Optional depends:** real_torch + +![Screenshot](screenshot.png) + ## License Code is licensed under Unlicense. See LICENSE file or for details. Thanks. diff --git a/init.lua b/init.lua index ffbe695..69dce3f 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ +-- Support for default torches minetest.override_item("default:torch", { drawtype = "torchlike", mesh = "", @@ -18,3 +19,26 @@ minetest.override_item("default:torch_ceiling", { animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} }}, }) + +-- Support for Real Torches mod +-- +-- NOTE: it's true that real_torch mod has 2D version, +-- but it's used ONLY on old Minetest Game versions, +-- before 3D torches were added. +-- +if minetest.get_modpath("real_torch") then + minetest.override_item("real_torch:torch", { + drawtype = "torchlike", + mesh = "", + }) + minetest.override_item("real_torch:torch_wall", { + drawtype = "torchlike", + mesh = "", + tiles = {"real_torch_wall.png"}, + }) + minetest.override_item("real_torch:torch_ceiling", { + drawtype = "torchlike", + mesh = "", + tiles = {"real_torch_ceiling.png"}, + }) +end diff --git a/mod.conf b/mod.conf index 401d28e..51f7287 100644 --- a/mod.conf +++ b/mod.conf @@ -1,2 +1,4 @@ name = 2d_torches +description = Replaces 3D torches with "retro" 2D ones depends = default +optional_depends = real_torch diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..54e6e1a Binary files /dev/null and b/screenshot.png differ