forked from GitHub-Mirrors/foundry-sw5e
Iteration on effects tab of character sheet
This commit is contained in:
parent
a40f7adb9c
commit
90fab8d89f
5 changed files with 16 additions and 8 deletions
|
@ -172,4 +172,8 @@
|
|||
resize: none;
|
||||
}
|
||||
}
|
||||
|
||||
.biography {
|
||||
max-width: calc(100% - 180px);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,8 +101,7 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
this._prepareItems(data);
|
||||
|
||||
// Prepare active effects
|
||||
// TODO Disabled until 0.7.5 release
|
||||
// this._prepareEffects(data);
|
||||
this._prepareEffects(data);
|
||||
|
||||
// Return data to the sheet
|
||||
return data
|
||||
|
@ -176,7 +175,7 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
e._getSourceName(); // Trigger a lookup for the source name
|
||||
if ( e.data.disabled ) categories.inactive.effects.push(e);
|
||||
else if ( e.isTemporary ) categories.temporary.effects.push(e);
|
||||
else categories.inactive.push(e);
|
||||
else categories.passive.effects.push(e);
|
||||
}
|
||||
|
||||
// Add the prepared categories of effects to the rendering data
|
||||
|
@ -744,7 +743,7 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
const effect = this.actor.effects.get(li.dataset.effectId);
|
||||
switch ( a.dataset.action ) {
|
||||
case "edit":
|
||||
return new ActiveEffectConfig(effect).render(true);
|
||||
return effect.sheet.render(true);
|
||||
case "delete":
|
||||
return effect.delete();
|
||||
case "toggle":
|
||||
|
|
|
@ -13,7 +13,7 @@ export const highlightCriticalSuccessFailure = function(message, html, data) {
|
|||
// Ensure it is an un-modified d20 roll
|
||||
const isD20 = (d.faces === 20) && ( d.results.length === 1 );
|
||||
if ( !isD20 ) return;
|
||||
const isModifiedRoll = ("success" in d.rolls[0]) || d.options.marginSuccess || d.options.marginFailure;
|
||||
const isModifiedRoll = ("success" in d.results[0]) || d.options.marginSuccess || d.options.marginFailure;
|
||||
if ( isModifiedRoll ) return;
|
||||
|
||||
// Highlight successes and failures
|
||||
|
|
|
@ -40,8 +40,6 @@ export default class ItemSheet5e extends ItemSheet {
|
|||
getData() {
|
||||
const data = super.getData();
|
||||
data.labels = this.item.labels;
|
||||
|
||||
// Include CONFIG values
|
||||
data.config = CONFIG.SW5E;
|
||||
|
||||
// Item Type, Status, and Details
|
||||
|
@ -57,6 +55,7 @@ export default class ItemSheet5e extends ItemSheet {
|
|||
data.hasAttackRoll = this.item.hasAttack;
|
||||
data.isHealing = data.item.data.actionType === "heal";
|
||||
data.isFlatDC = getProperty(data.item.data, "save.scaling") === "flat";
|
||||
data.isLine = ["line", "wall"].includes(data.item.data.target?.type);
|
||||
|
||||
// Vehicles
|
||||
data.isCrewed = data.item.data.activation?.type === 'crew';
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
<a class="item" data-tab="inventory">{{ localize "SW5E.Inventory" }}</a>
|
||||
<a class="item" data-tab="features">{{ localize "SW5E.Features" }}</a>
|
||||
<a class="item" data-tab="powerbook">{{ localize "SW5E.Powerbook" }}</a>
|
||||
<a class="item" data-tab="effects">{{ localize "SW5E.Effects" }}</a>
|
||||
<a class="item" data-tab="biography">{{ localize "SW5E.Biography" }}</a>
|
||||
</nav>
|
||||
|
||||
|
@ -227,7 +228,12 @@
|
|||
<div class="tab powerbook flexcol" data-group="primary" data-tab="powerbook">
|
||||
{{> "systems/sw5e/templates/actors/parts/actor-powerbook.html"}}
|
||||
</div>
|
||||
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
<div class="tab effects flexcol" data-group="primary" data-tab="effects">
|
||||
{{> "systems/sw5e/templates/actors/parts/actor-effects.html"}}
|
||||
</div>
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab flexrow" data-group="primary" data-tab="biography">
|
||||
<div class="characteristics flexcol">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue