-- use "exportlegends maps" for detailed maps, or "exportlegends all" to also export legends
gui=require'gui'
localargs={...}
localvs=dfhack.gui.getCurViewscreen()
locali=0
ifargs[1]thenprint(' A script which exports data from legends mode. Valid arguments are "maps" (detailed maps) or "all" (detailed maps, world/gen info, XML).')end
locali=1
localMAPS={
[0]="Standard biome+site map",
"Standard biome+site map",
"Elevations including lake and ocean floors",
"Elevations respecting water level",
"Biome",
@ -27,12 +23,14 @@ local MAPS = {
"Salinity",
"Structures/fields/roads/etc.",
"Trade",
"Nobility and Holdings",
"Diplomacy",
}
functionwait_for_legends_vs()
vs=dfhack.gui.getCurViewscreen()
ifi<15then
ifi<= #MAPSthen
ifdf.viewscreen_legendsst:is_instance(vs)then
gui.simulateInput(vs,'LEGENDS_EXPORT_DETAILED_MAP')-- "d" on screen some number internally