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

Version update: v10 #20

Open
BoardGames482 opened this issue Feb 8, 2023 · 2 comments
Open

Version update: v10 #20

BoardGames482 opened this issue Feb 8, 2023 · 2 comments

Comments

@BoardGames482
Copy link

Is it possible to update this for v10?
I really enjoyed using it for v9 but it has lots of errors and warning for v10.

Some examples:

  • Error: You are accessing the sToken#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly.

  • You are accessing the gActor#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly

  • You are accessing gActor#data which has been migrated to gActor#system

  • You are accessing PlaceableObject#data which is no longer used and instead the Document class should be referenced directly as PlaceableObject#document.

  • SmoothShader.ts:4 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'clear') [Detected 2 packages: resource-icons, lib-wrapper]

I'm open to helping with the updating process.

@BoardGames482
Copy link
Author

I added the changes from 0d73640 and it seems to have fixed most issues.
I did run into some errors at the begining (see below) but after leaving the game and re-entering as well as deleting the Token's and dragging new ones onto the scene, those errors have gone away.

The only remaining issue is that the Resource Icon's "game settings" tab is no longer visible so I can't change settings such as the side of the token that the icons appear on. Not sure why this is?

The issue I was having was a Error thrown in hooked function '' for hook 'updateActor' after clicking the save button on the Customize Token dialogue window.

With the following console output

TypeError: Cannot convert undefined or null to object
[Detected 1 package: resource-icons]
    at Function.entries (<anonymous>)
    at Token.refreshResourceIcons (main.js:15:43)
    at Object.fn (main.js:51:51)
    at #call (foundry.js:724:20)
    at Hooks.callAll (foundry.js:681:17)
    at ClientDatabaseBackend.callback (foundry.js:12824:13)
    at foundry.js:12766:43
    at Array.map (<anonymous>)
    at ClientDatabaseBackend._handleUpdateDocuments (foundry.js:12766:33)
    at ClientDatabaseBackend._updateDocuments (foundry.js:12639:17)
    at async gActor.updateDocuments (commons.js:6153:23)
    at async gActor.update (commons.js:6250:23)
    at async ResourceIconConfig._updateObject (ResourceIconConfig.js:71:9)
    at async ResourceIconConfig._onSubmit (foundry.js:5916:7)

then when I tried to update the appropriate resource on the character sheet I got this error:

TypeError: Cannot convert undefined or null to object
[Detected 2 packages: resource-icons, system:sandbox]
    at Function.entries (<anonymous>)
    at Token.refreshResourceIcons (main.js:15:43)
    at Object.fn (main.js:51:51)
    at #call (foundry.js:724:20)
    at Hooks.callAll (foundry.js:681:17)
    at ClientDatabaseBackend.callback (foundry.js:12824:13)
    at foundry.js:12766:43
    at Array.map (<anonymous>)
    at ClientDatabaseBackend._handleUpdateDocuments (foundry.js:12766:33)
    at ClientDatabaseBackend._updateDocuments (foundry.js:12639:17)
    at async gActor.updateDocuments (commons.js:6153:23)
    at async gActor.update (commons.js:6250:23)
    at async HTMLElement.<anonymous> (gactorsheet.js:173:13)

@jessev14
Copy link
Owner

jessev14 commented Feb 8, 2023

The settings thing is cause I haven't re-implemented the settings into the latest rewrite of the module.

I'm still working on icon configuration app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants