-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Feature: ubiks cube reminder #3125
base: beta
Are you sure you want to change the base?
Conversation
I have detected some issues with your pull request: Body issues: Please fix these issues. For the correct format, refer to the pull request template. |
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.
Not really sure what you have done to commit some of these files but it isn't correct, make sure you follow the contributing guide and if you still have problems ask in the coding channel
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.
@@ -55,4 +55,10 @@ public class RiftConfig { | |||
@ConfigEditorBoolean | |||
@FeatureToggle | |||
public boolean horsezookaHider = false; | |||
|
|||
@Expose | |||
@ConfigOption(name = "Ubik's cube reminder", desc = "Reminder for Ubik's cube in the rift") |
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.
Please move it to the mountaintop category (i assume this is in mountaintop), and please describe WHAT it is you do with ubik a bit in the description. Also, the feature name is a title, please use first letter upper case formatting there, and a dot at the end of the description
private fun startTimer() { | ||
isTimerRunning = true | ||
|
||
DelayedRun.runDelayed(2.hours) { // 2 hours as a Duration |
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.
instead of running a timer, please save the moment in time the player did the interaction, then check every second if the duration is over 2 hours.
|
||
@SubscribeEvent | ||
fun onChat(event: LorenzChatEvent) { | ||
if (!RiftAPI.config.ubikReminder) return |
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.
before checking if the feautre is enabled, pleas add additional checks, e.g. if the player is in the rift, the right region of the rift, etc
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.
you would probably also want a reminder of this outside the rift, so at most this should be a setting imo
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.
Well the timer would only start inside of the rift, no?
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.
yeah, i probably didn't notice what hannibal was replying to
private val config get() = RiftAPI.config.ubikReminder | ||
|
||
private var isTimerRunning = false | ||
private val messageRegex = Regex("ROUND [1-9] \\(FINAL\\):") |
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.
please use our repo patterns system instead. for an exampe, see
SkyHanni/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
Line 53 in d4510fa
private val autoSlayerBankPattern by RepoPattern.pattern( |
What
Describe what this pull request does, including technical details, screenshots, links to discord, etc.
A reminder that detects when you have last used ubiks cube in the rift (via messageregex) and then sends a reminder in chat when the cooldown is over
Images
Changelog New Features