Panicking ByName/IndexOf/IndexByName, separate Try- methods for null/-1 - #2403
Panicking ByName/IndexOf/IndexByName, separate Try- methods for null/-1#2403BioTomateDE wants to merge 3 commits into
Conversation
|
Download the artifacts for this pull request here: GUI:
CLI: |
|
Thinking about wrapping up the design for this, and honestly I'm super hesitant about breaking so many non-builtin scripts that rely on the existing methods... |
|
@colinator27 i understand. i still think this would be useful to have in utml in some way tho. maybe the old methods keep their names and the new failable ones could be named |
Yeah, that does seem reasonable. I think we would want to make new methods, but I feel like "force" isn't quite the right word... maybe something more like "require"? Not sure... |
The UndertaleData methods and extensions
ByName(),IndexOfandIndexOfByName(now calledIndexByName) now throw an exception when the element could not be found. The old behavior of returningnull/-1is still available viaTryByName,TryIndexOfandTryIndexByName.Caveats
This is a breaking change.
Notes
i fixed all the csx scripts (hopefully)