ref: 3869d5a30f22635637fa83775a50e117ba47ccf2
parent: 1021728fb340554317be5dfd1fd1c17f33fe3289
author: Bryan Bishop <[email protected]>
date: Sun Apr 22 16:33:42 EDT 2012
split up insertion and dumping in Asm
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -4621,7 +4621,8 @@
incbins[index] = new_object
#insert these incbins into self.parts
gindex = self.parts.index(object)
- self.parts = self.parts[:gindex] + incbins + self.parts[gindex+1:]
+ self.parts = self.parts[:gindex] + incbins + self.parts[gindex:]
+ self.parts.remove(object)
found = True
break
#insert before the current object
@@ -4656,6 +4657,8 @@
count += 1
def insert_and_dump(self, limit=100, filename="output.txt"):
self.insert_all(limit=limit)
+ self.dump(filename=filename)
+ def dump(self, filename="output.txt"):
fh = open(filename, "w")
newlines_before_next_obj_requested = 0
newlines_before_next_obj_given = 0