Enhance styling
This commit is contained in:
@ -19,7 +19,7 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
height: 720,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editScore: false
|
||||
editScore: true
|
||||
});
|
||||
}
|
||||
|
||||
@ -43,11 +43,10 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
specs: this.actor.getSpecs( ),
|
||||
optionsDiceList: PegasusUtility.getOptionsDiceList(),
|
||||
optionsLevel: PegasusUtility.getOptionsLevel(),
|
||||
weapons: this.actor.checkAndPrepareWeapons( duplicate(this.actor.getWeapons()) ),
|
||||
armors: this.actor.checkAndPrepareArmors( duplicate(this.actor.getArmors())),
|
||||
shields: duplicate(this.actor.getShields()),
|
||||
equipments: duplicate(this.actor.getEquipments()),
|
||||
equipments: duplicate(this.actor.getEquipmentsOnly()),
|
||||
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
|
||||
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
||||
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields()) ),
|
||||
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
|
||||
perks: duplicate(this.actor.getPerks()),
|
||||
abilities: duplicate(this.actor.getAbilities()),
|
||||
activePerks: duplicate(this.actor.getActivePerks()),
|
||||
@ -77,12 +76,20 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
let rollData = PegasusUtility.getBasicRollData()
|
||||
rollData.alias = "Dice Pool Roll",
|
||||
rollData.mode = "generic"
|
||||
rollData.title = `Dice Pool Roll`;
|
||||
rollData.title = `Dice Pool Roll`
|
||||
rollData.img = "icons/dice/d12black.svg"
|
||||
|
||||
let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
|
||||
rollDialog.render( true );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollIDR( diceValue) {
|
||||
let myRoll = new Roll(diceValue+"x").roll({ async: false })
|
||||
//await PegasusUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
myRoll.toMessage()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
@ -183,6 +190,15 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
this.actor.incDecQuantity( li.data("item-id"), +1 );
|
||||
} );
|
||||
|
||||
html.find('.ammo-minus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incDecAmmo( li.data("item-id"), -1 );
|
||||
} );
|
||||
html.find('.ammo-plus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incDecAmmo( li.data("item-id"), +1 );
|
||||
} );
|
||||
|
||||
html.find('.momentum-minus').click(event => {
|
||||
this.actor.modifyMomentum( -1 )
|
||||
} )
|
||||
@ -222,6 +238,10 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
html.find('.roll-mr').click((event) => {
|
||||
this.actor.rollMR();
|
||||
});
|
||||
html.find('.roll-idr').click((event) => {
|
||||
const diceValue = $(event.currentTarget).data("dice-value")
|
||||
this.rollIDR( diceValue)
|
||||
})
|
||||
|
||||
html.find('.roll-spec').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
|
Reference in New Issue
Block a user