diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-09-22 12:14:49 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-09-22 12:14:49 -0500 |
commit | 6e4c7d5a0f1e5d416b204e83348df3a619631d8f (patch) | |
tree | 71cffb7ed9c25aaa0e9cad9065a7ba80722e8f44 | |
parent | e3f6d91d0672764ffdcb2cb17483b9cba8845437 (diff) |
pause a few frames before typing on a keyboard
For names that weren't starting with a capletter, the "select" button to
switch to downcase was happening too soon. So add in a small delay to
get the keyboard writing to work.
-rw-r--r-- | pokemontools/vba/vba.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py index 3c8c084..654292e 100644 --- a/pokemontools/vba/vba.py +++ b/pokemontools/vba/vba.py @@ -430,7 +430,12 @@ class crystal(object): """ for buttons in button_sequence: self.vba.press(buttons) - self.vba.step(count=2) + + if buttons == "select": + self.vba.step(count=5) + else: + self.vba.step(count=2) + self.vba.press([]) def write(self, something="TrAiNeR"): @@ -440,7 +445,9 @@ class crystal(object): Uses a planning algorithm to do this in the most efficient way possible. """ button_sequence = keyboard.plan_typing(something) + self.vba.step(count=10) self.keyboard_apply([[x] for x in button_sequence]) + return button_sequence def set_partymon2(self): """ |