|
|
@ -48,21 +48,21 @@ function findEntity(id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function table.contains(table, element)
|
|
|
|
function table.contains(table, element)
|
|
|
|
for _, value in pairs(table) do
|
|
|
|
for _, value in pairs(table) do
|
|
|
|
if value == element then
|
|
|
|
if value == element then
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function table.containskey(table, key)
|
|
|
|
function table.containskey(table, key)
|
|
|
|
for value, _ in pairs(table) do
|
|
|
|
for value, _ in pairs(table) do
|
|
|
|
if value == key then
|
|
|
|
if value == key then
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--create an extra legends xml with extra data, by Mason11987 for World Viewer
|
|
|
|
--create an extra legends xml with extra data, by Mason11987 for World Viewer
|
|
|
|