-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
base: dev/feature
Are you sure you want to change the base?
EffOperations #7764
Conversation
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 will look more closely later
src/main/java/org/skriptlang/skript/lang/arithmetic/Arithmetics.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,68 @@ | |||
test "operations numbers": |
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.
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.
src/main/java/org/skriptlang/skript/lang/arithmetic/Arithmetics.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,142 @@ | |||
test "operations effect numbers by literal numbers": |
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.
still missing tests for null operands, tests where non-variable expressions are changed, etc
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.
unresolved
src/main/java/org/skriptlang/skript/lang/arithmetic/Arithmetics.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.
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": |
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.
unresolved
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