Minor fixes
This commit is contained in:
parent
0ef282dd93
commit
a203163b12
BIN
images/icons/icon_money.webp
Normal file
BIN
images/icons/icon_money.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -107,13 +107,13 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
this.actor.delSubActor(actorId);
|
||||
});
|
||||
|
||||
html.find('.equipement-moins').click(event => {
|
||||
html.find('.quantity-minus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.decrementeQuantite( li.data("item-id") );
|
||||
this.actor.incDecQuantity( li.data("item-id"), -1 );
|
||||
} );
|
||||
html.find('.equipement-plus').click(event => {
|
||||
html.find('.quantity-plus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incrementeQuantite( li.data("item-id") );
|
||||
this.actor.incDecQuantity( li.data("item-id"), +1 );
|
||||
} );
|
||||
|
||||
html.find('.unarmed-attack').click((event) => {
|
||||
|
@ -630,7 +630,7 @@ export class PegasusActor extends Actor {
|
||||
updates['data.combat.stunthreshold'] = nrgValue
|
||||
}
|
||||
|
||||
let momentum = PegasusUtility.getDiceValue(this.data.data.statistics.foc.value) + this.data.data.statistics.foc.mod
|
||||
let momentum = this.data.data.statistics.foc.value + this.data.data.statistics.foc.mod
|
||||
if (momentum != this.data.data.momentum.max) {
|
||||
updates['data.momentum.value'] = 0
|
||||
updates['data.momentum.max'] = momentum
|
||||
@ -685,6 +685,15 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async incDecQuantity( objetId, incDec = 0 ) {
|
||||
let objetQ = this.data.items.get(objetId )
|
||||
if (objetQ) {
|
||||
let newQ = objetQ.data.data.quantity + incDec;
|
||||
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantity': newQ }]); // pdates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
applyAbility(ability, updates = []) {
|
||||
if (ability.data.affectedstat != "notapplicable") {
|
||||
|
@ -4,7 +4,7 @@ import { PegasusActorCreate } from "./pegasus-create-char.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const __level2Dice = [ "d0", "d4", "d6", "d8", "d10", "d12" ];
|
||||
const __name2DiceValue = { "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10" : 10, "d12": 12 }
|
||||
const __name2DiceValue = { "0": 0, "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10" : 10, "d12": 12 }
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class PegasusUtility {
|
||||
|
@ -1125,7 +1125,7 @@ ul, li {
|
||||
top:1px;
|
||||
}
|
||||
|
||||
.plus-moins-button {
|
||||
.plus-minus-button {
|
||||
box-shadow: inset 0px 1px 0px 0px #a6827e;
|
||||
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%);
|
||||
background-color: #7d5d3b00;
|
||||
@ -1142,20 +1142,20 @@ ul, li {
|
||||
}
|
||||
|
||||
.river-button:hover,
|
||||
.plus-moins-button:hover,
|
||||
.plus-minus-button:hover,
|
||||
.chat-card-button:hover {
|
||||
background: linear-gradient(to bottom, #800000 5%, #3e0101 100%);
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.river-button:active,
|
||||
.plus-moins-button:active,
|
||||
.plus-minus-button:active,
|
||||
.chat-card-button:active {
|
||||
position:relative;
|
||||
top:1px;
|
||||
}
|
||||
|
||||
.plus-moins {
|
||||
.plus-minus {
|
||||
font-size: 0.9rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -163,6 +163,6 @@
|
||||
"templateVersion": 63,
|
||||
"title": "Pegasus RPG",
|
||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||
"version": "0.1.14",
|
||||
"version": "0.1.16",
|
||||
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||
}
|
||||
|
@ -180,7 +180,6 @@
|
||||
<h4>{{stat2.label}}</h4>
|
||||
</span>
|
||||
<span class="small-label padd-right packed-left">Cur</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/>
|
||||
<span class="small-label padd-right packed-left"> Bonus</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number"/>
|
||||
<span class="small-label padd-right packed-left"> Max</span><input type="text" class="padd-right update-field input-numeric-short" data-field-name="data.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/>
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -381,7 +380,10 @@
|
||||
<li class="item flexrow list-item" data-item-id="{{money._id}}">
|
||||
<img class="sheet-competence-img" src="{{money.img}}" />
|
||||
<span class="equipement-label">{{money.name}}</span>
|
||||
<span class="generic-label">Qty {{money.data.quantity}}</span>
|
||||
<span class="generic-label">
|
||||
Qty {{money.data.quantity}}
|
||||
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
||||
</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
|
@ -11,9 +11,6 @@
|
||||
|
||||
<div class="tab" data-group="primary">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="generic-label">Value</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="data.value" value="{{data.value}}" data-dtype="Number"/>
|
||||
</li>
|
||||
<li class="flexrow"><label class="generic-label">Quantity</label>
|
||||
<input type="text" class="input-numeric-short padd-right" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user