- info_to_cache += 'THING: %s' % self.get_thing_info(t)
- protection = t.protection
- if protection == '.':
- protection = 'none'
- info_to_cache += ' / protection: %s\n' % protection
- if hasattr(t, 'hat'):
- info_to_cache += t.hat[0:6] + '\n'
- info_to_cache += t.hat[6:12] + '\n'
- info_to_cache += t.hat[12:18] + '\n'
- if hasattr(t, 'face'):
- info_to_cache += t.face[0:6] + '\n'
- info_to_cache += t.face[6:12] + '\n'
- info_to_cache += t.face[12:18] + '\n'
- if hasattr(t, 'design'):
- line_length = t.design[0].x
- lines = []
- for i in range(t.design[0].y):
- start = i * line_length
- end = (i + 1) * line_length
- lines += [t.design[1][start:end]]
- if t.type_ == 'Sign':
- info_to_cache += '-' * (line_length + 4) + '\n'
- for line in lines:
- info_to_cache += '| %s |\n' % line
- info_to_cache += '-' * (line_length + 4) + '\n'
- else:
- for line in lines:
- info_to_cache += '%s\n' % line