Fix get_decoration handling of tables.

master
Duane Robertson 2017-09-14 23:05:03 -05:00
parent 51c624f507
commit f19412556e
1 changed files with 5 additions and 1 deletions

View File

@ -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