|  |  | @ -6,6 +6,8 @@ local setbelief = reqscript('modtools/set-belief') | 
			
		
	
		
		
			
				
					
					|  |  |  | local utils = require('utils') |  |  |  | local utils = require('utils') | 
			
		
	
		
		
			
				
					
					|  |  |  | local widgets = require('gui.widgets') |  |  |  | local widgets = require('gui.widgets') | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | local GLOBAL_KEY = 'sort' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | local CH_UP = string.char(30) |  |  |  | local CH_UP = string.char(30) | 
			
		
	
		
		
			
				
					
					|  |  |  | local CH_DN = string.char(31) |  |  |  | local CH_DN = string.char(31) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1196,6 +1198,7 @@ local to_pen = dfhack.pen.parse | 
			
		
	
		
		
			
				
					
					|  |  |  | local DASH_PEN = to_pen{ch='-', fg=COLOR_WHITE, keep_lower=true} |  |  |  | local DASH_PEN = to_pen{ch='-', fg=COLOR_WHITE, keep_lower=true} | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | local FACE_TILES = {} |  |  |  | local FACE_TILES = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | local function init_face_tiles() | 
			
		
	
		
		
			
				
					
					|  |  |  |     for idx=0,6 do |  |  |  |     for idx=0,6 do | 
			
		
	
		
		
			
				
					
					|  |  |  |         FACE_TILES[idx] = {} |  |  |  |         FACE_TILES[idx] = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |         local face_off = (6 - idx) * 2 |  |  |  |         local face_off = (6 - idx) * 2 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1215,6 +1218,7 @@ for idx,color in ipairs{COLOR_RED, COLOR_LIGHTRED, COLOR_YELLOW, COLOR_WHITE, CO | 
			
		
	
		
		
			
				
					
					|  |  |  |         ensure_key(face, 1)[1] = to_pen{tile=FACE_TILES[idx-1][1][1], ch='/', fg=color} |  |  |  |         ensure_key(face, 1)[1] = to_pen{tile=FACE_TILES[idx-1][1][1], ch='/', fg=color} | 
			
		
	
		
		
			
				
					
					|  |  |  |         FACE_TILES[idx-1] = face |  |  |  |         FACE_TILES[idx-1] = face | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | function get_stress_face_tile(idx, x, y) |  |  |  | function get_stress_face_tile(idx, x, y) | 
			
		
	
		
		
			
				
					
					|  |  |  |     local elem = rating_annotations[idx] |  |  |  |     local elem = rating_annotations[idx] | 
			
		
	
	
		
		
			
				
					|  |  | @ -1261,6 +1265,14 @@ OVERLAY_WIDGETS = { | 
			
		
	
		
		
			
				
					
					|  |  |  |     squad_annotation=SquadAnnotationOverlay, |  |  |  |     squad_annotation=SquadAnnotationOverlay, | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | dfhack.onStateChange[GLOBAL_KEY] = function(sc) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if sc ~= SC_MAP_LOADED or df.global.gamemode ~= df.game_mode.DWARF then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     init_face_tiles() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | --[[ |  |  |  | --[[ | 
			
		
	
		
		
			
				
					
					|  |  |  | local utils = require('utils') |  |  |  | local utils = require('utils') | 
			
		
	
		
		
			
				
					
					|  |  |  | local units = require('plugins.sort.units') |  |  |  | local units = require('plugins.sort.units') | 
			
		
	
	
		
		
			
				
					|  |  | 
 |