mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-07 18:40:51 +02:00
fix hard-coded drop
This commit is contained in:
@ -46,14 +46,16 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
|||||||
|
|
||||||
for _, name in pairs(default_nodes) do
|
for _, name in pairs(default_nodes) do
|
||||||
local nodename = "default:"..name
|
local nodename = "default:"..name
|
||||||
if string.find(name, ":") then
|
local a,b = string.find(name, ":")
|
||||||
|
if b then
|
||||||
nodename = name
|
nodename = name
|
||||||
|
name = string.sub(name, b+1)
|
||||||
end
|
end
|
||||||
local ndef = minetest.registered_nodes[nodename]
|
local ndef = minetest.registered_nodes[nodename]
|
||||||
if ndef then
|
if ndef then
|
||||||
local drop
|
local drop
|
||||||
if type(ndef.drop) == "string" then
|
if type(ndef.drop) == "string" then
|
||||||
drop = ndef.drop:sub(9)
|
drop = ndef.drop:sub((b or 8)+1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local tiles = ndef.tiles
|
local tiles = ndef.tiles
|
||||||
|
Reference in New Issue
Block a user