@@ -253,17 +253,20 @@ local function select_new_target(cb)
253253 if # df .global .world .items .other .ANY_ARTIFACT > 0 then
254254 table.insert (choices , {text = ' An artifact' , data = {fn = select_artifact }})
255255 end
256+ if # df .global .world .units .all > 0 then
257+ table.insert (choices , {text = ' A unit' , data = {fn = select_unit }})
258+ end
256259 local site = dfhack .world .getCurrentSite ()
257260 local is_fort_mode = dfhack .world .isFortressMode ()
258261 local fort = is_fort_mode and df .historical_entity .find (df .global .plotinfo .group_id )
259262 local civ = is_fort_mode and df .historical_entity .find (df .global .plotinfo .civ_id )
260263 if site then
261- if # site .buildings > 0 then
262- table.insert (choices , {text = ' A location' , data = {fn = curry (select_location , site )}})
263- end
264264 if fort and # fort .squads > 0 then
265265 table.insert (choices , {text = ' A squad' , data = {fn = curry (select_squad , fort )}})
266266 end
267+ if # site .buildings > 0 then
268+ table.insert (choices , {text = ' A location' , data = {fn = curry (select_location , site )}})
269+ end
267270 table.insert (choices , {text = ' This fortress/site' , data = {fn = curry (select_site , site )}})
268271 end
269272 if fort then
@@ -272,10 +275,7 @@ local function select_new_target(cb)
272275 if civ then
273276 table.insert (choices , {text = ' The civilization of this fortress' , data = {fn = curry (select_entity , civ )}})
274277 end
275- if # df .global .world .units .all > 0 then
276- table.insert (choices , {text = ' A unit' , data = {fn = select_unit }})
277- end
278- table.insert (choices , {text = ' This world' , data = {fn = select_world }})
278+ table.insert (choices , {text = ' The world' , data = {fn = select_world }})
279279 dlg .showListPrompt (' Rename' , ' What would you like to rename?' , COLOR_WHITE ,
280280 choices , function (_ , choice ) choice .data .fn (cb ) end )
281281end
0 commit comments