rework ActiveEffects

This commit is contained in:
Vincent Vandemeulebrouck
2021-06-29 00:56:25 +02:00
parent 3edc740d8c
commit e74f6b14d3
12 changed files with 110 additions and 154 deletions

View File

@ -18,19 +18,7 @@
<span>{{calc.resumeBlessures}}</span>
</div>
<div class="flexrow">
{{#if calc.surprise}}{{calc.surprise}}! {{/if}}
{{#if effects}}
{{#each effects as |effect key|}}
<span id="effect-{{effect.flags.core.status.statusId}} ">
<img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" />
</span>
{{/each}}
{{#if options.isGM}}
<span id="enlever-tous-effets"><a>(enlever tout)</a></span>
{{/if}}
{{else}}
Aucun effet actif
{{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-effects-partial.html"}}
</div>
</div>
</div>

View File

@ -0,0 +1,13 @@
{{#if calc.surprise}}{{calc.surprise}}! {{/if}}
{{#if effects}}
{{#each effects as |effect key|}}
<span class="active-effect" data-id="{{effect._id}}">
<img class="button-effect-img delete-active-effect" src="{{effect.icon}}" alt="{{localize effect.label}}" width="24" height="24" />
</span>
{{/each}}
{{#if options.isGM}}
<span class="enlever-tous-effets"><a>(enlever tout)</a></span>
{{/if}}
{{else}}
Aucun effet actif
{{/if}}

View File

@ -74,20 +74,8 @@
<span>{{data.compteurs.etat.label}}: {{data.compteurs.etat.value}}</span>
<span>{{data.compteurs.surenc.label}}: {{data.compteurs.surenc.value}}</span>
</div>
<div>
{{#if calc.surprise}}{{calc.surprise}}! {{/if}}
{{#if effects}}
{{#each effects as |effect key|}}
<span id="effect-{{effect.flags.core.status.statusId}} ">
<img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" />
</span>
{{/each}}
{{#if options.isGM}}
<span class="enlever-tous-effets"><a>(enlever tout)</a></span>
{{/if}}
{{else}}
Aucun effet actif
{{/if}}
<div class="flexrow">
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-effects-partial.html"}}
</div>
</div>
</div>

View File

@ -8,7 +8,7 @@
<input class="resource-content select-effect" type="checkbox" name="{{effect.id}}" {{#if effect.active}}checked{{/if}}/>
{{/if}}
<img class="button-effect-img" height="16" width="16" src="{{effect.icon}}" alt="{{ localize effect.label}}" />
<label>{{ localize effect.label}}</label>
<label>{{localize effect.label}}</label>
</li>
{{/each}}
</ul>