Minor fixes
This commit is contained in:
@@ -160,6 +160,7 @@ export class PegasusActorSheet extends ActorSheet {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
let itemId = li.data("item-id");
|
||||
this.actor.updatePerkStatus( itemId, ev.currentTarget.value)
|
||||
this.render()
|
||||
});
|
||||
|
||||
html.find('.power-cost-spent').change(ev => {
|
||||
|
@@ -858,7 +858,8 @@ export class PegasusActor extends Actor {
|
||||
|
||||
if (item.data.data.status == status) return;// Ensure we are really changing the status
|
||||
if (this.checkNoPerksAllowed() ) {
|
||||
ChatMessage( {content: "No perks activation allowed due to effect !"})
|
||||
await this.updateEmbeddedDocuments('Item', [{ _id: item.id, 'data.status': "ready" }])
|
||||
ChatMessage.create( {content: "No perks activation allowed due to effect !"})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -908,7 +909,7 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
this.disableWeaverPerk(item)
|
||||
PegasusUtility.createChatWithRollMode(item.name, {
|
||||
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-ready.html`, { name: this.name, perk: item })
|
||||
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-ready.html`, { name: this.name, perk: duplicate(item) })
|
||||
})
|
||||
}
|
||||
if (status == "activated") {
|
||||
@@ -954,7 +955,7 @@ export class PegasusActor extends Actor {
|
||||
await this.update({ 'data.nrg': nrg })
|
||||
}
|
||||
PegasusUtility.createChatWithRollMode(item.name, {
|
||||
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-activated.html`, { name: this.name, perk: item })
|
||||
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-activated.html`, { name: this.name, perk: duplicate(item) })
|
||||
})
|
||||
this.enableWeaverPerk(item)
|
||||
}
|
||||
@@ -1387,7 +1388,7 @@ export class PegasusActor extends Actor {
|
||||
if (effect.data.effectstatlevel) {
|
||||
effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value
|
||||
}
|
||||
if (this.getTraumaState() == "none") {
|
||||
if (this.getTraumaState() == "none" && !this.checkNoBonusDice()) {
|
||||
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
|
||||
} else {
|
||||
if (!effect.data.bonusdice) { // Do not push bonus dice effect when TraumaState is activated
|
||||
|
@@ -17,6 +17,13 @@ export const defaultItemImg = {
|
||||
money: "systems/fvtt-pegasus-rpg/images/icons/icon_money.webp",
|
||||
vice: "systems/fvtt-pegasus-rpg/images/icons/icon_vice.webp",
|
||||
virtue: "systems/fvtt-pegasus-rpg/images/icons/icon_virtue.webp",
|
||||
vehiclehull:"systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_hull.webp",
|
||||
powercoremodule:"systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_powercore.webp",
|
||||
mobilitymodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_mobilitymodule.webp",
|
||||
combatmodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_combatmodule.webp",
|
||||
propulsionmodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_propulsionmodule.webp",
|
||||
vehiclemodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_module.webp",
|
||||
vehicleweaponmodule: "systems/fvtt-pegasus-rpg/images/icons/icon_vehicule_combatmodule.webp"
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -35,7 +35,7 @@ export class PegasusUtility {
|
||||
PegasusCommands.init();
|
||||
|
||||
Handlebars.registerHelper('count', function (list) {
|
||||
return list.length;
|
||||
return (list) ? list.length : 0;
|
||||
})
|
||||
Handlebars.registerHelper('includes', function (array, val) {
|
||||
return array.includes(val);
|
||||
@@ -443,7 +443,8 @@ export class PegasusUtility {
|
||||
'systems/fvtt-pegasus-rpg/templates/partial-actor-status.html',
|
||||
'systems/fvtt-pegasus-rpg/templates/partial-item-nav.html',
|
||||
'systems/fvtt-pegasus-rpg/templates/partial-item-description.html',
|
||||
'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html'
|
||||
'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html',
|
||||
"systems/fvtt-pegasus-rpg/templates/partial-options-vehicle-speed.html"
|
||||
]
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
Reference in New Issue
Block a user