1 Add check for strings in decoration place_on def

master^2
Juraj Vajda 2021-05-29 14:51:16 -04:00
parent 8219352878
commit 578ee3d741
1 changed files with 6 additions and 2 deletions

View File

@ -397,8 +397,12 @@ function x_farming.x_bonemeal.grow_grass_and_flowers(itemstack, user, pointed_th
-- all nodes on which decoration can be placed on
-- indexed by name
if not decor_place_on[v.place_on] then
for k, v in ipairs(v.place_on) do
decor_place_on[v] = true
if type(v.place_on) == "string" then
decor_place_on[v.place_on] = true
elseif type(v.place_on) == "table" then
for k, v in ipairs(v.place_on) do
decor_place_on[v] = true
end
end
end
end