Merge pull request #45 from MorpheusXAUT/development

isTerrainValid validation for terrain types table fails with multiple entries
This commit is contained in:
mrSkortch 2020-06-22 03:06:08 -06:00 committed by GitHub
commit 50ddf1f337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6904,7 +6904,7 @@ do -- group tasks scope
elseif type(terrainTypes) == 'table' then -- if its a table it does this check elseif type(terrainTypes) == 'table' then -- if its a table it does this check
for typeId, typeData in pairs(terrainTypes) do for typeId, typeData in pairs(terrainTypes) do
for constId, constData in pairs(land.SurfaceType) do for constId, constData in pairs(land.SurfaceType) do
if string.lower(constId) == string.lower(typeData) or string.lower(constData) == string.lower(typeId) then if string.lower(constId) == string.lower(typeData) or string.lower(constData) == string.lower(typeData) then
table.insert(typeConverted, constId) table.insert(typeConverted, constId)
end end
end end