Minor formatting fix for calculator.

Don't output a newline before a list constant if in calculator mode. While we're there, make a comparison more compact.
This commit is contained in:
Sei Lisa 2017-01-12 01:57:40 +01:00
parent e5ffe56fec
commit a961fee1c3

View file

@ -151,14 +151,11 @@ class outscript(object):
ret += ']'
self.listmode = False
return ret
ret = '\n'
ret = '' if lslcommon.IsCalc else '\n'
first = True
self.indentlevel += 1
for entry in value:
if not first:
ret += self.dent() + ', '
else:
ret += self.dent() + '[ '
ret += self.dent() + ('[ ' if first else ', ')
self.listmode = True
ret += self.Value2LSL(entry) + '\n'
self.listmode = False