Initial import

This commit is contained in:
2023-12-11 22:24:19 +01:00
parent dfd5d2340f
commit c33b758ddd
11 changed files with 94 additions and 128 deletions

View File

@ -14,7 +14,7 @@ export class TeDeumHotbar {
if (documentData.type == "Item") {
console.log("Drop done !!!", bar, documentData, slot)
let item = documentData.data
let command = `game.system.ecryme.EcrymeHotbar.rollMacro("${item.name}", "${item.type}");`
let command = `game.system.tedeum.EcrymeHotbar.rollMacro("${item.name}", "${item.type}");`
let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command))
if (!macro) {
macro = await Macro.create({
@ -75,11 +75,11 @@ export class TeDeumHotbar {
return ui.notifications.warn(`Unable to find the item of the macro in the current actor`)
}
// Trigger the item roll
if (item.type === "weapon") {
return actor.rollWeapon( item.id)
if (item.type === "arme") {
return actor.rollArme( item.id)
}
if (item.type === "skill") {
return actor.rollSkill( item.id)
if (item.type === "competence") {
return actor.rollCompetence( item.id)
}
}