Browse Source

Color point values in MDT output

pull/2/head
Brandon Cornejo 6 years ago
parent
commit
67ee58d27b
  1. 4
      src/mdtparse.py

4
src/mdtparse.py

@ -66,6 +66,7 @@ class MapDoorText:
# http://terminal-color-builder.mudasobwa.ru/ # http://terminal-color-builder.mudasobwa.ru/
"orange": "\033[01;38;05;214m", "orange": "\033[01;38;05;214m",
"red": "\033[01;38;05;196m", "red": "\033[01;38;05;196m",
"cyan": "\033[01;38;05;37m",
"reset": "\033[00;39;49m" "reset": "\033[00;39;49m"
} }
@ -286,6 +287,9 @@ class MapDoorText:
# Only show if this room meets the minimum value # Only show if this room meets the minimum value
if square[3] >= self.minimum_room_value: if square[3] >= self.minimum_room_value:
done_here = False done_here = False
# add colour to points output
square[3] = '{}{}{}'.format(self.colour_map['cyan'], square[3], self.colour_map['reset'])
fstring = '{{:<{}}} [{{}}] '.format(data['longest_direction']) fstring = '{{:<{}}} [{{}}] '.format(data['longest_direction'])
output = fstring.format(square[1], square[3]) output = fstring.format(square[1], square[3])
for entity in data['entity_table']: for entity in data['entity_table']:

Loading…
Cancel
Save