diff --git a/css/coc.css b/css/coc.css index 3db1d49e..83795711 100644 --- a/css/coc.css +++ b/css/coc.css @@ -1074,6 +1074,7 @@ color: #464331c4; text-align: center; border: none; + justify-content: center; } .coc.base nav.sheet-navigation.tabs .item { text-overflow: ellipsis; @@ -1086,6 +1087,7 @@ height: 28px; box-shadow: 0 0 10px #00000052 inset; background: #AAA; + width: 16.66%; } .coc.base nav.sheet-navigation.tabs .item:hover { color: #464331c4; diff --git a/module/system/hooks.js b/module/system/hooks.js index b457f160..cc1bbf0e 100644 --- a/module/system/hooks.js +++ b/module/system/hooks.js @@ -80,29 +80,30 @@ export default function registerHooks() { let command = `let onlyDamage = false;\nlet customLabel = "";\nlet skillDescription = "";\nlet dmgDescription = "";\n\nif (event) {\n if (event.shiftKey) onlyDamage = true;\n}\n\ngame.coc.macros.rollItemMacro("${item._id}", "${item.name}", "${item.type}", 0, 0, 0, onlyDamage, customLabel, skillDescription, dmgDescription);`; - let macro = game.macros.entities.find(m => (m.name === item.name) && (m.command === command)); + let macro = game.macros.contents.find(m => (m.name === item.name) && (m.data.command === command)); if (!macro) { macro = await Macro.create({ name: item.name, type : "script", img: item.img, command : command - }, {displaySheet: false}) + }, {displaySheet: false}); + game.user.assignHotbarMacro(macro, slot); } - game.user.assignHotbarMacro(macro, slot); + } // Create a macro to open the actor sheet of the actor dropped on the hotbar else if (data.type == "Actor") { let actor = game.actors.get(data.id); let command = `game.actors.get("${data.id}").sheet.render(true)` - let macro = game.macros.entities.find(m => (m.name === actor.name) && (m.command === command)); + let macro = game.macros.contents.find(m => (m.name === actor.name) && (m.data.command === command)); if (!macro) { macro = await Macro.create({ name: actor.data.name, type: "script", img: actor.data.img, command: command - }, {displaySheet: false}) + }, {displaySheet: false}); game.user.assignHotbarMacro(macro, slot); } } @@ -110,14 +111,14 @@ export default function registerHooks() { else if (data.type == "JournalEntry") { let journal = game.journal.get(data.id); let command = `game.journal.get("${data.id}").sheet.render(true)` - let macro = game.macros.entities.find(m => (m.name === journal.name) && (m.command === command)); + let macro = game.macros.contents.find(m => (m.name === journal.name) && (m.data.command === command)); if (!macro) { macro = await Macro.create({ name: journal.data.name, type: "script", img: (journal.data.img) ? journal.data.img : "icons/svg/book.svg", command: command - }, {displaySheet: false}) + }, {displaySheet: false}); game.user.assignHotbarMacro(macro, slot); } } diff --git a/styles/components/base/tabs.less b/styles/components/base/tabs.less index 85298279..fa04f335 100644 --- a/styles/components/base/tabs.less +++ b/styles/components/base/tabs.less @@ -6,6 +6,7 @@ nav.sheet-navigation { color: @c-darkbrown; text-align: center; border: none; + justify-content: center; .item { .ellipsis(); @@ -16,6 +17,7 @@ nav.sheet-navigation { height: 28px; box-shadow: 0 0 10px @c-shadow inset; background:#AAA; + width: 16.66%; &:hover { color: @c-darkbrown; background:#CCC; diff --git a/system.json b/system.json index dadbd977..35844997 100644 --- a/system.json +++ b/system.json @@ -2,11 +2,18 @@ "name": "coc", "title": "Chroniques Oubliées Contemporain", "description": "

Système Foundry VTT pour Chroniques Oubliées Contemporain.

*** Rejoignez la communauté Discord FR :https://discord.gg/pPSDNJk

", - "version": "0.8.9.6", - "minimumCoreVersion": "0.8.6", - "compatibleCoreVersion": "0.8.9", + "version": "9.238.1", + "minimumCoreVersion": "9", + "compatibleCoreVersion": "9.238", "templateVersion": 2, - "author": "Zigmund", + "authors": [ + { + "name": "Zigmund" + }, + { + "name": "Kristov" + } + ], "scripts": [], "esmodules": [ "module/coc.js" @@ -32,7 +39,7 @@ "label": "Capacités", "system": "coc", "path": "./packs/capacities.db", - "entity": "Item", + "type": "Item", "tag": "capacity" }, { @@ -40,7 +47,7 @@ "label": "Equipement", "system": "coc", "path": "./packs/items.db", - "entity": "Item", + "type": "Item", "tag": "item" }, { @@ -48,7 +55,7 @@ "label": "Voies", "system": "coc", "path": "./packs/paths.db", - "entity": "Item", + "type": "Item", "tag": "path" }, { @@ -56,7 +63,7 @@ "label": "Profils", "system": "coc", "path": "./packs/profiles.db", - "entity": "Item", + "type": "Item", "tag": "profile" }, { @@ -64,7 +71,7 @@ "label": "Traits", "system": "coc", "path": "./packs/traits.db", - "entity": "Item", + "type": "Item", "tag": "trait" }, { @@ -72,7 +79,7 @@ "label": "Tables", "system": "coc", "path": "./packs/tables.db", - "entity": "RollTable", + "type": "RollTable", "tag": "table" }, { @@ -80,7 +87,7 @@ "label": "Macros", "system": "coc", "path": "./packs/macros.db", - "entity": "Macro", + "type": "Macro", "tag": "macro" } ], @@ -91,6 +98,6 @@ "secondaryTokenAttribute": null, "url": "https://github.com/ZigmundKreud/coc", "manifest": "https://raw.githubusercontent.com/ZigmundKreud/coc/master/system.json", - "download": "https://github.com/ZigmundKreud/coc/archive/refs/tags/0.8.9.6.zip", + "download": "https://github.com/ZigmundKreud/coc/archive/refs/tags/9.238.1.zip", "license": "LICENCE" } \ No newline at end of file