-
Notifications
You must be signed in to change notification settings - Fork 367
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
Expose aura logic for other grid type support #16543
base: master
Are you sure you want to change the base?
Conversation
This almost looks fine to me, though I wonder if those classes are exposed if we should not construct instances from the config instead of importing directly in our own uses of it, to discourage monkey patching and encourage subclassing. But this is something that @stwlam is more familiar with. |
Are other things in CONFIG setup to use subclassing? I can certainly look into changing it to a subclassing friendly implementation if that is the design the project is aiming for. I also just want to note the |
Hi Just wondering if you've had a chance to take a look at this MR @stwlam . I've been using a build with this in my home games and haven't run into any issues with the current implementation. |
e84c884
to
00d7ad9
Compare
So far I don''t think stwlam is amenable to exposing any aura logic at all, so I don't expect this will ever be merged. You specifically just need some way to determine "is in aura"? Its kinda bad code design wise, but the best thing I can think of as a compromise is moving containsToken() to a check in token for isInAura(), as tokens are foundry api and thus overridable. |
Hi CarlosFdez, |
00d7ad9
to
207fdfd
Compare
207fdfd
to
9eefb66
Compare
@stwlam Could this be reconsidered? The latest position on auras in gridless/hexes was "paizo didn't make firm rules, so the pf2e system won't try to support them, but a module could override this" -- and in cases like this, modules require the system to add some API support without increasing the maintenance load for the system devs. |
Description
This MR serves to expose the aura related classes and make a minor change. This will allow modules such as pf2e-hex to add support for additional grid types to the systems aura automation.
Changes
checkAuras
function tocontainsToken
. This was done to make it so that modules extending the behavior only need to overridecontainsToken
.AuraRenderers
,AuraRenderer
,TokenAura
, andEffectAreaSquare
classes viaCONFIG.PF2E
to allow modules to access them to wrap functions.