diff --git a/init.lua b/init.lua index da8d3f0..e1473ce 100644 --- a/init.lua +++ b/init.lua @@ -14,9 +14,11 @@ it is easy to understand the generated images with a hexdump. ]]-- -local S = minetest.get_translator("testnodes") +local modname = minetest.get_current_modname() -local textures_path = minetest.get_modpath( minetest.get_current_modname() ) .. "/textures/" +local S = minetest.get_translator( modname ) + +local textures_path = minetest.get_modpath( modname ) .. "/textures/" function encode_tga_type_3(w, h, ...) assert((w <= 256) and (h <= 256) and (w * h == #{...})) @@ -59,7 +61,7 @@ function generate_checkerboard_node(width, height, wtiles, htiles) textures_path .. filename, encode_tga_type_3(width, height, unpack(pixels)) ) - local nodename = "testnodes:" .. id + local nodename = modname .. ":" .. id minetest.register_node(nodename, { description = S( "Checkerboard Test Node " ..