-
-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
I've now added Pylint is for some reason not ignoring those two line-too-long errors in |
Fantastic, thanks for the PR! Apologies for the delay, but I do plan on reviewing this, and am not against necessarily adding this, but want to be cautious when adding additional programs to the flow (even if optional), especially ones which emulate/change the client API! As long as @akshualy doesn't have additional concerns / approves, I'll likely go ahead and merge this once I'm done reviewing 😃 |
I haven't cross-checked this with a second client, but there is an endpoint in LCU as well. {
"availability": "offline"
} Overall I have nothing against an additional integration with Deceive though. |
Interesting, would potentially be worth exploring us adding this directly in if it's as simple as that to toggle it off! |
If you have a few minutes, I can create an account in your region and could add you to test. |
# Search registry now | ||
key_to_read = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store" | ||
k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_to_read, 0, winreg.KEY_READ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is checking the "recent apps" registry entries, I'd argue it might be worth commenting this since it isn't guaranteed to be in here if the user hasn't run it yet and/or it's not there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By commenting, do you mean commenting it out (i.e. removing) or just documenting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding a comment! 😄
I had time to test this with a friend of mine, this does work and is shown on the other side as offline as well. {
"availability": "offline",
"lol": {
"gameStatus": "outOfGame"
}
} after every action you take (creating lobby, going into queue, being in-game). |
If you manage to replicate the effect of Deceive, I'm perfectly fine with using that instead of my code if you'd like - the real goal of my PR was just to add the functionality of masking your online status, after all 😄 |
@akshualy and/or @TriOCuBe did either of you feel up to implementing that in a PR directly, as opposed to adding this support and then removing it in the future if that were to be added to the client? If not, I'm happy to go ahead with this as we had mentioned 😄 |
Let's add both, Deceive achieves its goal by setting up a Proxy which inherently prevents any updates and thus is probably smoother at displaying the Offline status, but it'd be nice to have this feature in-built as a back-up as well :) But that should be done in a separate MR. |
What is Deceive?
Deceive is a program used to mask a player's online status while playing Riot games. It's decently popular and I use it myself, which is why I wrote this pull request.
Additions
I've added two new settings to the config: use_deceive and install_location_deceive.
In tft.py, I've changed restart_league_client() to take these configs into consideration and it now runs the new function launch_league_client(), which does most of the job.
If no path to deceive is given, the bot will run determine_deceive_install_location(). This function first searches the Downloads folder, then looks through a specific registry key I've found to contain paths of .exe files.
Something to note is that these entries don't get deleted, meaning if a file gets moved, the old entry for that file still exists despite becoming obsolete. Therefore the function finds all matches and then iterates through them until it finds a path pointing to an existing file.
If this still doesn't work, the config gets updated through update_deceive_config() to False and the bot won't try to open deceive again until restarted.
I've added logging and documentation to the places where it was needed.