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
localMAPS={
localMAPS={
[0]="Standard biome+site map",
"Standard biome+site map",
"Elevations including lake and ocean floors",
"Elevations including lake and ocean floors",
"Elevations respecting water level",
"Elevations respecting water level",
"Biome",
"Biome",
@ -27,12 +23,14 @@ local MAPS = {
"Salinity",
"Salinity",
"Structures/fields/roads/etc.",
"Structures/fields/roads/etc.",
"Trade",
"Trade",
"Nobility and Holdings",
"Diplomacy",
}
}
functionwait_for_legends_vs()
functionwait_for_legends_vs()
vs=dfhack.gui.getCurViewscreen()
vs=dfhack.gui.getCurViewscreen()
ifi<15then
ifi<= #MAPSthen
ifdf.viewscreen_legendsst:is_instance(vs)then
ifdf.viewscreen_legendsst:is_instance(vs)then
gui.simulateInput(vs,'LEGENDS_EXPORT_DETAILED_MAP')-- "d" on screen some number internally