I need to add some handlebars, since I didnt find where to put them:
NOTE: already added to helpers.js
$$2("zhConditionLadderLoc", function(name, choices, options) {
const checked = options.hash["checked"] ?? 5;
let html = "";
let uuid = uuidv4();
for (let i = choices.length - 1; i >= 0; i--) {
const isChecked = checked == i;
html += `
<div class="radio-and-status">
<input type="radio" class="radio-rank"
id="${uuid}.${i}" name="${name}"
value="${i}" data-dtype="Number" ${isChecked ? "checked" : ""}>
<label for="${uuid}.${i}" class="status">
<span><span>` + game.i18n.localize('ZWEI.actor.conditions.' + choices[i]) + `</span></span>
</label>
</div>`;
}
return new Handlebars.SafeString(html);
});
$$2("zhGetBonus", function(word) {
if (typeof word !== "string")
return game.i18n.localize('ZWEI.actor.bonuses.' + 'B');
return game.i18n.localize('ZWEI.actor.bonuses.' + word.charAt(0).toUpperCase() + 'B')
});
$$2("zhConcat", (...strs) =>
strs.filter((s) => typeof s !== "object").join("")
);
$$2("zhSkillRankAbbreviationLoc", function(rank) {
return ["-", game.i18n.localize('ZWEI.actor.skills.rankabbreviation.apprentice'),
game.i18n.localize('ZWEI.actor.skills.rankabbreviation.journeyman'),
game.i18n.localize('ZWEI.actor.skills.rankabbreviation.master')][rank];
});
I need also to modify some css, since the Peril and Damage tracker for creatures uses the css, or at least remove the title "Peril"/"Damage" in the css and put it in the corresponding template:
The keys are ZWEI.actor.secondary.peril and ZWEI.actor.secondary.damage
Finally, I have not translated currency since is a system setting, I do not know how to deal with it, if I register the currency depending on the language, probably most items (in english) wont show the right price, so I dont know if I have to translate it at rendering the price sheet.
A few considerations:
I need to add some handlebars, since I didnt find where to put them: NOTE: already added to helpers.js
I need also to modify some css, since the Peril and Damage tracker for creatures uses the css, or at least remove the title "Peril"/"Damage" in the css and put it in the corresponding template:
The keys are ZWEI.actor.secondary.peril and ZWEI.actor.secondary.damage
Finally, I have not translated currency since is a system setting, I do not know how to deal with it, if I register the currency depending on the language, probably most items (in english) wont show the right price, so I dont know if I have to translate it at rendering the price sheet.