Armes/Protections/Equipement

This commit is contained in:
sladecraven 2022-10-24 17:34:04 +02:00
parent c7b1ba1ce1
commit 853ad1c457
5 changed files with 47 additions and 24 deletions

View File

@ -129,13 +129,21 @@ export class HawkmoonItemSheet extends ItemSheet {
html.find('.delete-subitem').click(ev => {
this.deleteSubitem(ev);
})
html.find('.edit-prediction').change(ev => {
html.find('.edit-predilection').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].name = ev.currentTarget.value
this.object.update( { 'data.predilections': pred })
})
html.find('.edit-predilection-description').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].description = ev.currentTarget.value
this.object.update( { 'data.predilections': pred })
})
html.find('.delete-prediction').click(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
@ -143,7 +151,14 @@ export class HawkmoonItemSheet extends ItemSheet {
pred.splice(index,1)
this.object.update( { 'data.predilections': pred })
})
html.find('.use-prediction').change(ev => {
html.find('.predilection-maitrise').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].maitrise = ev.currentTarget.checked
this.object.update( { 'data.predilections': pred })
})
html.find('.predilection-used').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)

View File

@ -1,7 +1,7 @@
{
"id": "fvtt-hawkmoon-cyd",
"description": "Hawmoon RPG for FoundryVTT (CYD system - French)",
"version": "10.0.1",
"version": "10.0.2",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@ -15,7 +15,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.0.1.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.0.2.zip",
"packs": [
{
"type": "Item",

View File

@ -125,12 +125,10 @@
"utilisation": "",
"prerequis": "",
"isbonus": false,
"bonusformula": "",
"bonusvalue": 0,
"isbonusba": false,
"coutba": 0,
"bonus": 0,
"bonuscompetence": "",
"duree": "",
"pointame": 0,
"templates": [
"base"
]
@ -150,6 +148,7 @@
"talentsaguerri": "",
"prerequismaitre": "",
"talentsmaitre": "",
"celluleinfo": "",
"equipement": "",
"templates": [
"base"

View File

@ -65,17 +65,18 @@
{{#each system.predilections as |predilection key|}}
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<input type="text" class="padd-right color-class-common edit-predilection"
name="system.predilections[{{key}}]" value="{{predilection.name}}" data-dtype="String" />
value="{{predilection.name}}" data-dtype="String" />
</li>
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<textarea row="4" type="text" class="padd-right color-class-common edit-predilection-description"
name="system.predilections[{{key}}]" value="{{predilection.description}}" data-dtype="String"></textarea>
data-dtype="String">{{predilection.description}}</textarea>
</li>
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<label class="generic-label">Maitrise ? <input class="predilection-maitrise" type="checkbox"
name="predilection.maitrise" {{checked predilection.maitrise}} /></label>
<label class="generic-label">Utilisée ? <input class="use-predilection" type="checkbox"
name="predilection.used" {{checked predilection.used}} /></label>
{{checked predilection.maitrise}} /></label>
<label class="generic-label">Utilisée ? <input class="predilection-used" type="checkbox"
{{checked predilection.used}} /></label>
<a class="item-control delete-prediction" title="Supprimer une predilection"><i
class="fas fa-trash"></i></a>
</li>

View File

@ -50,36 +50,36 @@
<label class="generic-label">Talents Initié : </label>
</li>
<li class="flexrow item">
<textarea type="text" rows="4" class="padd-right status-small-label color-class-common"
name="system.talentsinitie" value="{{system.talentsinitie}}" data-dtype="String"></textarea>
<textarea type="text" rows="3" class="padd-right status-small-label color-class-common"
name="system.talentsinitie" data-dtype="String">{{system.talentsinitie}}</textarea>
</li>
<li class="flexrow item">
<label class="generic-label">Prérequis Aguerri : </label>
</li>
<li class="flexrow item">
<input type="text" class="padd-right status-small-label color-class-common" name="system.prerequisaguerri"
value="{{system.prerequisaguerri}}" data-dtype="String" />
<textarea type="text" rows="3" class="padd-right status-small-label color-class-common"
name="system.prerequisaguerri" data-dtype="String">{{system.prerequisaguerri}}</textarea>
</li>
<li class="flexrow item">
<label class="generic-label">Talents Aguerri : </label>
</li>
<li class="flexrow item">
<textarea row="4" type="text" class="padd-right status-small-label color-class-common"
name="system.talentsaguerri" value="{{system.talentsaguerri}}" data-dtype="String"></textarea>
<textarea rows="3" type="text" class="padd-right status-small-label color-class-common"
name="system.talentsaguerri" data-dtype="String">{{system.talentsaguerri}}</textarea>
</li>
<li class="flexrow item">
<label class="generic-label">Prérequis Maître : </label>
</li>
<li class="flexrow item">
<input type="text" class="padd-right status-small-label color-class-common" name="system.prerequismaitre"
value="{{system.prerequismaitre}}" data-dtype="String" />
<textarea rows="3" type="text" class="padd-right status-small-label color-class-common"
name="system.prerequismaitre" data-dtype="String">{{system.prerequismaitre}}</textarea>
</li>
<li class="flexrow item">
<label class="generic-label">Talents Maître : </label>
</li>
<li class="flexrow item">
<textarea row="4" type="text" class="padd-right status-small-label color-class-common"
name="system.talentsmaitre" value="{{system.talentsmaitre}}" data-dtype="String"></textarea>
<textarea rows="3" type="text" class="padd-right status-small-label color-class-common"
name="system.talentsmaitre" data-dtype="String">{{system.talentsmaitre}}</textarea>
</li>
<li class="flexrow item">
<label class="generic-label">Equipement : </label>
@ -88,6 +88,14 @@
<input type="text" class="padd-right status-small-label color-class-common" name="system.equipement"
value="{{system.equipement}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Contribution à la création de la cellule : </label>
</li>
<li class="flexrow item">
<textarea rows="3" type="text" class="padd-right status-small-label color-class-common"
name="system.celluleinfo" data-dtype="String">{{system.celluleinfo}}</textarea>
</li>
</ul>
</div>