* Use correct mod name when registering nodes

This commit is contained in:
Nils Dagsson Moskopp 2023-11-17 12:30:58 +01:00
parent 3f6d4a112c
commit 73896d0a84
Signed by: erlehmann
GPG Key ID: A3BC671C35191080
1 changed files with 5 additions and 3 deletions

View File

@ -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 " ..