Adjusted default artwork logic#1953
Conversation
| if (allowed === false) return false; | ||
| // Make it easier for users to override system-provided default icons | ||
| if (changed.img && !foundry.utils.getProperty(changed, "prototypeToken.texture.src")) { | ||
| if (!this.prototypeToken.texture.src || (this.prototypeToken.texture.src.includes("systems/draw-steel/"))) { |
There was a problem hiding this comment.
Looking at relevant locations where the concept of adjusting the prototype token in conjunction with the actor img, it looks like we want _initializeSource and _preUpdate as well. We should also adjust Actor.getDefaultArtwork.
Also worth considering the "show token artwork" header button (in ActorSheet#_getHeaderControls).
There was a problem hiding this comment.
I don't think _initializeSource is necessary, that's only for compendium art.
I considered adjusting the getDefaultArtwork method, but I don't think that as effectively addresses the goal of this PR: Make it easier for people to manually switch off of the system-provided art.
There was a problem hiding this comment.
Looks like I wrote preupdate when I actually meant precreate.
There was a problem hiding this comment.
I still don't think that's related to the purpose of the change I'm making.
krbz999
left a comment
There was a problem hiding this comment.
When changing the actor image, I do not want the token texture to change just because it is currently an icon from the system.
I want the token texture to change if it is the default icon. Therefore we should compare to the default artwork.
|
So, the up/downside here is practically speaking, our "default NPC art" is almost entirely based on the Monster Role, which is not going to be filled in from a simple Actor.createDialog; furthermore, if someone is just trying to switch the actor art to another one of our role icons (say you're duplicating an existing monster as a base and then making some adjustments), they would need to make sure they do the art change then the actual data change. |
|
Well It should, in my opinion, determine the default artwork using whatever data is available as the API method that it is. |
Made it easier for people manually replacing system-provided actor images.