diff options
Diffstat (limited to 'stairsplus')
| -rw-r--r-- | stairsplus/registrations.lua | 36 | 
1 files changed, 19 insertions, 17 deletions
diff --git a/stairsplus/registrations.lua b/stairsplus/registrations.lua index 7b38b13..c6111c4 100644 --- a/stairsplus/registrations.lua +++ b/stairsplus/registrations.lua @@ -35,24 +35,26 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:  for _, name in pairs(default_nodes) do  	local nodename = "default:" .. name  	local ndef = minetest.registered_nodes[nodename] -	local groups = {} -	for k, v in pairs(ndef.groups) -		-- Ignore wood and stone groups to not make them usable in crafting: -		do if k ~= "wood" and k ~= "stone" then -			groups[k] = v +	if ndef then +		local groups = {} +		for k, v in pairs(ndef.groups) +			-- Ignore wood and stone groups to not make them usable in crafting: +			do if k ~= "wood" and k ~= "stone" then +				groups[k] = v +			end  		end +		local drop +		if type(ndef.drop) == "string" then +			drop = ndef.drop:sub(9) +		end +		stairsplus:register_all("moreblocks", name, nodename, { +			description = ndef.description, +			drop = drop, +			groups = groups, +			sounds = ndef.sounds, +			tiles = ndef.tiles, +			sunlight_propagates = true, +		})  	end -	local drop -	if type(ndef.drop) == "string" then -		drop = ndef.drop:sub(9) -	end -	stairsplus:register_all("moreblocks", name, nodename, { -		description = ndef.description, -		drop = drop, -		groups = groups, -		sounds = ndef.sounds, -		tiles = ndef.tiles, -		sunlight_propagates = true, -	})  end  | 
