First v10 release
This commit is contained in:
@@ -5,7 +5,7 @@ export class Imperium5RollDialog extends Dialog {
|
||||
/* -------------------------------------------- */
|
||||
static async create(actor, rollData ) {
|
||||
|
||||
let options = { classes: ["Imperium5Dialog"], width: 620, height: 380, 'z-index': 99999 }
|
||||
let options = { classes: ["Imperium5Dialog"], width: 320, height: 380, 'z-index': 99999 }
|
||||
let html = await renderTemplate('systems/fvtt-imperium5/templates/roll-dialog-generic.html', rollData)
|
||||
|
||||
return new Imperium5RollDialog(actor, rollData, html, options )
|
||||
@@ -41,6 +41,11 @@ export class Imperium5RollDialog extends Dialog {
|
||||
Imperium5Utility.rollImperium5( this.rollData )
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
updatePCPool() {
|
||||
let value = Imperium5Utility.computeDiceReserve(this.rollData)
|
||||
$('#ame-total').html(value )
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
activateListeners(html) {
|
||||
@@ -48,7 +53,29 @@ export class Imperium5RollDialog extends Dialog {
|
||||
|
||||
var dialog = this
|
||||
function onLoad() {
|
||||
dialog.updatePCPool()
|
||||
}
|
||||
$(function () { onLoad(); })
|
||||
$(function () { onLoad(); })
|
||||
|
||||
html.find('#select-realite-dice').change(async (event) => {
|
||||
this.rollData.realiteDice = Number(event.currentTarget.value)
|
||||
})
|
||||
html.find('#select-capacite').change(async (event) => {
|
||||
this.rollData.usedCapacite = String(event.currentTarget.value)
|
||||
this.updatePCPool()
|
||||
})
|
||||
html.find('#select-use-archetype').change(async (event) => {
|
||||
this.rollData.useArchetype = event.currentTarget.checked
|
||||
this.updatePCPool()
|
||||
})
|
||||
html.find('#select-use-aide').change(async (event) => {
|
||||
this.rollData.useAide = event.currentTarget.checked
|
||||
this.updatePCPool()
|
||||
})
|
||||
html.find('#select-use-karma').change(async (event) => {
|
||||
this.rollData.useKarma = event.currentTarget.checked
|
||||
this.updatePCPool()
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user