ref: 9b4ce897d4976edcfabcbce9258b27ed85759208
parent: 3b234223c5b5376eb89124464164983cd7150739
author: Bryan Bishop <[email protected]>
date: Sat Apr 21 06:24:44 EDT 2012
improve to_asm output (newlines)
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -1870,7 +1870,7 @@
0x9f58f, #battle tower
0x9f62f, #battle tower
]
-class Script():
+class Script:
def __init__(self, *args, **kwargs):
self.address = None
self.commands = None
@@ -1987,6 +1987,8 @@
def to_asm(self):
asm_output = "".join([command.to_asm()+"\n" for command in self.commands])
+ if asm_output[-1] == "\n":
+ asm_output = asm_output[:-1]
return asm_output
def old_parse(self, *args, **kwargs):
@@ -3239,7 +3241,9 @@
output += xspacing
output += people_event.to_asm()
output += "\n"
-
+
+ if output[-1] == "\n":
+ output = output[:-1]
return output
all_map_event_headers = []