I saw a localization key that wasn't defined: hexcasting.mishap.invalid_operator_args
Twisted-Code opened this issue ยท 3 comments
While playing walks' test pack, I encountered a mishap of type "hexcasting.mishap.invalid_operator_args" for which a localization value did not seem to be defined (hence why I got the localization key instead). I'm assuming, if the key were defined, it should probably go somewhere near the invalid_value mishaps, but why didn't it just throw one of those since I think those are usually used when the type is wrong?
The exact case where I saw this key was when I gave Surgeon's Exaltation 3 garbage. I have no idea, yet, if it happens with more-typical-but-still-wrong inputs:
Something else I noticed: if you give Surgeon's list, any, num
instead of list, num, any
, not only does it use this undefined key, it also trashes all three arguments even though the list was in the right spot and the "any" position should allow "any"?
Same thing just happened with Locator's when it got pattern, any
by mistake. It garbaged the any, not just the pattern-which-should-have-been-a-list. And, of course, the mishap string was still undefined.
Maybe the first part of that is the intent for this general "invalid args" mishap though, and the real problem is that there should be more specific mishaps triggering instead. Either way I should probably submit a separate issue about it, I guess.
@Talia-12 looks like you implemented this - what was it supposed to be?
https://github.com/FallingColors/HexMod/blame/65a07575137282a14e528045de0ddd7663e6d95a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapInvalidIotas.kt#L30