mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-11-17 12:55:28 +01:00
Drop paramtype2 from glass before registering.
Fix minetest-mods/moreblocks#98 Caused bycf1b054a99,6a996eb86aand minetest/minetest_game@2f46103ff8. For some unknown reason `default:glass` and `obsidian:glass` have `paramtype2 = "glasslikeliquidlevel"`. After the refactor of `stairsplus/registrations.lua`, all of the source node's defs are passed along to `stairsplus:register_all()`. Prior tocf1b054a99the paramtype2 setting was discarded.
This commit is contained in:
@@ -62,9 +62,10 @@ for _, name in pairs(default_nodes) do
|
|||||||
ndef.drop = ndef.drop:gsub(".+:", "")
|
ndef.drop = ndef.drop:gsub(".+:", "")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Use the primary tile for all sides of cut glasslike nodes.
|
-- Use the primary tile for all sides of cut glasslike nodes and disregard paramtype2.
|
||||||
if #ndef.tiles > 1 and ndef.drawtype and ndef.drawtype:find("glass") then
|
if #ndef.tiles > 1 and ndef.drawtype and ndef.drawtype:find("glass") then
|
||||||
ndef.tiles = {ndef.tiles[1]}
|
ndef.tiles = {ndef.tiles[1]}
|
||||||
|
ndef.paramtype2 = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
stairsplus:register_all("moreblocks", name, nodename, ndef)
|
stairsplus:register_all("moreblocks", name, nodename, ndef)
|
||||||
|
|||||||
Reference in New Issue
Block a user