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,
|
limited: this.object.limited,
|
||||||
armes: duplicate(this.actor.getArmes()),
|
armes: duplicate(this.actor.getArmes()),
|
||||||
tarots: duplicate(this.actor.getTarots()),
|
tarots: duplicate(this.actor.getTarots()),
|
||||||
|
tarotsCache: duplicate(this.actor.getHiddenTarots()),
|
||||||
archetype: duplicate(this.actor.getArchetype()),
|
archetype: duplicate(this.actor.getArchetype()),
|
||||||
equipements: duplicate(this.actor.getEquipements()),
|
equipements: duplicate(this.actor.getEquipements()),
|
||||||
subActors: duplicate(this.actor.getSubActors()),
|
subActors: duplicate(this.actor.getSubActors()),
|
||||||
|
@ -102,7 +102,13 @@ export class MaleficesActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getTarots() {
|
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)
|
MaleficesUtility.sortArrayObjectsByName(comp)
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Maléfices, le Jeu de Rôle",
|
"title": "Maléfices, le Jeu de Rôle",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
||||||
"version": "10.0.14",
|
"version": "10.0.16",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.14.zip",
|
"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"
|
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
|
||||||
}
|
}
|
@ -110,7 +110,8 @@
|
|||||||
},
|
},
|
||||||
"tarot": {
|
"tarot": {
|
||||||
"tarottype": "",
|
"tarottype": "",
|
||||||
"isreversed": false,
|
"ispositif": true,
|
||||||
|
"isgm": false,
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"archetype": {
|
"archetype": {
|
||||||
|
@ -279,6 +279,9 @@
|
|||||||
<span class="item-name-label-header">
|
<span class="item-name-label-header">
|
||||||
<h3><label class="items-title-text">Tarots</label></h3>
|
<h3><label class="items-title-text">Tarots</label></h3>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="item-field-label-medium">Sens</label>
|
||||||
|
</span>
|
||||||
<div class="item-controls item-controls-fixed">
|
<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>
|
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@ -288,6 +291,35 @@
|
|||||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||||
src="{{tarot.img}}" /></a>
|
src="{{tarot.img}}" /></a>
|
||||||
<span class="item-name-label">{{tarot.name}}</span>
|
<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>
|
<div class="item-filler"> </div>
|
||||||
{{#if @root.isGM}}
|
{{#if @root.isGM}}
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
|
@ -23,16 +23,27 @@
|
|||||||
<div class="tab" data-group="primary">
|
<div class="tab" data-group="primary">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-field-label-long">Type </label>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.tarottype" value="{{system.tarottype}}" data-dtype="String">
|
||||||
|
{{#select system.tarottype}}
|
||||||
|
{{#each config.tarotType as |type key| }}
|
||||||
|
<option value="{{key}}">{{type}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{#if isGM}}
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
<label class="item-field-label-long">Type </label>
|
<label class="item-field-label-long">En positif ?</label>
|
||||||
<select class="item-field-label-long" type="text" name="system.tarottype" value="{{system.tarottype}}" data-dtype="String">
|
<input type="checkbox" class="item-field-label-short" name="system.ispositif" {{checked system.ispositif}} />
|
||||||
{{#select system.tarottype}}
|
|
||||||
{{#each config.tarotType as |type key| }}
|
|
||||||
<option value="{{key}}">{{type}}</option>
|
|
||||||
{{/each}}
|
|
||||||
{{/select}}
|
|
||||||
</select>
|
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user