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

Updates EffEquip, CondIsWearing, and adds CondIsSaddled #6849

Merged
merged 24 commits into from
Dec 15, 2024

Conversation

cheeezburga
Copy link
Member

@cheeezburga cheeezburga commented Jul 2, 2024

This PR originally was to only update the equip effect, but now does all the following:

  • General updates to the equip effect (horse and steerable stuff)
  • Adds wolf support to the equip effect
  • Updates the equip test (now tests with armour, horses, wolves)
  • Adds saddled condition, to test if a valid entity is saddled
  • Adds saddled test
  • Updates CondIsWearing to check for an item in the BODY slot of an entity as well

This resolves #6838

@cheeezburga cheeezburga changed the base branch from dev/feature to dev/patch July 2, 2024 03:58
@cheeezburga cheeezburga changed the base branch from dev/patch to dev/feature July 2, 2024 03:59
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jul 2, 2024
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

looks good but needs tests

@cheeezburga cheeezburga requested a review from sovdeeth August 30, 2024 17:12
- The test now uses CondIsSaddled, and tries to test wolf armor as well
- Removed the Steerable check in EffEquip, as 1.19.4+ (2.10) will always have it
@cheeezburga cheeezburga changed the title Update EffEquip Updates EffEquip and adds CondIsSaddled Sep 3, 2024
@cheeezburga
Copy link
Member Author

cheeezburga commented Sep 3, 2024

The 1.20.5+ tests will always fail due to something happening with the wolf armor section in the EffEquip test. Works fine with effect commands, I'm not sure what the problem is.
Fixed. Thanks @Fusezion

- Due to CondIsWearing not accounting for the wolf armor in the BODY slot, which apparently isn't returned by EntityEquipment#getArmorContents()
- Moves wolf test to separate structure
@cheeezburga cheeezburga changed the title Updates EffEquip and adds CondIsSaddled Updates EffEquip, CondIsWearing, and adds CondIsSaddled Sep 3, 2024
Copy link
Contributor

@Fusezion Fusezion left a comment

Choose a reason for hiding this comment

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

Just some teeny tiny requests

src/main/java/ch/njol/skript/conditions/CondIsWearing.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/conditions/CondIsWearing.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/conditions/CondIsSaddled.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/conditions/CondIsSaddled.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/conditions/CondIsSaddled.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/conditions/CondIsWearing.java Outdated Show resolved Hide resolved
src/test/skript/tests/syntaxes/conditions/CondIsSaddled.sk Outdated Show resolved Hide resolved
src/test/skript/tests/syntaxes/effects/EffEquip.sk Outdated Show resolved Hide resolved
src/test/skript/tests/syntaxes/effects/EffEquip.sk Outdated Show resolved Hide resolved
- Adds horse armour tests
- Moves annotations in-line
- Only supports 'properly' in CondIsSaddled
Copy link
Contributor

@Fusezion Fusezion left a comment

Choose a reason for hiding this comment

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

I couldn't spot anything else that should need fixing, we'll see what everyone else thinks

@cheeezburga cheeezburga requested a review from Fusezion September 6, 2024 16:43
@sovdeeth sovdeeth added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Sep 13, 2024
@sovdeeth sovdeeth merged commit 342d7e9 into SkriptLang:dev/feature Dec 15, 2024
5 checks passed
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. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants