@@ -4,6 +4,8 @@ local gui = require('gui')
44local widgets = require (' gui.widgets' )
55
66local roads = reqscript (' internal/export-world-map/export-roads' )
7+ local layers = reqscript (' internal/export-world-map/export-layers' )
8+ local pops = reqscript (' internal/export-world-map/export-pops' )
79
810--- @type df.viewscreen_choose_start_sitest
911local viewscreen = dfhack .gui .getDFViewscreen (true )
@@ -80,8 +82,6 @@ local function invokeExport(by_world, by_date, fn)
8082end
8183
8284function ExportMap :startExports ()
83- self .subviews .indicator_label :setText (" working ..." )
84-
8585 local by_date = self .subviews .by_date :getOptionValue ()
8686 local by_world = by_date or self .subviews .by_world :getOptionValue ()
8787
@@ -90,8 +90,6 @@ function ExportMap:startExports()
9090 invokeExport (by_world , by_date , export .command )
9191 end
9292 end
93-
94- self .subviews .indicator_label :setText (" " )
9593end
9694
9795--- launch command from the C++ plugin
@@ -109,7 +107,9 @@ exports = {
109107 { id = 2 , key = ' rivers' , desc = ' River Export (rivers.csv)' , enabled = true , command = pluginCommand (" rivers" ) },
110108 { id = 3 , key = ' sites' , desc = ' Site Export (sites.csv)' , enabled = true , command = pluginCommand (" sites" ) },
111109 { id = 4 , key = ' elevation' , desc = ' Elevation Grid Export (elevation.dat, elevation.vrt)' , enabled = true , command = pluginCommand (" elevation" ) },
112- { id = 5 , key = ' roads' , desc = ' Road Export (roads.geojson)' , enabled = true , command = roads .export }
110+ { id = 5 , key = ' roads' , desc = ' Road Export (roads.geojson)' , enabled = true , command = roads .export },
111+ { id = 6 , key = ' layers' , desc = ' Export Geological Layers (layers.csv)' , enabled = true , command = layers .export },
112+ { id = 7 , key = ' pops' , desc = ' Export Plant and Animal Populations (*_pops.csv)' , enabled = true , command = pops .export }
113113}
114114
115115local SELECTED_ICON = dfhack .pen .parse {ch = string.char (251 ), fg = COLOR_LIGHTGREEN }
@@ -158,7 +158,7 @@ function ExportMap:init()
158158 text = " Select exports to place in dfhack-config/map-export:" ,
159159 },
160160 widgets .List {
161- frame = {t = 9 , h = 6 },
161+ frame = {t = 9 , h = 7 },
162162 view_id = " export_list" ,
163163 on_submit = self :callback (" toggleExport" ),
164164 icon_width = 2 ,
@@ -167,7 +167,7 @@ function ExportMap:init()
167167 widgets .CycleHotkeyLabel {
168168 view_id = ' by_world' ,
169169 key = ' CUSTOM_W' ,
170- frame = { w = 40 , h = 1 , t = 15 , l = 0 },
170+ frame = { w = 40 , h = 1 , t = 17 , l = 0 },
171171 options = { { label = ' Yes' , value = true , pen = COLOR_LIGHTGREEN }, { label = ' No' , value = false } },
172172 initial_option = false ,
173173 label = " Create folder for world name" ,
@@ -180,7 +180,7 @@ function ExportMap:init()
180180 widgets .CycleHotkeyLabel {
181181 view_id = ' by_date' ,
182182 key = ' CUSTOM_D' ,
183- frame = { w = 40 , h = 1 , t = 16 , l = 0 },
183+ frame = { w = 40 , h = 1 , t = 18 , l = 0 },
184184 options = { { label = ' Yes' , value = true , pen = COLOR_LIGHTGREEN }, { label = ' No' , value = false } },
185185 initial_option = false ,
186186 label = " Create subfolder for world date" ,
@@ -191,18 +191,13 @@ function ExportMap:init()
191191 end
192192 },
193193 widgets .TextButton {
194- frame = { w = 18 , h = 1 , t = 18 },
194+ frame = { w = 18 , h = 1 , t = 20 },
195195 label = " Run Map Exports!" ,
196196 on_click = self :callback (' startExports' ),
197197 enabled = function ()
198198 local cur ,max = getLoadedTileRatio ()
199199 return cur == max
200200 end
201- },
202- widgets .Label {
203- view_id = ' indicator_label' ,
204- frame = { t = 20 , h = 1 },
205- text = " "
206201 }
207202 }
208203 self :updateRatio ()
0 commit comments