mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-10-31 23:12:39 +00:00
Allow more layers for banners with gradients
At some point in the past, Minetest had a bug that caused rendering issues with transparent textures, like those used for banner gradients. As a workaround, the number of allowed layers was reduced for banners containing gradients. The engine bug has since been fixed, but the limit was never removed. This commit removes the limit. See also: https://git.minetest.land/Mineclonia/Mineclonia/pulls/72#issuecomment-23564 and https://github.com/minetest/minetest/issues/6210
This commit is contained in:
parent
c9a8ef0ac2
commit
2feab24dd3
1 changed files with 0 additions and 13 deletions
|
@ -8,9 +8,6 @@ local N = function(s) return s end
|
|||
-- Maximum number of layers which can be put on a banner by crafting.
|
||||
local max_layers_crafting = 12
|
||||
|
||||
-- Maximum number of layers when banner includes a gradient (workaround, see below).
|
||||
local max_layers_gradient = 3
|
||||
|
||||
-- Max. number lines in the descriptions for the banner layers.
|
||||
-- This is done to avoid huge tooltips.
|
||||
local max_layer_lines = 6
|
||||
|
@ -398,16 +395,6 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i
|
|||
if #layers >= max_layers_crafting then
|
||||
return ItemStack("")
|
||||
end
|
||||
-- Lower layer limit when banner includes any gradient.
|
||||
-- Workaround to circumvent Minetest bug (https://github.com/minetest/minetest/issues/6210)
|
||||
-- TODO: Remove this restriction when bug #6210 is fixed.
|
||||
if #layers >= max_layers_gradient then
|
||||
for l=1, #layers do
|
||||
if layers[l].pattern == "gradient" or layers[l].pattern == "gradient_up" then
|
||||
return ItemStack("")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local matching_pattern
|
||||
local max_i = player:get_inventory():get_size("craft")
|
||||
|
|
Loading…
Reference in a new issue