BeneosBattlemaps / beneos-module

1 stars 2 forks source link

Request for improved compatibility #136

Closed Saibot393 closed 6 months ago

Saibot393 commented 6 months ago

Hi, so a user of one of my modules (rideable) reported an issue in combination with this module. The module seems to consist of (Certain) tokens starting and not stopping to move when certain rideable actions are used or riding tokens simply not moving. I have looked through the code and i think the problem might be related to the tokenRotateThenMove function in the beneos_utility.js: The function does not seem to take the context from the triggering token pre update into account. Giving the context as a parameter and adding the context to the two updates seems to fix the problems, based on my preliminary testing. Could you add that to the function? (I didn't want to do a PR since i am not sure off all the interactions of this function)

LeRatierBretonnien commented 6 months ago

Ok, thanks for the report ! I understand it has to do with token "riding" with another token, right? Is there a module used to do that ? Post the code changes as an attachment, I will check and fix.

Saibot393 commented 6 months ago

So the module used for the riding is Rideable, since the code will affect multiple files it might be easier to do via PR, if you are ok with that.

LeRatierBretonnien commented 6 months ago

Yes post the PR. What I want to avoid, is to do modifications for a very specific module that will break other working things. At the end of the day, the default solution will be to deactivate auto-rotate when the "Rideable" module is detected.

Saibot393 commented 6 months ago

I understand not wanting to implement an extra solution for every module. I think the changes i propose are pretty minor though and would probably als increase compatibility with other modules.

LeRatierBretonnien commented 6 months ago

Merged, will be available in next module release.