Closed farling42 closed 1 year ago
Also the description of using tokenActionHudSystemReady
might be better by describing it as:
- The document for
doRenderItem
doesn't mention that the action's name must be "itemMacro" in order for this to work.
All good, I think, apart from this quoted one, which I don't understand. "itemMacro" is used in reference to the Item Macro module when building and handling its actions, but shouldn't go anywhere near the doRenderItem
method. doRenderItem
uses the item object to render its sheet.
- The document for
doRenderItem
doesn't mention that the action's name must be "itemMacro" in order for this to work.All good, I think, apart from this quoted one, which I don't understand. "itemMacro" is used in reference to the Item Macro module when building and handling its actions, but shouldn't go anywhere near the
doRenderItem
method.doRenderItem
uses the item object to render its sheet.
That comment is based on looking at the code in HUD Core. It checks for a value of "itemMacro" before calling doRenderItem (in the PreRollHandler class?). Specifically at https://github.com/Larkinabout/fvtt-token-action-hud-core/blob/1562fad87201c365d2f88830d98d46311f6067d6/scripts/roll-handlers/pre-item-macro.js#L17
I assumed that was code that would trigger doRenderItem from HUD Core, rather than all modules having to manually code
if (this.isRenderItem()) this.doRenderItem(actorId, tokenId, actionId)
Ah, okay, that pre-roll handler is just for handling the Item Macro actions.
I'm not sure if there would be a good way of handling rendering of the item sheet in TAH Core as the encodedValue is defined by the system module and could be in any format.
Think these are all resolved now.
The actions for addActionsToActionList is missing information about the 'img' property.
The document for
doRenderItem
doesn't mention that the action's name must be "itemMacro" in order for this to work.The documentation for
getImage
doesn't mention that it only returns the image if the HUD Core optionDisplay Icons
is selected.The section
Import Token Action HUD Core Classes Example
would look better if it used JS like:The 'delimiter property is missing from the description of ActionHandler class. It would be good if this value was also available in the RollHandler class (for use by encodedValue.split(...)).