-
Notifications
You must be signed in to change notification settings - Fork 546
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
Custom research unlock #3942
base: master
Are you sure you want to change the base?
Custom research unlock #3942
Conversation
Your Pull Request was automatically labelled as: "🎈 Feature" |
Not sure on others' feelings on this, but I would rather |
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.
quick review
and i agree with Sefi please dont use var
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/IntegrationsManager.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Outdated
Show resolved
Hide resolved
Side comment, freaking love this. :) |
Not sure why everyone dislike |
My personal dislike is that Slimefun attracts new developers often, and |
I love readable code. Im also all for doing full variable names instead of P. since we are on java 16 we can but dont have to use var but i would opt out of using it because of readability |
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/3942/b6c16892
|
src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/SlimefunRegistry.java
Outdated
Show resolved
Hide resolved
...ava/io/github/thebusybiscuit/slimefun4/core/guide/unlockprovider/CurrencyUnlockProvider.java
Outdated
Show resolved
Hide resolved
...a/io/github/thebusybiscuit/slimefun4/core/guide/unlockprovider/ExperienceUnlockProvider.java
Outdated
Show resolved
Hide resolved
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 looked at style
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/guide/SlimefunGuideUnlockProvider.java
Outdated
Show resolved
Hide resolved
...ava/io/github/thebusybiscuit/slimefun4/core/guide/unlockprovider/CurrencyUnlockProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Outdated
Show resolved
Hide resolved
…VaultIntegration.java Co-authored-by: Jeroen <[email protected]>
…imefunGuideUnlockMode.java Co-authored-by: Jeroen <[email protected]>
Co-authored-by: Jeroen <[email protected]>
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/handlers/RainbowTickHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/integrations/VaultIntegration.java
Show resolved
Hide resolved
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.
I have to say this PR has a rather large footprint...
while more configuration is good, it needs to be maintainable, the research system itself is too rusty and old in my opinion to be adding onto it such a large feature.
But idk if a research rewrite is gonna be coming anytime soon, so not sure about this really.
…research # Conflicts: # src/main/java/io/github/thebusybiscuit/slimefun4/api/events/SlimefunGuideOpenEvent.java
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuideUnlockMode.java
Outdated
Show resolved
Hide resolved
can confirm it works in survival mode. if player is in creative mode currency is not deducted. Additionally I would recommend a comment be added to the config file to display the options that the server owner can type in that line, if it's more than currency or experience. it wasn't intuitive. I had to go into the code to find that. I also only tested currency. didn't test tokens or other options |
not-enough-xp: '&4You do not have enough XP to unlock this' | ||
not-meet-requirement: '&4You do not meet the requirement to unlock this' |
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.
should probably call it something like does-not-meet-requirement or something like that
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.
maybe requirement-unfulfilled
? or unfulfilled-requirement
...a/io/github/thebusybiscuit/slimefun4/core/guide/unlockprovider/ExperienceUnlockProvider.java
Outdated
Show resolved
Hide resolved
...ava/io/github/thebusybiscuit/slimefun4/core/guide/unlockprovider/CurrencyUnlockProvider.java
Outdated
Show resolved
Hide resolved
@@ -72,6 +73,7 @@ public final class SlimefunRegistry { | |||
private boolean disableLearningAnimation; | |||
private boolean logDuplicateBlockEntries; | |||
private boolean talismanActionBarMessages; | |||
private SlimefunGuideUnlockMode guideUnlockMode; |
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.
I think a setter method for this would be nice
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.
Any demand for setter method? The original goal is implement a research scoped custom unlock provider for addon dev and a global bulit-in unlock provider.
src/main/java/io/github/thebusybiscuit/slimefun4/api/researches/Research.java
Show resolved
Hide resolved
I would still love this change in. |
Gonna resolve this at first day in 2024 😄 |
…research # Conflicts: # pom.xml
cc30ef1
to
ae752b3
Compare
Description
Experience isn't only way to retrieve knowledge, money also can.
Added
SlimefunGuideUnlockMode
andSlimefunGuideUnlockProvider
to support more ways to unlock research.Support use player's server currency to unlock research with Vault API.
Proposed changes
Added
SlimefunGuideUnlockMode
Added
SlimefunGuideUnlockProvider
Added
VaultIntegration
for integration of unlock research.Related Issues (if applicable)
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values