-
Notifications
You must be signed in to change notification settings - Fork 87
Refactoring of existing cheats (see #1679) #1688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring of existing cheats (see #1679) #1688
Conversation
Flamefire
left a comment
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.
Great use of the circular buffer, good idea!
It does make sense to separate the cheats and the key/command tracker although I don't really like putting the cheats into the world class or having the command tracker be a part of the cheats creating a cyclic dependency and having to do cheats.trackX -> tracker.trackX
So maybe add an instance of each class to the game interface?
0aa5e63 to
f6baefc
Compare
…ass "CheatCommandTracker"
- avoid early returns - rename cheatStr to enableCheatsStr - rename canCheatModeBeOn() to areCheatsAllowed() - trackCharKeyEvent return void - hold cheatCmdTracker_ by value instead of unique_ptr
97793f3 to
0665d3d
Compare
0665d3d to
5934fd7
Compare
5934fd7 to
92e9c95
Compare
Moved CheatCommandTracker out of Cheats and into dskGameInterface as it is its only user. |
|
@Flamefire Please review the updates. Sorry for the huge delay :D |
02cfb70 to
543fd96
Compare
543fd96 to
e761d04
Compare
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.
Looks good to me, thanks! But see the comment for the future.
First few commits from PR #1679 :