You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands, modules are unable to signal a desired prioritization other than "WRAPPER", "MIXED", and "OVERRIDE".
A suggestion that has come my way is to add optional before and after constraints that will be used to decide on default prioritization. These would be lists of module IDs (or a single module ID), which would run by default before/after the given wrapper.
Optionally, we could have the dictionary be the third parameter (when it is not a string, for backward compatibility), and have the wrapper type be one of the dictionary values:
Adding my support for this suggestion. I have a pretty good use case in mind: I am working on a module that would act as a library for certain distance measurements. The trick is, though, who goes first can matter quite a bit when figuring out distance in a quasi-cooperative manner. Instead of trying to track this through some sort of Array, it would be simpler and cleaner if modules could just flag order in some manner. If that could be done, each module could simply wrap the distance function and add on their calculations in their specified turn. Everyone who does not participate would be relegated to last (or better yet, not at all if a given flag is set).
For such a specific use-case, something handled directly by your library would probably be better. There's too many variables to rely solely on libWrapper, IMO.
I'd suggest you wrap the methods youself, and provide other modules with an API to register their own roll handlers that your wrapper then calls.
It doesn't mean this approach you suggest wouldn't work, but I think it wouldn't be very flexible IMO. Also, this issue isn't high priority, there's a few other things I think are more important, such as #33
As it stands, modules are unable to signal a desired prioritization other than "WRAPPER", "MIXED", and "OVERRIDE".
A suggestion that has come my way is to add optional
before
andafter
constraints that will be used to decide on default prioritization. These would be lists of module IDs (or a single module ID), which would run by default before/after the given wrapper.Example:
Optionally, we could have the dictionary be the third parameter (when it is not a string, for backward compatibility), and have the wrapper type be one of the dictionary values:
The user could then be warned if these constraints conflict (including when it's because the users themselves changed prioritization).
The text was updated successfully, but these errors were encountered: