Closed Stew-rt closed 2 years ago
aha - it looks like you can't update an "agenda" item's image, it always defaults back to personal-agenda.png
So it looks like this happens because in item-sheet.js, the overridden getData()
(presumebly this is run every time the item is interacted with) method runs this._prepareAgendaData(item)
.. which runs this.item.update({ img: 'systems/alienrpg/images/icons/personal-agenda.png'});
.
I've toyed around a bit, and using hooks into createItem
might be preferred, such as:
Hooks.on("createItem", (itemData) => {
switch (itemData.type) {
case 'agenda':
itemData.update({img: 'systems/alienrpg/images/icons/personal-agenda.png'});
case 'any other type':
itemData.update({img: 'systems/alienrpg/images/icons/some-icon.png'});
}
});
There is another hook called preCreateItem
.. but it doesn't like the update
method, as the item dousn't yet have an _id
I can probably provide a PR if desired... but wanted to check you didn't hate this first...
.. I've also made images of the backs of the story cards from the pdfs for DoW and HoH.. because i'm a pedant, if they would be accepted into the premium modules, i can provide them..
That is the way it's supposed to work.
Ok, cool. closing this issue then.
It's entirely possible this is intentional.
But the Story Card items supplied by this module change their icon to personal-agenda.png upon interacting with them in the new version.
so, either a very minor bug, or me being an idiot.