Update tarot management
This commit is contained in:
parent
06537cbcd9
commit
1923a63ebf
@ -37,6 +37,7 @@ export class MaleficesActorSheet extends ActorSheet {
|
||||
limited: this.object.limited,
|
||||
armes: duplicate(this.actor.getArmes()),
|
||||
tarots: duplicate(this.actor.getTarots()),
|
||||
tarotsCache: duplicate(this.actor.getHiddenTarots()),
|
||||
archetype: duplicate(this.actor.getArchetype()),
|
||||
equipements: duplicate(this.actor.getEquipements()),
|
||||
subActors: duplicate(this.actor.getSubActors()),
|
||||
|
@ -102,7 +102,13 @@ export class MaleficesActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getTarots() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'tarot') || [])
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'tarot' && !item.system.isgm) || [])
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getHiddenTarots() {
|
||||
let comp = duplicate(this.items.filter(item => item.type == 'tarot' && item.system.isgm) || [])
|
||||
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||
return comp;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@
|
||||
],
|
||||
"title": "Maléfices, le Jeu de Rôle",
|
||||
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
||||
"version": "10.0.14",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.14.zip",
|
||||
"version": "10.0.16",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.16.zip",
|
||||
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
|
||||
}
|
@ -110,7 +110,8 @@
|
||||
},
|
||||
"tarot": {
|
||||
"tarottype": "",
|
||||
"isreversed": false,
|
||||
"ispositif": true,
|
||||
"isgm": false,
|
||||
"description": ""
|
||||
},
|
||||
"archetype": {
|
||||
|
@ -279,6 +279,9 @@
|
||||
<span class="item-name-label-header">
|
||||
<h3><label class="items-title-text">Tarots</label></h3>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="item-field-label-medium">Sens</label>
|
||||
</span>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
@ -288,6 +291,35 @@
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{tarot.img}}" /></a>
|
||||
<span class="item-name-label">{{tarot.name}}</span>
|
||||
<span class="item-field-label-medium"><label>{{#if tarot.system.ispositif}}Positif{{else}}Négatif{{/if}}</label></span>
|
||||
<div class="item-filler"> </div>
|
||||
{{#if @root.isGM}}
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow list-item items-title-bg">
|
||||
<span class="item-name-label-header">
|
||||
<h3><label class="items-title-text">Tarot secret(MJ)</label></h3>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="item-field-label-medium">Sens</label>
|
||||
</span>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each tarotsCache as |tarot key|}}
|
||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{tarot._id}}">
|
||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||
src="{{tarot.img}}" /></a>
|
||||
<span class="item-name-label">{{tarot.name}}</span>
|
||||
<span class="item-field-label-medium"><label>{{#if tarot.system.ispositif}}Positif{{else}}Négatif{{/if}}</label></span>
|
||||
<div class="item-filler"> </div>
|
||||
{{#if @root.isGM}}
|
||||
<div class="item-controls item-controls-fixed">
|
||||
|
@ -34,6 +34,17 @@
|
||||
</select>
|
||||
</li>
|
||||
|
||||
{{#if isGM}}
|
||||
<li class="flexrow">
|
||||
<label class="item-field-label-long">En positif ?</label>
|
||||
<input type="checkbox" class="item-field-label-short" name="system.ispositif" {{checked system.ispositif}} />
|
||||
</li>
|
||||
<li class="flexrow">
|
||||
<label class="item-field-label-long">Carte cachée (ie MJ seulement) ?</label>
|
||||
<input type="checkbox" class="item-field-label-short" name="system.isgm" {{checked system.isgm}} />
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user