Skip to content

Commit

Permalink
Convert wait during tradebot code entry into a setting
Browse files Browse the repository at this point in the history
Lusamine committed Feb 5, 2021
1 parent c67478e commit e7c8d55
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions SysBot.Pokemon/BotTrade/PokeTradeBot.cs
Original file line number Diff line number Diff line change
@@ -178,10 +178,9 @@ private async Task<PokeTradeResult> PerformLinkCodeTrade(SAV8SWSH sav, PokeTrade
await Click(A, 1_500, token).ConfigureAwait(false);

// Loading Screen
await Task.Delay(1_000, token).ConfigureAwait(false);
if (poke.Type != PokeTradeType.Random)
Hub.Config.Stream.StartEnterCode(this);
await Task.Delay(1_000, token).ConfigureAwait(false);
await Task.Delay(Hub.Config.Timings.ExtraTimeOpenCodeEntry, token).ConfigureAwait(false);

var code = poke.Code;
Log($"Entering Link Trade Code: {code:0000 0000}...");
3 changes: 3 additions & 0 deletions SysBot.Pokemon/Settings/TimingSettings.cs
Original file line number Diff line number Diff line change
@@ -48,6 +48,9 @@ public class TimingSettings
[Category(Misc), Description("Extra time in milliseconds to wait after clicking + to reconnect to Y-Comm.")]
public int ExtraTimeReconnectYComm { get; set; } = 0;

[Category(Misc), Description("Time to wait after opening the keyboard for code entry during trades.")]
public int ExtraTimeOpenCodeEntry { get; set; } = 1000;

[Category(Misc), Description("Time to wait after each keypress when navigating Switch menus or entering Link Code.")]
public int KeypressTime { get; set; } = 200;

0 comments on commit e7c8d55

Please sign in to comment.