2017-03-15 12:30:14 +01:00
|
|
|
info_text = ''
|
2020-03-06 23:49:14 +01:00
|
|
|
num_warnings = 0
|
2016-10-19 13:28:06 +02:00
|
|
|
|
2020-03-06 23:49:14 +01:00
|
|
|
def clear(clear_warnings=False):
|
|
|
|
global info_text, num_warnings
|
2017-03-15 12:30:14 +01:00
|
|
|
info_text = ''
|
2020-03-06 23:49:14 +01:00
|
|
|
if clear_warnings:
|
|
|
|
num_warnings = 0
|
2016-10-19 13:28:06 +02:00
|
|
|
|
|
|
|
def format_text(text):
|
2020-03-06 23:49:14 +01:00
|
|
|
return (text[:80] + '..') if len(text) > 80 else text # Limit str size
|
2016-11-12 18:30:39 +01:00
|
|
|
|
2016-10-19 13:28:06 +02:00
|
|
|
def print_info(text):
|
2017-03-15 12:30:14 +01:00
|
|
|
global info_text
|
2016-10-19 13:28:06 +02:00
|
|
|
print(text)
|
2017-03-15 12:30:14 +01:00
|
|
|
info_text = format_text(text)
|
2016-11-05 20:57:04 +01:00
|
|
|
|
|
|
|
def warn(text):
|
2020-03-06 23:49:14 +01:00
|
|
|
global num_warnings
|
|
|
|
num_warnings += 1
|
2016-11-05 20:57:04 +01:00
|
|
|
print('Armory Warning: ' + text)
|