Skip to content
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

Open
wants to merge 6 commits into
base: beta
Choose a base branch
from

Conversation

ske865
Copy link

@ske865 ske865 commented Dec 27, 2024

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

A simple message regex that starts a DelayedRun and sends the chat message "§aUbik's cube is ready in the rift!" Intended to remind people to use ubiks cube in the rift as it is 100% free motes every 2 hours. Images

image

Changelog New Features

  • Ubiks cube reminder. - jepn

@github-actions github-actions bot added the Wrong Title/Changelog There is an error in the title or changelog label Dec 27, 2024
Copy link

I have detected some issues with your pull request:

Body issues:
Unknown line after changes started being declared in text: Sets a reminder each time you use ubiks cube

Please fix these issues. For the correct format, refer to the pull request template.

@github-actions github-actions bot removed the Wrong Title/Changelog There is an error in the title or changelog label Dec 27, 2024
Copy link
Collaborator

@CalMWolfs CalMWolfs left a 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

Copy link
Owner

@hannibal002 hannibal002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Cal said, please reset your branch to current beta so that the pr only adds the following changes:
image

@@ -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")
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Contributor

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\\):")
Copy link
Owner

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

private val autoSlayerBankPattern by RepoPattern.pattern(

@hannibal002 hannibal002 added this to the Version 0.29 milestone Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants