generated from Descent/bombtest
Fix critical registration bug
This commit is contained in:
parent
2bc80c9e49
commit
8f563c8dfb
18
register.lua
18
register.lua
|
@ -4,7 +4,7 @@ paintings_texture = {}
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register1x1(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:1x1_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:1x1_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["1x1"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -28,7 +28,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register1x2(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:1x2_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:1x2_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["1x2"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -52,7 +52,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register2x1(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:2x1_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:2x1_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["2x1"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -76,7 +76,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register2x2(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:2x2_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:2x2_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["2x2"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -100,7 +100,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register3x2(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:3x2_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:3x2_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["3x2"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -124,7 +124,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register3x3(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:3x3_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:3x3_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["3x3"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -148,7 +148,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register4x2(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:4x2_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:4x2_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["4x2"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -172,7 +172,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register4x3(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:4x3_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:4x3_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["4x3"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
@ -196,7 +196,7 @@ end
|
|||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register4x4(identifier, display_name, texture)
|
||||
local node_name = ":paintings_lib:4x4_"..display_name:gsub("%s+", "_")
|
||||
local node_name = ":paintings_lib:4x4_"..identifier:gsub("%s+", "_")
|
||||
paintings_name[identifier] = paintings_name[identifier] or {}
|
||||
paintings_name[identifier]["4x4"] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
|
Loading…
Reference in New Issue