TeamREPENTOGON / TeamREPENTOGON/REPENTOGON
Callbacks with Optional Param -1 run all callbacks
Open
@ConnorForan is already working on this.
Since Mar 14, 2024.
bug
core
- Dominant language
- C++
- Stars
- 345
- Forks
- 51
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 4
Description
Due to how vanilla callbacks logic works, callbacks that can feature -1 as a valid value in an optional parameter will run all callbacks on trigger. For example, in the case of items, tmtrainer items can be of id -1.
The main culprit is this:
local defaultCallbackMeta = {
__matchParams = function(a, b)
return not a or not b or a == -1 or b == -1 or a == b
end
}
Which I assume may still be an issue in vanilla isaac althought I dont think there are any callbacks there that can have a -1 value.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.