ENH: Gold
parent
b91356766d
commit
83fa2f1744
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
|
@ -15,7 +15,9 @@
|
|||
"OSE.dialog.partysheet": "Fiche de Groupe",
|
||||
"OSE.dialog.selectActors": "Choisir PJs",
|
||||
"OSE.dialog.dealXP": "Donner XP",
|
||||
"OSE.dialog.generator": "Générateur de personnage",
|
||||
"OSE.dialog.generateSaves": "Générer les Sauvegardes",
|
||||
"OSE.dialog.generateScore": "Création: {score}",
|
||||
|
||||
"OSE.Formula": "Formule",
|
||||
"OSE.SitMod": "Mod. de situation",
|
||||
|
|
|
@ -82,6 +82,7 @@ export class OseActorSheet extends ActorSheet {
|
|||
let summary = li.parents(".item-entry").children(".item-summary");
|
||||
summary.slideUp(200, () => summary.remove());
|
||||
} else {
|
||||
// Add item tags
|
||||
let div = $(`<div class="item-summary"><ol class="tag-list">${item.getTags()}</ol><div>${description}</div></div>`);
|
||||
li.parents(".item-entry").append(div.hide());
|
||||
div.slideDown(200);
|
||||
|
|
|
@ -41,7 +41,6 @@ export class OseActorSheetCharacter extends OseActorSheet {
|
|||
async _render(...args) {
|
||||
super._render(...args).then(() => {
|
||||
if (this.actor.isNew()) {
|
||||
event.preventDefault();
|
||||
new OseCharacterCreator(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2,
|
||||
|
|
|
@ -68,10 +68,6 @@ export class OseActor extends Actor {
|
|||
}
|
||||
}
|
||||
|
||||
generator() {
|
||||
|
||||
}
|
||||
|
||||
generateSave(hd) {
|
||||
let saves = {};
|
||||
for (let i = 0; i <= hd; i++) {
|
||||
|
|
|
@ -94,11 +94,37 @@ export class OseCharacterCreator extends FormApplication {
|
|||
});
|
||||
});
|
||||
|
||||
html.find('a.gold-roll').click((ev) => {
|
||||
let el = ev.currentTarget.parentElement.parentElement.parentElement;
|
||||
this.rollScore("Gold", {event: ev}).then(r => {
|
||||
$(el).find('.gold-value').val(r.total * 10);
|
||||
});
|
||||
});
|
||||
|
||||
html.find('input.score-value').change(ev => {
|
||||
this.doStats(ev);
|
||||
})
|
||||
}
|
||||
|
||||
async _onSubmit(event, {updateData=null, preventClose=false, preventRender=false}={}) {
|
||||
super._onSubmit(event, {updateData: updateData, preventClose: preventClose, preventRender: preventRender});
|
||||
// Generate gold
|
||||
let gold = event.target.elements.namedItem('gold').value;
|
||||
const itemData = {
|
||||
name: "Gold pieces",
|
||||
type: "item",
|
||||
img: "/systems/ose/assets/gold.png",
|
||||
data: {
|
||||
treasure: true,
|
||||
cost: 1,
|
||||
weight: 1,
|
||||
quantity: {
|
||||
value: gold
|
||||
}
|
||||
}
|
||||
};
|
||||
this.object.createOwnedItem(itemData);
|
||||
}
|
||||
/**
|
||||
* This method is called upon form submission after form data is validated
|
||||
* @param event {Event} The initial triggering submission event
|
||||
|
|
|
@ -29,6 +29,17 @@
|
|||
<span class="std">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label>Gold </label>
|
||||
<div class="form-fields">
|
||||
<a class="gold-roll"><i class="fas fa-dice"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="form-group">
|
||||
<input id="gold" class="gold-value" type="text" value="0" disabled/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sheet-footer">
|
||||
|
|
Loading…
Reference in New Issue