mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
consolidate insert_multiple and insert_single on the Asm class
This commit is contained in:
parent
03ce919b58
commit
6ff6f93397
@ -5731,7 +5731,13 @@ class Asm:
|
|||||||
raise Exception, "unable to insert object into Asm"
|
raise Exception, "unable to insert object into Asm"
|
||||||
self.labels.append(new_object.label)
|
self.labels.append(new_object.label)
|
||||||
return True
|
return True
|
||||||
def insert_single_with_dependencies(self, object0):
|
def insert_with_dependencies(self, input):
|
||||||
|
if type(input) == list:
|
||||||
|
input_objects = input
|
||||||
|
else:
|
||||||
|
input_objects = [input]
|
||||||
|
|
||||||
|
for object0 in input_objects:
|
||||||
global_dependencies = set([object0])
|
global_dependencies = set([object0])
|
||||||
poopbutt = get_dependencies_for(object0, global_dependencies=global_dependencies, recompute=False)
|
poopbutt = get_dependencies_for(object0, global_dependencies=global_dependencies, recompute=False)
|
||||||
objects = global_dependencies
|
objects = global_dependencies
|
||||||
@ -5757,9 +5763,10 @@ class Asm:
|
|||||||
# raise Exception, "debugging..."
|
# raise Exception, "debugging..."
|
||||||
#elif object.label.name == "UnknownScript_0x60011":
|
#elif object.label.name == "UnknownScript_0x60011":
|
||||||
# raise Exception, "debugging.. dependencies are: " + str(object.dependencies) + " versus: " + str(object.get_dependencies())
|
# raise Exception, "debugging.. dependencies are: " + str(object.dependencies) + " versus: " + str(object.get_dependencies())
|
||||||
|
def insert_single_with_dependencies(self, object):
|
||||||
|
self.insert_with_dependencies(object)
|
||||||
def insert_multiple_with_dependencies(self, objects):
|
def insert_multiple_with_dependencies(self, objects):
|
||||||
for object in objects:
|
self.insert_with_dependencies(objects)
|
||||||
self.insert_single_with_dependencies(object)
|
|
||||||
def insert_all(self, limit=100):
|
def insert_all(self, limit=100):
|
||||||
count = 0
|
count = 0
|
||||||
for each in script_parse_table.items():
|
for each in script_parse_table.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user