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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .idea/dictionaries/default_user.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
at.hannibal2.skyhanni.skyhannimodule.ModuleProvider
18 changes: 18 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
+ Reset search terms in GUIs after closing inventory (Profit Trackers, Area Navigation list, etc.).
+ Enabled by default to reduce confusion caused by the search feature.
+ The Estimated Item Value now displays material names used to unlock gemstone slots. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3089)
+ Added Mithril Infusion to Estimated Item Value. - Empa (https://github.com/hannibal002/SkyHanni/pull/2990)

#### Chat and Command Improvements

Expand Down Expand Up @@ -185,6 +186,7 @@
+ Added an option to send the optimal speed warning even when not wearing Rancher's Boots. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2859)
+ Added a Pest Traps tab widget to the Tab Widget Display. - Luna (https://github.com/hannibal002/SkyHanni/pull/2984)
+ Updated Pest chat and GUI to indicate Pests Widget is disabled when displaying pests. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3022)
+ Changed Anita medal profit display to show profit per copper medal and sort by this value. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3122)

#### Event Improvements

Expand All @@ -208,6 +210,7 @@
+ Added a warning for empty messages left behind by Stash Compact. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3009)
+ Added option to hide seconds in the Real Time GUI. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2979)
+ Improved graph navigation performance. - hannibal2 & Thunderblade (https://github.com/hannibal002/SkyHanni/pull/3083)
+ Added Roman numeral support to slayer names in trackers, Profit Tracker Items, and Scoreboard. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3113)

### Fixes

Expand Down Expand Up @@ -260,6 +263,7 @@
+ Fixed a small typo in Bestiary Display. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2748)
+ Fixed `Line to Slayer Miniboss` not checking for walls. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/2788)
+ Fixed Special Zealots not highlighted after a recent Hypixel update. - Luna (https://github.com/hannibal002/SkyHanni/pull/3099)
+ Fixed Kuudra Lines sometimes not displaying in Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3118)

#### Custom Scoreboard Fixes

Expand Down Expand Up @@ -358,6 +362,7 @@
+ Fixed Time Tower warnings showing up on new profiles (e.g. Bingo). - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3012)
+ You can open `/cf` once to make the message disappear without changing settings if a new profile was created before applying the fix for the first time.
+ Fixed stray flash overlaying other Chocolate Factory information. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3054)
+ Fixed error when opening Choc Factory via NEU buttons. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3108)

#### Event Fixes

Expand Down Expand Up @@ -392,6 +397,7 @@
+ Fixed the color of material messages.
+ Fixed overly liberal player message detection in Enable Chat Formatting. - !nea (https://github.com/hannibal002/SkyHanni/pull/2871)
+ This should fix many formatting issues related to `[SomethingHere] Something Else: Something Even More`.
+ Fixed /shwords causing blank messages in chat. - nopo (https://github.com/hannibal002/SkyHanni/pull/3110)

#### Misc Fixes

Expand Down Expand Up @@ -424,6 +430,10 @@
+ Fixed collection tracker to recognize the current collection. - nopo (https://github.com/hannibal002/SkyHanni/pull/3049)
+ Fixed skill level. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3068)
+ Fixed Replace Roman Numerals replacing random letters. - Mikecraft1224 (https://github.com/hannibal002/SkyHanni/pull/3003)
+ Fixed most incorrect farming skill XP cases. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3121)
+ Calculation errors when reaching a skill cap below 60 are not fixed yet.
+ Fixed distortion of regular words due to incorrect Roman numeral replacement. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3113)
+ Fixed rare error message in skill progress display. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3105)

### Technical Details

Expand Down Expand Up @@ -542,6 +552,14 @@
+ Moved Next Jacobs Contest, Best Crop Milestone & Jyrre Timer to Renderable. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3004)
+ Added /shtestactionbar command: set your clipboard as a fake Action Bar. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3085)
+ Added /shdebug support for SkyBlock island, Bingo, and Tab List data tests. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3085)
+ Added error logging to trevor solver. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3107)
+ Added allowlist for Roman numeral replacement. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3113)
+ Added debug command /shdebugvisualwords. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3112)
+ Added console logging of all words replaced by /shword.
+ Added contributor rabbit names. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3109)
+ Replaced rabbit names in the rabbit collection menu with SkyHanni contributor names.
+ Added debug data for crop reading errors. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3114)
+ Improved Detekt and .editorconfig rules. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3104)

### Removed Features

Expand Down
2 changes: 1 addition & 1 deletion root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {

allprojects {
group = "at.hannibal2.skyhanni"
version = "0.28.Beta.21"
version = "0.28.Beta.22"
repositories {
mavenCentral()
mavenLocal()
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: SkyHanniInstallerFrame

Original file line number Diff line number Diff line change
Expand Up @@ -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

@ConfigEditorBoolean
@FeatureToggle
public boolean ubikReminder = false;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package at.hannibal2.skyhanni.features.rift.everywhere

import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.DelayedRun
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.hours

@SkyHanniModule
object Ubikreminder {

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(



@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

val message = event.message
if (messageRegex.matches(message) && !isTimerRunning) {
startTimer()
}
}
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.

ChatUtils.chat("§aUbik's cube is ready in the rift!")
isTimerRunning = false

}
}
}
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: SkyHanniInstallerFrame

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: SkyHanniInstallerFrame

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Root xmlns="http://notenoughupdates.org/moulconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://notenoughupdates.org/moulconfig https://raw.githubusercontent.com/NotEnoughUpdates/MoulConfig/master/MoulConfig.xsd">
<Gui>
<Column>
<Row>
<Text text="Search: "/>
<TextField value="@search"/>
<Text text="@poll"/>
</Row>
<ScrollPanel width="560" height="400">
<Array data="@searchResults">
<Row>
<Hover lines="@keyW">
<Text text="@key" width="200"/>
</Hover>
<Hover lines="@hoverRegex">
<Text text="@regex" width="300"/>
</Hover>
<Text text="@overriden" width="50"/>
</Row>
</Array>
</ScrollPanel>
</Column>
</Gui>
</Root>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#version 120

// Fragment Shader
uniform sampler2D texture;
uniform float darknessLevel;

varying vec4 outColor;

void main() {
vec4 color = texture2D(texture, gl_TexCoord[0].st) * outColor;
vec3 darkenedColor = color.rgb * darknessLevel;
gl_FragColor = vec4(darkenedColor, color.a);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#version 120

varying vec4 outColor;

void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
outColor = gl_Color;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#version 120

uniform float scaleFactor;
uniform float radius;
uniform float smoothness;
uniform vec2 halfSize;
uniform vec2 centerPos;

varying vec4 color;

// From https://www.shadertoy.com/view/WtdSDs
float roundedRectSDF(vec2 center, vec2 halfSize, float radius) {
return length(max(abs(center) - halfSize + radius, 0.0)) - radius;
}

void main() {
float xScale = gl_ModelViewMatrix[0][0];
float yScale = gl_ModelViewMatrix[1][1];
float xTranslation = gl_ModelViewMatrix[3][0];
float yTranslation = gl_ModelViewMatrix[3][1];

vec2 newHalfSize = vec2(halfSize.x * xScale, halfSize.y * yScale);

float newCenterPosY = centerPos.y;
if (yScale != 1.0) {
newCenterPosY = centerPos.y - (halfSize.y * (yScale - 1));
}

vec2 newCenterPos = vec2((centerPos.x * xScale) + (xTranslation * scaleFactor), newCenterPosY - (yTranslation * scaleFactor));

float distance = roundedRectSDF(gl_FragCoord.xy - newCenterPos, newHalfSize, radius);
float smoothed = 1.0 - smoothstep(0.0, smoothness, distance);
gl_FragColor = color * vec4(1.0, 1.0, 1.0, smoothed);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#version 120

varying vec4 color;

void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
color = gl_Color;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#version 120

// Rect specific uniforms
uniform float scaleFactor;
uniform float radius;
uniform vec2 halfSize;
uniform vec2 centerPos;

// Outline specific uniforms
uniform float borderThickness;
uniform float borderBlur;

varying vec4 color;

// From https://www.shadertoy.com/view/WtdSDs
float roundedRectSDF(vec2 center, vec2 halfSize, float radius) {
return length(max(abs(center) - halfSize + radius, 0.0)) - radius;
}

void main() {
float xScale = gl_ModelViewMatrix[0][0];
float yScale = gl_ModelViewMatrix[1][1];
float xTranslation = gl_ModelViewMatrix[3][0];
float yTranslation = gl_ModelViewMatrix[3][1];

vec2 newHalfSize = vec2(halfSize.x * xScale, halfSize.y * yScale);

float newCenterPosY = centerPos.y;
if (yScale != 1.0) {
newCenterPosY = centerPos.y - (halfSize.y * (yScale - 1));
}

vec2 newCenterPos = vec2((centerPos.x * xScale) + (xTranslation * scaleFactor), newCenterPosY - (yTranslation * scaleFactor));

float distance = roundedRectSDF(gl_FragCoord.xy - newCenterPos, newHalfSize, max(radius, borderThickness));

// In testing, keeping the upper bound at 1.0 and letting the lower be changable seemed the most sensible for nice results
float smoothed = 1.0 - smoothstep(borderBlur, 1.0, abs(distance / borderThickness));
gl_FragColor = color * vec4(1.0, 1.0, 1.0, smoothed);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#version 120

varying vec4 color;

void main() {
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
color = gl_Color;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#version 120

uniform float scaleFactor;
uniform float radius;
uniform float smoothness;
uniform vec2 halfSize;
uniform vec2 centerPos;

uniform sampler2D outTexture;

varying vec2 outTextureCoords;
varying vec4 outColor;

// From https://www.shadertoy.com/view/WtdSDs
float roundedRectSDF(vec2 center, vec2 halfSize, float radius) {
return length(max(abs(center) - halfSize + radius, 0.0)) - radius;
}

void main() {
float xScale = gl_ModelViewMatrix[0][0];
float yScale = gl_ModelViewMatrix[1][1];
float xTranslation = gl_ModelViewMatrix[3][0];
float yTranslation = gl_ModelViewMatrix[3][1];

vec2 newHalfSize = vec2(halfSize.x * xScale, halfSize.y * yScale);

float newCenterPosY = centerPos.y;
if (yScale != 1.0) {
newCenterPosY = centerPos.y - (halfSize.y * (yScale - 1));
}

vec2 newCenterPos = vec2((centerPos.x * xScale) + (xTranslation * scaleFactor), newCenterPosY - (yTranslation * scaleFactor));

float distance = roundedRectSDF(gl_FragCoord.xy - newCenterPos, newHalfSize, radius);
float smoothed = 1.0 - smoothstep(0.0, smoothness, distance);
gl_FragColor = (texture2D(outTexture, outTextureCoords) * outColor) * vec4(1.0, 1.0, 1.0, smoothed);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#version 120

varying vec2 outTextureCoords;
varying vec4 outColor;

void main(){
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
outColor = gl_Color;
outTextureCoords = gl_MultiTexCoord0.st;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Chroma Fragment Shader
// (Same as textured_chroma.fsh but isn't restricted to textured elements)

#version 120

uniform float chromaSize;
uniform float timeOffset;
uniform float saturation;
uniform bool forwardDirection;

varying vec4 originalColor;

float rgb2b(vec3 rgb) {
return max(max(rgb.r, rgb.g), rgb.b);
}

vec3 hsb2rgb_smooth(vec3 c) {
vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0);
rgb = rgb * rgb * (3.0 - 2.0 * rgb); // Cubic smoothing
return c.z * mix(vec3(1.0), rgb, c.y);
}

void main() {
// Determine the direction chroma moves
float fragCoord;
if (forwardDirection) {
fragCoord = gl_FragCoord.x - gl_FragCoord.y;
} else {
fragCoord = gl_FragCoord.x + gl_FragCoord.y;
}

// The hue takes in account the position, chroma settings, and time
float hue = mod(((fragCoord) / chromaSize) - timeOffset, 1.0);

// Set the color to use the new hue & original saturation/value/alpha values
gl_FragColor = vec4(hsb2rgb_smooth(vec3(hue, saturation, rgb2b(originalColor.rgb))), originalColor.a);
}
Loading
Loading