first commit after clone

This commit is contained in:
rwanoux
2024-04-17 11:51:59 +02:00
parent f483a219c1
commit 0fe0d530b1
3 changed files with 173 additions and 161 deletions
+1
View File
@@ -104,6 +104,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
super.activateListeners(html); super.activateListeners(html);
// Choose Totem // Choose Totem
html.find('.chooseTotem').click(this._onTotemButton.bind(this)); html.find('.chooseTotem').click(this._onTotemButton.bind(this));
html.find('.ability .rollable').click(this._onRoll.bind(this));
} }
+3 -3
View File
@@ -37,7 +37,7 @@
export const getRollBox = async function (data) { export const getRollBox = async function (data) {
let html = await renderTemplate('systems/vermine2047/templates/roll.hbs', data); let html = await renderTemplate('systems/vermine2047/templates/roll.hbs', data);
let ui = new Dialog({ let dial = new Dialog({
title: game.i18n.localize("ROLLS.tool"), title: game.i18n.localize("ROLLS.tool"),
content: html, content: html,
buttons: { buttons: {
@@ -81,7 +81,7 @@
if (formData.helped !== undefined && formData.helped == 1) { if (formData.helped !== undefined && formData.helped == 1) {
NoD += 1; NoD += 1;
} }
if (formData.abilityScore == 0){ if (formData.abilityScore == 0 || !formData.abilityScore) {
ui.notifications.notify(`veuillez saisir une caractéristique`); ui.notifications.notify(`veuillez saisir une caractéristique`);
} else return game.vermine2047.VermineRoll.roll(data.actorId, data.label, NoD, Reroll, data); } else return game.vermine2047.VermineRoll.roll(data.actorId, data.label, NoD, Reroll, data);
} }
@@ -125,5 +125,5 @@
}); });
} }
}); });
ui.render(true); dial.render(true);
} }
+17 -6
View File
@@ -2,17 +2,28 @@
{{#each config.totems as | totem tk|}} {{#each config.totems as | totem tk|}}
{{#if (ne tk "human")}} {{#if (ne tk "human")}}
{{#if (ne tk "adapted")}} {{#if (ne tk "adapted")}}
<div class="flexrow row mdb flex-group-center"> <div class="flexrow row mdb flex-group-center">
<h4 style="flex:33%;"> <h4 style="flex:33%;">
<a class="totem" data-totem="{{ tk }}" title="{{ smarttlk "TOTEMS" tk "description"}}"> <a class="totem" data-totem="{{ tk }}"
<img src="/systems/vermine2047/assets/images/ui/totems/{{ tk }}.webp" alt="{{ localize totem }}" width="80" height="80" /> title="{{ smarttlk "TOTEMS"
tk "description"}}">
<img
src="/systems/vermine2047/assets/images/ui/totems/{{ tk }}.webp"
alt="{{ localize totem }}" width="80" height="80" />
<h2>{{ smarttlk "TOTEMS"
tk "name"}}</h2>
</a> </a>
</h4> </h4>
<p style="flex:66%;text-align:left;"> <p style="flex:66%;text-align:left;">
<strong>Instincts</strong> : {{ smarttlk "TOTEMS" tk "instincts"}}<br> <strong>Instincts</strong> : {{ smarttlk "TOTEMS" tk
<strong>Interdits</strong> : {{ smarttlk "TOTEMS" tk "bans"}}<br> "instincts"}}<br>
<strong>Comportements</strong> : {{ smarttlk "TOTEMS" tk "behaviour"}}<br> <strong>Interdits</strong> : {{ smarttlk "TOTEMS" tk
<strong>Totem opposé</strong> : {{ smartcfg "totem_opposites" tk }}<br> "bans"}}<br>
<strong>Comportements</strong> : {{ smarttlk "TOTEMS" tk
"behaviour"}}<br>
<strong>Totem opposé</strong> : {{ smartcfg "totem_opposites" tk
}}<br>
</p> </p>
</div> </div>
{{/if}} {{/if}}