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

Rework Potions #4183

Draft
wants to merge 182 commits into
base: dev/feature
Choose a base branch
from

Conversation

APickledWalrus
Copy link
Member

Description

This PR makes changes to EffPotion to have it follow vanilla behavior. This was done by reworking the whole thing to only use the PotionEffect class that Skript now supports (as of 2.5.2 iirc)

I added two new syntax options to EffPotionEffect as well. This allows users to create PotionEffects from syntax such as swiftness 2

I also added a converter that converts PotionEffectTypes into PotionEffects. This allows a user to do something like:
apply speed to player for 5 seconds

There are still some changes to be made, so I am opening this as a draft.
It is worth nothing that the default duration from the /effect command is 30 seconds, so we should probably change that internally too.

NOTE: This PR contains breaking syntax changes. It should be merged in a future version, such as 2.6.1 or even as far as 2.7 (that can be decided).


Target Minecraft Versions: Any
Requirements: None
Related Issues: #4178

Also makes changes to ExprPotionEffect and adds a new converter to try and keep some syntax working (it is also syntax that flows nicely)
@APickledWalrus APickledWalrus added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jul 11, 2021
@APickledWalrus APickledWalrus marked this pull request as ready for review July 11, 2021 21:59
@APickledWalrus APickledWalrus marked this pull request as draft July 12, 2021 17:21
@APickledWalrus APickledWalrus changed the title Rework EffPotion Rework Potions Jul 12, 2021
@APickledWalrus
Copy link
Member Author

Marking as a draft again as more in-depth changes are now planned

@APickledWalrus APickledWalrus marked this pull request as ready for review November 30, 2021 21:49
@APickledWalrus APickledWalrus marked this pull request as draft November 30, 2021 21:49
@APickledWalrus APickledWalrus mentioned this pull request Feb 3, 2022
@APickledWalrus APickledWalrus added the 2.7 Targeting a 2.7.X version release label Mar 23, 2022
@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jul 22, 2022

I don't agree with PotionEffectType to PotionEffect as a converter because you can simply do [new] potion effect of %potioneffecttype% currently to return a basic potion.

What converter you would need is PotionEffect to PotionEffectType.

@TheLimeGlass TheLimeGlass self-requested a review July 31, 2022 04:31
@APickledWalrus
Copy link
Member Author

I've now pushed my major changes that have been sitting locally for a while now. This PR depends on #4573, so there is currently some temporary stuff going on to register the potion stuff.

@Fusezion Fusezion mentioned this pull request Sep 29, 2022
1 task
skript.bukkit -> skriptbukkit
@APickledWalrus APickledWalrus removed the 2.9 Targeting a 2.9.X version release label Jul 1, 2024
@sovdeeth
Copy link
Member

image
😬

@APickledWalrus APickledWalrus removed the request for review from TheLimeGlass November 27, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants