Skip to content
Snippets Groups Projects
Commit f1941255 authored by Duane Robertson's avatar Duane Robertson
Browse files

Fix get_decoration handling of tables.

parent 51c624f5
No related branches found
No related tags found
No related merge requests found
......@@ -376,7 +376,11 @@ local function get_decoration(biome_name)
if not deco.biomes or deco.biomes[biome_name] then
if deco.deco_type == "simple" then
if deco.fill_ratio and math.random(1000) - 1 < deco.fill_ratio * 1000 then
return deco.decoration
if type(deco.decoration) == 'string' then
return deco.decoration
elseif type(deco.decoration) == 'table' then
return deco.decoration[math.random(#deco.decoration)]
end
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment