mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
extract trainer group id and trainer id from TrainerFragment objects
This commit is contained in:
parent
a17ef09e10
commit
a6efb7f0fb
@ -3313,6 +3313,7 @@ class ItemFragmentParam(PointerLabelParam):
|
|||||||
global_dependencies.add(self.itemfrag)
|
global_dependencies.add(self.itemfrag)
|
||||||
return self.dependencies
|
return self.dependencies
|
||||||
|
|
||||||
|
trainer_group_maximums = {}
|
||||||
class TrainerFragment(Command):
|
class TrainerFragment(Command):
|
||||||
"""used by TrainerFragmentParam and PeopleEvent for trainer data
|
"""used by TrainerFragmentParam and PeopleEvent for trainer data
|
||||||
|
|
||||||
@ -3376,6 +3377,20 @@ class TrainerFragment(Command):
|
|||||||
self.dependencies = deps
|
self.dependencies = deps
|
||||||
return deps
|
return deps
|
||||||
|
|
||||||
|
def parse(self):
|
||||||
|
Command.parse(self)
|
||||||
|
|
||||||
|
# get the trainer group id
|
||||||
|
trainer_group = self.params[1].byte
|
||||||
|
|
||||||
|
# get the trainer id
|
||||||
|
trainer_id = self.params[2].byte
|
||||||
|
|
||||||
|
if not trainer_group in trainer_group_maximums.keys():
|
||||||
|
trainer_group_maximums[trainer_group] = trainer_id
|
||||||
|
elif trainer_group_maximums[trainer_group] < trainer_id:
|
||||||
|
trainer_group_maximums[trainer_group] = trainer_id
|
||||||
|
|
||||||
def to_asm(self):
|
def to_asm(self):
|
||||||
xspacing = ""
|
xspacing = ""
|
||||||
output = ""
|
output = ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user