Update CSS/Look & feel
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Macro pour remplacer les chemins d'images dans les compendiums
|
||||
* Remplace "fvtt-hawkmoon-cyd" par "fvtt-mournblade-cyd2" dans tous les champs 'img'
|
||||
* Remplace "fvtt-hawkmoon-cyd" par "fvtt-mournblade-cyd-2-0" dans tous les champs 'img'
|
||||
*/
|
||||
|
||||
(async () => {
|
||||
@@ -10,7 +10,7 @@
|
||||
content: `<p>Cette macro va :</p>
|
||||
<ul>
|
||||
<li>Déverrouiller tous les compendiums</li>
|
||||
<li>Remplacer "fvtt-hawkmoon-cyd" par "fvtt-mournblade-cyd2" dans tous les champs 'img'</li>
|
||||
<li>Remplacer "fvtt-hawkmoon-cyd" par "fvtt-mournblade-cyd-2-0" dans tous les champs 'img'</li>
|
||||
<li>Reverrouiller les compendiums</li>
|
||||
</ul>
|
||||
<p><strong>Voulez-vous continuer ?</strong></p>`,
|
||||
@@ -49,14 +49,14 @@
|
||||
|
||||
// Vérifier le champ img principal
|
||||
if (doc.img && doc.img.includes("fvtt-hawkmoon-cyd")) {
|
||||
updateData.img = doc.img.replace(/fvtt-hawkmoon-cyd/g, "fvtt-mournblade-cyd2");
|
||||
updateData.img = doc.img.replace(/fvtt-hawkmoon-cyd/g, "fvtt-mournblade-cyd-2-0");
|
||||
needsUpdate = true;
|
||||
}
|
||||
|
||||
// Pour les acteurs, vérifier aussi prototypeToken.texture.src
|
||||
if (doc.documentName === "Actor" && doc.prototypeToken?.texture?.src) {
|
||||
if (doc.prototypeToken.texture.src.includes("fvtt-hawkmoon-cyd")) {
|
||||
updateData["prototypeToken.texture.src"] = doc.prototypeToken.texture.src.replace(/fvtt-hawkmoon-cyd/g, "fvtt-mournblade-cyd2");
|
||||
updateData["prototypeToken.texture.src"] = doc.prototypeToken.texture.src.replace(/fvtt-hawkmoon-cyd/g, "fvtt-mournblade-cyd-2-0");
|
||||
needsUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@
|
||||
// Pour les scènes, vérifier background.src et les tokens
|
||||
if (doc.documentName === "Scene") {
|
||||
if (doc.background?.src && doc.background.src.includes("fvtt-hawkmoon-cyd")) {
|
||||
updateData["background.src"] = doc.background.src.replace(/fvtt-hawkmoon-cyd/g, "fvtt-mournblade-cyd2");
|
||||
updateData["background.src"] = doc.background.src.replace(/fvtt-hawkmoon-cyd/g, "fvtt-mournblade-cyd-2-0");
|
||||
needsUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user