Fix livre
This commit is contained in:
parent
b757411f8e
commit
ea94e27e5a
19
RdD.geany
19
RdD.geany
@ -19,26 +19,19 @@ indent_mode=2
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name=RdD
|
name=RdD
|
||||||
base_path=/home/sigmar/work/foundryvtt/foundryvtt-reve-de-dragon
|
base_path=/home/morr/work/foundryvtt/foundryvtt-reve-de-dragon
|
||||||
description=
|
description=
|
||||||
|
file_patterns=
|
||||||
|
|
||||||
[long line marker]
|
[long line marker]
|
||||||
long_line_behaviour=1
|
long_line_behaviour=1
|
||||||
long_line_column=72
|
long_line_column=72
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
current_page=5
|
current_page=2
|
||||||
FILE_NAME_0=9147;JSON;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplate.json;0;2
|
FILE_NAME_0=0;JSON;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplate.json;0;2
|
||||||
FILE_NAME_1=3682;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor-sheet.js;0;2
|
FILE_NAME_1=380;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fitem-livre-sheet.html;0;2
|
||||||
FILE_NAME_2=17891;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Factor-sheet.html;0;2
|
FILE_NAME_2=444;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fmorr%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fitem-potion-sheet.html;0;2
|
||||||
FILE_NAME_3=13913;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor.js;0;2
|
|
||||||
FILE_NAME_4=416;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fdialog-roll-carac.html;0;2
|
|
||||||
FILE_NAME_5=5840;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Frdd-utility.js;0;2
|
|
||||||
FILE_NAME_6=135;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Frdd-main.js;0;2
|
|
||||||
FILE_NAME_7=617;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fitem-competence-sheet.html;0;2
|
|
||||||
FILE_NAME_8=1217;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fitem-sort-sheet.html;0;2
|
|
||||||
FILE_NAME_9=160;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fsort-draconic.html;0;2
|
|
||||||
FILE_NAME_10=284;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fsort-tmr.html;0;2
|
|
||||||
|
|
||||||
[VTE]
|
[VTE]
|
||||||
last_dir=/home/sigmar
|
last_dir=/home/sigmar
|
||||||
|
@ -92,6 +92,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
data.data.livres = this._checkNull(data.itemsByType['livre']);
|
data.data.livres = this._checkNull(data.itemsByType['livre']);
|
||||||
data.data.potions = this._checkNull(data.itemsByType['potions']);
|
data.data.potions = this._checkNull(data.itemsByType['potions']);
|
||||||
data.data.herbes = this._checkNull(data.itemsByType['herbes']);
|
data.data.herbes = this._checkNull(data.itemsByType['herbes']);
|
||||||
|
data.data.sorts = this._checkNull(data.itemsByType['sort']);
|
||||||
data.data.competenceByCategory = data.competenceByCategory;
|
data.data.competenceByCategory = data.competenceByCategory;
|
||||||
//data.data.armes = data.itemsByType.arme;
|
//data.data.armes = data.itemsByType.arme;
|
||||||
//console.log(">>>>> data update");
|
//console.log(">>>>> data update");
|
||||||
@ -147,6 +148,12 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
this.actor.rollArme( armeName);
|
this.actor.rollArme( armeName);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Roll spell
|
||||||
|
html.find('.sort-label a').click((event) => {
|
||||||
|
let sortID = event.currentTarget.attributes['data-id'].value;
|
||||||
|
this.actor.rollSort( sortID);
|
||||||
|
});
|
||||||
|
|
||||||
// On carac change
|
// On carac change
|
||||||
html.find('.carac-value').change((event) => {
|
html.find('.carac-value').change((event) => {
|
||||||
let caracName = event.currentTarget.name.replace(".value", "").replace("data.carac.", "");
|
let caracName = event.currentTarget.name.replace(".value", "").replace("data.carac.", "");
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
import { RdDRollDialog } from "./rdd-roll-dialog.js";
|
import { RdDRollDialog } from "./rdd-roll-dialog.js";
|
||||||
|
import { RdDTMRDialog } from "./rdd-tmr-dialog.js";
|
||||||
|
|
||||||
export class RdDActor extends Actor {
|
export class RdDActor extends Actor {
|
||||||
|
|
||||||
@ -360,7 +361,15 @@ export class RdDActor extends Actor {
|
|||||||
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html', rollData);
|
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html', rollData);
|
||||||
new RdDRollDialog("carac", html, rollData, this ).render(true);
|
new RdDRollDialog("carac", html, rollData, this ).render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async rollSort( sortID )
|
||||||
|
{
|
||||||
|
console.log("Loading TMR template!!!");
|
||||||
|
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html', sortID);
|
||||||
|
new RdDTMRDialog(sortID, html, this ).render(true);
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
rollArme( armeName )
|
rollArme( armeName )
|
||||||
{
|
{
|
||||||
|
45
module/rdd-tmr-dialog.js
Normal file
45
module/rdd-tmr-dialog.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* Extend the base Dialog entity by defining a custom window to perform spell.
|
||||||
|
* @extends {Dialog}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export class RdDTMRDialog extends Dialog {
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
constructor(sort, html, actor) {
|
||||||
|
|
||||||
|
// Common conf
|
||||||
|
let dialogConf = {
|
||||||
|
content: html,
|
||||||
|
buttons:
|
||||||
|
{
|
||||||
|
rollButton:
|
||||||
|
{
|
||||||
|
label: "Lancer",
|
||||||
|
callback: html => this.performRoll(html)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
default: "rollButton"
|
||||||
|
}
|
||||||
|
let dialogOptions = { classes: [ "tmrdialog"] }
|
||||||
|
|
||||||
|
dialogConf.title = "Terres Médianes de Rêve",
|
||||||
|
dialogOptions.width = 600;
|
||||||
|
dialogOptions.height = 360;
|
||||||
|
super(dialogConf, dialogOptions);
|
||||||
|
|
||||||
|
this.sort = sort;
|
||||||
|
this.actor = actor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
performRoll (html) {
|
||||||
|
this.actor.performRoll( this.rollData );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
}
|
||||||
|
}
|
@ -94,7 +94,8 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html',
|
'systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html',
|
||||||
// Dialogs
|
// Dialogs
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html',
|
'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html'
|
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html'
|
||||||
];
|
];
|
||||||
|
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
@ -2,7 +2,7 @@
|
|||||||
"name": "foundryvtt-reve-de-dragon",
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"description": "L'implémentation de Rêve de Dragon pour FoundryVTT",
|
"description": "L'implémentation de Rêve de Dragon pour FoundryVTT",
|
||||||
"version": "0.7.8",
|
"version": "0.7.9",
|
||||||
"minimumCoreVersion": "0.6.0",
|
"minimumCoreVersion": "0.6.0",
|
||||||
"compatibleCoreVersion": "0.6.2",
|
"compatibleCoreVersion": "0.6.2",
|
||||||
"templateVersion": 17,
|
"templateVersion": 17,
|
||||||
|
@ -301,6 +301,14 @@
|
|||||||
|
|
||||||
{{!-- hautreve Tab --}}
|
{{!-- hautreve Tab --}}
|
||||||
<div class="tab hautreve" data-group="primary" data-tab="hautreve" style="height:200px">
|
<div class="tab hautreve" data-group="primary" data-tab="hautreve" style="height:200px">
|
||||||
|
<span>Sorts:</span>
|
||||||
|
<div>
|
||||||
|
{{#each data.sorts as |mysort key|}}
|
||||||
|
<li class="item flexrow" data-attribute={{key}}>
|
||||||
|
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span> <span>{{mysort.data.draconic}} - {{mysort.data.difficulte}}</span>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{!-- Equipment Tab --}}
|
{{!-- Equipment Tab --}}
|
||||||
|
17
templates/dialog-tmr.html
Normal file
17
templates/dialog-tmr.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<form class="tmr-dialog">
|
||||||
|
<h2 class="comptmrdialog" id="tmrDialogTitle"></h2>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="categorie">Etat général</label><label>{{numberFormat etat decimals=0 sign=true}}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Ajustement final : </label><label id="roll-param">10 / 0</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<img src="systems/foundryvtt-reve-de-dragon/styles/ui/terres_medianes.png" />
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
@ -10,11 +10,11 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Auteur</label>
|
<label for="xp">Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="data.auteur" value="{{data.auteur}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="data.auteur" value="{{data.auteur}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Compétence</label>
|
<label for="xp">Compétence</label>
|
||||||
<input class="attribute-value" type="text" name="data.competence" value="{{data.competence}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="data.competence" value="{{data.competence}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Difficulté</label>
|
<label for="xp">Difficulté</label>
|
||||||
|
Loading…
Reference in New Issue
Block a user