Fix get_decoration handling of tables.
parent
51c624f507
commit
f19412556e
6
deco.lua
6
deco.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue