-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Added error
operator
#1435
Added error
operator
#1435
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.
Thanks for this @kirjorjos!
Could you also add some unit tests for this new operator in https://github.com/CyclopsMC/IntegratedDynamics/blob/d7b38c774b591aa357ff76d3d539a718fe6167ab/src/test/java/org/cyclops/integrateddynamics/core/evaluate/variable/TestStringOperators.java ?
The CLA check probably fails because your git user that created the commit is not linked to your github account. (you can see this, as there is no link behind your commit's username)
.inputType(ValueTypes.STRING).renderPattern(IConfigRenderPattern.SUFFIX_1_LONG) | ||
.function( | ||
(variables) -> { | ||
throw new EvaluationException(Component.translatable(variables.getValue(0, ValueTypes.STRING).getRawValue())); |
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.
Is the translatable
intentional here?
Could make sense to have that here indeed.
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 saw translatable getting used in other parts of the file to make a MutableComponent
that the EvaluationException
constructor expects, but if there's another way you'd prefer me make one, I can definitely change it.
@@ -1060,6 +1060,8 @@ | |||
"operator.integrateddynamics.string.name.info": "Get the string or name of a named object or converts it to a string", | |||
"operator.integrateddynamics.string.unique_name": "Unique Name", | |||
"operator.integrateddynamics.string.unique_name.info": "Get the unique name of an object", | |||
"operator.integrateddynamics.string.string_error": "Error", |
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.
Indentation seems to have gone wrong here. Could you use spaces instead of tabs?
I think I added the lang file indentation fix and tests for the operator, I'm not familiar with github enough to be 100% sure though if I'm being honest. |
You can fix your git settings like this: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address
|
733f51e
to
e96ad73
Compare
e96ad73
to
0d84dfe
Compare
Thank you for the documentation on fixing it, had to do some googling to retroactively change the email the commit used, but it's all working now and future ones will have the correct one. |
src/test/java/org/cyclops/integrateddynamics/core/evaluate/variable/TestStringOperators.java
Outdated
Show resolved
Hide resolved
src/test/java/org/cyclops/integrateddynamics/core/evaluate/variable/TestStringOperators.java
Outdated
Show resolved
Hide resolved
src/test/java/org/cyclops/integrateddynamics/core/evaluate/variable/TestStringOperators.java
Show resolved
Hide resolved
oh, looking at the comparison, also fixed a typo in the concat tests and promptly forgot, if you need me to, I'll change it back, but I don't see anything where it should mater |
Super, thanks @kirjorjos! |
@kirjorjos I just noticed you submitted this PR to |
No description provided.