|
|
|
@ -48,21 +48,21 @@ function findEntity(id)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function table.contains(table, element)
|
|
|
|
|
for _, value in pairs(table) do
|
|
|
|
|
if value == element then
|
|
|
|
|
return true
|
|
|
|
|
for _, value in pairs(table) do
|
|
|
|
|
if value == element then
|
|
|
|
|
return true
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
return false
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function table.containskey(table, key)
|
|
|
|
|
for value, _ in pairs(table) do
|
|
|
|
|
if value == key then
|
|
|
|
|
return true
|
|
|
|
|
for value, _ in pairs(table) do
|
|
|
|
|
if value == key then
|
|
|
|
|
return true
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
return false
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--create an extra legends xml with extra data, by Mason11987 for World Viewer
|
|
|
|
@ -582,4 +582,4 @@ elseif args[1] == "maps" and
|
|
|
|
|
wait_for_export_maps_vs()
|
|
|
|
|
else
|
|
|
|
|
dfhack.printerr('Exportlegends must be run from the main legends view')
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|