* Use correct mod name when registering nodes
This commit is contained in:
parent
3f6d4a112c
commit
73896d0a84
8
init.lua
8
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 " ..
|
||||
|
|
Loading…
Reference in New Issue