|
|
@ -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
|
|
|
@ -582,4 +582,4 @@ elseif args[1] == "maps" and
|
|
|
|
wait_for_export_maps_vs()
|
|
|
|
wait_for_export_maps_vs()
|
|
|
|
else
|
|
|
|
else
|
|
|
|
dfhack.printerr('Exportlegends must be run from the main legends view')
|
|
|
|
dfhack.printerr('Exportlegends must be run from the main legends view')
|
|
|
|
end
|
|
|
|
end
|
|
|
|