mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 23:03:45 +01:00
Add check to update pre 0.84.0 Ominous Banners
This commit is contained in:
parent
739a894856
commit
37fe58ab45
@ -493,6 +493,16 @@ for colorid, colortab in pairs(mcl_banners.colors) do
|
||||
end
|
||||
end
|
||||
|
||||
-- Update old pre 0.84.0 Ominous Banners with correct description.
|
||||
local stackmeta = itemstack:get_meta()
|
||||
if stackmeta:get_string("name"):find("Ominous Banner") then
|
||||
local oban_layers = minetest.deserialize(stackmeta:get_string("layers"))
|
||||
local banner_description = string.gsub(itemstack:get_definition().description, "White Banner", "Ominous Banner")
|
||||
local description = mcl_banners.make_advanced_banner_description(banner_description, oban_layers)
|
||||
stackmeta:set_string("description", description)
|
||||
stackmeta:set_string("name", nil)
|
||||
end
|
||||
|
||||
-- Place the node!
|
||||
local hanging = false
|
||||
|
||||
|
@ -76,3 +76,4 @@ You can copy the pattern of a banner by placing two banners of the same color in
|
||||
And one additional layer=
|
||||
And @1 additional layers=
|
||||
Paintable decoration=
|
||||
Ominous Banner=
|
||||
|
Loading…
Reference in New Issue
Block a user