Skip to content
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

[BREAKING CHANGES] Many bug fixing and some not retrocompatibility changes #82

Merged
merged 22 commits into from
Mar 14, 2024

Conversation

p4535992
Copy link
Contributor

@p4535992 p4535992 commented Mar 10, 2024

In this PR I rewrote quite a bit of stuff...test it as much as you can...it seems to me that it all works....

The foundry core not accept anymore flags with a scope not equals to the module id...

  /** @inheritdoc */
  getFlagScopes() {
    if ( this.#flagScopes ) return this.#flagScopes;
    const scopes = ["core", "world", game.system.id]; 
    for ( const module of game.modules ) {
      if ( module.active ) scopes.push(module.id); // why the hell ????
    }
    return this.#flagScopes = scopes;
  }

So anyway now we must migrate all the old scoped flags magicitems to the new scoped flag magic-items-2 as standard (this is why I didn't understand the error at first in all my modules i always used the standard of using module id as the scope of the flags)

I created a dangerous (but tested) function in the module api to be launched manually and after making a safety backup...

game.modules.get("magic-items-2").api.fixFlagsScopeDataOnAllActors()

A brief re-epilogue of this PR

@PwQt PwQt self-assigned this Mar 10, 2024
@PwQt PwQt self-requested a review March 10, 2024 14:53
@PwQt
Copy link
Owner

PwQt commented Mar 10, 2024

I'll check this during the week, thanks for the help 🤗

@AGCeyx
Copy link

AGCeyx commented Mar 12, 2024

@PwQt and @p4535992 thank you for your effort. Is there any way I can help you in testing this? I am using magic items 2 on the forge, how can I apply the patch there? I had been reporting the Bug #78 which is related

@PwQt
Copy link
Owner

PwQt commented Mar 12, 2024

@AGCeyx not really on forge, if you have a local instance you just pull the branch into the /modules/ directory and run

npm install

npm dev to test the functionality

PwQt
PwQt previously approved these changes Mar 12, 2024
Copy link
Owner

@PwQt PwQt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be working good, at least the codeside is okay looking for me, i'll test more on Thursday evening and make a release then

@PwQt PwQt merged commit c53c148 into PwQt:master Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants