Fix Dice Roll icon in toolbar in V9

This commit is contained in:
agaringer 2022-02-06 12:10:54 -05:00 committed by megastruktur
parent 007ec729cf
commit 241345bf0a

View file

@ -52,7 +52,7 @@ Hooks.once("init", async function() {
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("blades", BladesItemSheet, {makeDefault: true});
await preloadHandlebarsTemplates();
Actors.registeredSheets.forEach(element => console.log(element.Actor.name));
@ -296,5 +296,9 @@ Hooks.on("renderSceneControls", async (app, html) => {
dice_roller.click( async function() {
await simpleRollPopup();
});
html.append(dice_roller);
if ( !foundry.utils.isNewerVersion("9", game.version ?? game.data.version) ) {
html.children().first().append( dice_roller );
} else {
html.append( dice_roller );
}
});