Skip to content

Commit

Permalink
Merge pull request #13683 from BeautiDemise/Release-v0.7.1-fix
Browse files Browse the repository at this point in the history
[Project Moon TRPG] Bugfix
  • Loading branch information
NorWhal authored Jan 16, 2025
2 parents 3b77edf + fb07047 commit 6980534
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ProjectMoonTRPG/ProjectMoonTRPG.html
Original file line number Diff line number Diff line change
Expand Up @@ -17889,6 +17889,8 @@ <h4 data-il18n-placeholder="editor-pw">Edit Mode Password</h4>
let langTarget = getTranslationByKeyCustom("[TARGET]", "autoeffect-match-target");
let langTargetIcon = getTranslationByKeyCustom("[/TARGET]", "autoeffect-match-targeticon");

console.log(message);

if (checkResult == "failure") { message = message.replaceAll(langCheck, "<b>" + langFailure + "</b>"); }
if (checkResult == "no target") { message = message.replaceAll(langCheck, "<b>" + langNoTarget + "</b>"); }
else { message = message.replaceAll(langCheck, "<b>" + langSuccess + "</b>"); }
Expand All @@ -17906,8 +17908,20 @@ <h4 data-il18n-placeholder="editor-pw">Edit Mode Password</h4>
/* Icon handling */
/* Get target icon. Is in this format: [/TARGET]. If a effectIcon is procided, use that instead */
if (effectIcon != "No icon") {
if (settingLimbusStyle == "true") { effectIcon = effectIcon.replace("limbus/",""); }
message = message.replaceAll(langTargetIcon, getIcon("ailments", effectIcon, settingLimbusStyle, `class="autoEffectImage" style="background-color: ${iconColor}"`));
let iconFolder = "ailments";

if (effectIcon.includes("community")) {
iconFolder = "community";
effectIcon = effectIcon.replace("community/","");
}
if (settingLimbusStyle == "true") {
effectIcon = effectIcon.replace("limbus/","");
}
console.log(iconFolder);
console.log(effectIcon);
console.log(message);

message = message.replaceAll(langTargetIcon, getIcon(iconFolder, effectIcon, settingLimbusStyle, `class="autoEffectImage" style="background-color: ${iconColor}"`));
} else {
message = message.replaceAll(langTargetIcon, getIcon("ailments", effectTarget.replace("_"," "), settingLimbusStyle, `class="autoEffectImage" style="background-color: ${iconColor}"`));
}
Expand Down

0 comments on commit 6980534

Please sign in to comment.