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

Issue new to Foundry 9 prevents chat message but trivially easy to fix... #87

Open
lupestro opened this issue Dec 23, 2021 · 0 comments

Comments

@lupestro
Copy link

I found and locally fixed a trivial issue that prevents chat message from appearing.
In the following code at the bottom of chatter.js, I replaced combatant._actor with combatant.actor:

    static placeImage(combatant) {
        if (Settings.getIncludeAnnounceImage()) {
            let img = combatant.img;
            if (combatant.actor.data.img) {
                img = combatant.actor.data.img;
            }
            return `<div style="flex:3;padding-right:4px"><img src="${img}" style="border: none;" /></div>`;
            // return `<div style="flex:3;"><video><source="${combatant.img}"></video></div>`;
        } else return '';
    }

There is another issue that already existed in utils.js in , when deleting the tiles, which I've patched locally as well. This code, which is invoked from ready, assumes that there is a scene on the canvas. A guard clause for the existence of canvas.scene before using it to call getEmbeddedCollection(...) will prevent it from spewing an error in the console.log on startup.

I have no idea what other issues exist. This module looks like it is capable of doing a lot more than what little I use it for, so as I get more into it, I'll see what I find.

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

1 participant