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

EffOperations #7764

Open
wants to merge 14 commits into
base: dev/feature
Choose a base branch
from

Conversation

Absolutionism
Copy link
Contributor

@Absolutionism Absolutionism commented Apr 1, 2025

Description

This PR aims to add effects for multiplication, division and exponentiation operations, allowing users to perform an arithmetic operation on an variable, single or list. Rather than doing, for example set {_int} to {_int} * 2
Does not work for literals.


Target Minecraft Versions: any
Requirements: none
Related Issues: #7763

@Absolutionism Absolutionism requested a review from a team as a code owner April 1, 2025 21:14
@Absolutionism Absolutionism requested review from APickledWalrus and Efnilite and removed request for a team April 1, 2025 21:14
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.

i will look more closely later

@@ -0,0 +1,68 @@
test "operations numbers":
Copy link
Member

Choose a reason for hiding this comment

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

needs tests where both values are variables, where the other value is not a valid option, where the value is a variable with an invalid type, etc. Edge cases need to be covered.

@sovdeeth sovdeeth added the feature Pull request adding a new feature. label Apr 4, 2025
@@ -0,0 +1,142 @@
test "operations effect numbers by literal numbers":
Copy link
Member

Choose a reason for hiding this comment

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

still missing tests for null operands, tests where non-variable expressions are changed, etc

Copy link
Member

Choose a reason for hiding this comment

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

unresolved

@Absolutionism Absolutionism requested a review from sovdeeth April 10, 2025 11:04
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.

everything else looks good, though there might be an opportunity for optimization if the left expression has a return value that exactly matches an operation, then you wouldn't have to do lookups during the function. Optional, though.

@@ -0,0 +1,142 @@
test "operations effect numbers by literal numbers":
Copy link
Member

Choose a reason for hiding this comment

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

unresolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull request adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants