mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Merge branch 'main' into feature/granular-action-outcomes
This commit is contained in:
commit
482b932cd6
11 changed files with 188 additions and 143 deletions
|
|
@ -406,7 +406,11 @@
|
|||
"giveSpotlight": "Give The Spotlight",
|
||||
"requestingSpotlight": "Requesting The Spotlight",
|
||||
"requestSpotlight": "Request The Spotlight",
|
||||
"openCountdowns": "Countdowns"
|
||||
"openCountdowns": "Countdowns",
|
||||
"adversaryCategories": {
|
||||
"friendly": "Friendly",
|
||||
"adversaries": "Adversaries"
|
||||
}
|
||||
},
|
||||
"CompendiumBrowserSettings": {
|
||||
"title": "Enable Compendiums",
|
||||
|
|
|
|||
|
|
@ -56,7 +56,9 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
async _prepareTrackerContext(context, options) {
|
||||
await super._prepareTrackerContext(context, options);
|
||||
|
||||
const adversaries = context.turns?.filter(x => x.isNPC) ?? [];
|
||||
const npcs = context.turns?.filter(x => x.isNPC) ?? [];
|
||||
const adversaries = npcs.filter(x => x.disposition !== CONST.TOKEN_DISPOSITIONS.FRIENDLY);
|
||||
const friendlies = npcs.filter(x => x.disposition === CONST.TOKEN_DISPOSITIONS.FRIENDLY);
|
||||
const characters = context.turns?.filter(x => !x.isNPC) ?? [];
|
||||
const spotlightQueueEnabled = game.settings.get(
|
||||
CONFIG.DH.id,
|
||||
|
|
@ -75,6 +77,7 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
Object.assign(context, {
|
||||
actionTokens: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.variantRules).actionTokens,
|
||||
adversaries,
|
||||
friendlies,
|
||||
allCharacters: characters,
|
||||
characters: characters.filter(x => !spotlightQueueEnabled || x.system.spotlight.requestOrderIndex == 0),
|
||||
spotlightRequests
|
||||
|
|
@ -129,7 +132,8 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
|
|||
active: index === combat.turn,
|
||||
canPing: combatant.sceneId === canvas.scene?.id && game.user.hasPermission('PING_CANVAS'),
|
||||
type: combatant.actor?.system?.type,
|
||||
img: await this._getCombatantThumbnail(combatant)
|
||||
img: await this._getCombatantThumbnail(combatant),
|
||||
disposition: combatant.token.disposition
|
||||
};
|
||||
|
||||
turn.css = [turn.active ? 'active' : null, hidden ? 'hide' : null, isDefeated ? 'defeated' : null].filterJoin(
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
static DEFAULT_OPTIONS = {
|
||||
id: 'countdowns',
|
||||
tag: 'div',
|
||||
classes: ['daggerheart', 'dh-style', 'countdowns', 'faded-ui'],
|
||||
classes: ['daggerheart', 'dh-style', 'countdowns'],
|
||||
window: {
|
||||
icon: 'fa-solid fa-clock-rotate-left',
|
||||
frame: true,
|
||||
frame: false,
|
||||
title: 'DAGGERHEART.UI.Countdowns.title',
|
||||
positioned: false,
|
||||
resizable: false,
|
||||
|
|
@ -62,20 +62,6 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
if (iconOnly) frame.classList.add('icon-only');
|
||||
else frame.classList.remove('icon-only');
|
||||
|
||||
const header = frame.querySelector('.window-header');
|
||||
header.querySelector('button[data-action="close"]').remove();
|
||||
header.querySelector('button[data-action="toggleControls"]').remove();
|
||||
|
||||
if (game.user.isGM) {
|
||||
const editTooltip = game.i18n.localize('DAGGERHEART.APPLICATIONS.CountdownEdit.editTitle');
|
||||
const editButton = `<a style="margin-right: 8px;" class="header-control" data-tooltip="${editTooltip}" aria-label="${editTooltip}" data-action="editCountdowns"><i class="fa-solid fa-wrench"></i></a>`;
|
||||
header.insertAdjacentHTML('beforeEnd', editButton);
|
||||
}
|
||||
|
||||
const minimizeTooltip = game.i18n.localize('DAGGERHEART.UI.Countdowns.toggleIconMode');
|
||||
const minimizeButton = `<a class="header-control" data-tooltip="${minimizeTooltip}" aria-label="${minimizeTooltip}" data-action="toggleViewMode"><i class="fa-solid fa-down-left-and-up-right-to-center"></i></a>`;
|
||||
header.insertAdjacentHTML('beforeEnd', minimizeButton);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,9 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti
|
|||
async getBattlepointHTML(combatId) {
|
||||
const combat = game.combats.get(combatId);
|
||||
const adversaries =
|
||||
combat.turns?.filter(x => x.actor?.isNPC)?.map(x => ({ ...x.actor, type: x.actor.system.type })) ?? [];
|
||||
combat.turns
|
||||
?.filter(x => x.actor?.isNPC && x.token.disposition === CONST.TOKEN_DISPOSITIONS.HOSTILE)
|
||||
?.map(x => ({ ...x.actor, type: x.actor.system.type })) ?? [];
|
||||
const characters = combat.turns?.filter(x => !x.isNPC && x.actor) ?? [];
|
||||
|
||||
const nrCharacters = characters.length;
|
||||
|
|
|
|||
|
|
@ -269,6 +269,7 @@
|
|||
border-radius: 3px;
|
||||
background-color: light-dark(@dark-blue, @golden);
|
||||
color: light-dark(@beige, @dark-blue);
|
||||
margin-bottom: var(--spacer-4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,20 @@
|
|||
gap: 10px;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
|
||||
padding-bottom: 10px;
|
||||
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 98%, transparent 100%);
|
||||
padding-top: 8px;
|
||||
padding-bottom: 20px;
|
||||
height: 100%;
|
||||
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||
}
|
||||
|
||||
.characteristics-section {
|
||||
gap: 20px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.biography-section {
|
||||
prose-mirror {
|
||||
--min-height: 50px;
|
||||
|
|
|
|||
|
|
@ -1,28 +1,47 @@
|
|||
@import '../../utils/colors.less';
|
||||
@import '../../utils/fonts.less';
|
||||
|
||||
.theme-dark {
|
||||
#interface.theme-dark {
|
||||
.daggerheart.dh-style.countdowns {
|
||||
background-image: url(../assets/parchments/dh-parchment-dark.png);
|
||||
|
||||
.window-header {
|
||||
background-image: url(../assets/parchments/dh-parchment-dark.png);
|
||||
--background: url(../assets/parchments/dh-parchment-dark.png);
|
||||
}
|
||||
}
|
||||
|
||||
#interface.theme-light {
|
||||
.daggerheart.dh-style.countdowns {
|
||||
--background: url('../assets/parchments/dh-parchment-light.png') no-repeat center;
|
||||
}
|
||||
}
|
||||
|
||||
.daggerheart.dh-style.countdowns {
|
||||
position: relative;
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
box-shadow: none;
|
||||
color: var(--color-text-primary);
|
||||
width: 300px;
|
||||
pointer-events: all;
|
||||
align-self: flex-end;
|
||||
transition: 0.3s right ease-in-out;
|
||||
|
||||
.window-title {
|
||||
font-family: @font-body;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&::before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--background);
|
||||
border-radius: 4px;
|
||||
opacity: var(--ui-fade-opacity);
|
||||
transition: opacity var(--ui-fade-duration);
|
||||
}
|
||||
|
||||
:not(.performance-low, .noblur) {
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
&:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#ui-right:has(#effects-display .effect-container) & {
|
||||
|
|
@ -34,21 +53,35 @@
|
|||
min-width: 180px;
|
||||
}
|
||||
|
||||
.window-header {
|
||||
cursor: default;
|
||||
border-bottom: 0;
|
||||
.countdowns-header,
|
||||
.countdowns-container {
|
||||
position: relative; // allow rendering over the background
|
||||
}
|
||||
|
||||
.window-content {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 16px;
|
||||
overflow: auto;
|
||||
max-height: 312px;
|
||||
.countdowns-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
flex: 0 0 36px;
|
||||
padding: 0 0.5rem;
|
||||
overflow: hidden;
|
||||
font-size: var(--font-size-13);
|
||||
.window-title {
|
||||
font-family: @font-body;
|
||||
flex: 1;
|
||||
}
|
||||
.header-control + .header-control {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.countdowns-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 4px var(--spacer-16) var(--spacer-16) var(--spacer-16);
|
||||
overflow: auto;
|
||||
max-height: 312px;
|
||||
|
||||
.countdown-container {
|
||||
display: flex;
|
||||
|
|
@ -152,5 +185,4 @@
|
|||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
data-group='{{tabs.biography.group}}'
|
||||
>
|
||||
<div class="items-section">
|
||||
<fieldset class="flex">
|
||||
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.characteristics'}}</legend>
|
||||
|
||||
<div class="characteristics-section flexrow">
|
||||
<div class="input">
|
||||
<span>{{localize 'DAGGERHEART.ACTORS.Character.pronouns'}}</span>
|
||||
{{formInput systemFields.biography.fields.characteristics.fields.pronouns value=source.system.biography.characteristics.pronouns enriched=source.system.biography.characteristics.pronouns localize=true toggled=true}}
|
||||
|
|
@ -21,14 +19,14 @@
|
|||
<span>{{localize 'DAGGERHEART.ACTORS.Character.faith'}}</span>
|
||||
{{formInput systemFields.biography.fields.characteristics.fields.faith value=source.system.biography.characteristics.faith enriched=source.system.biography.characteristics.faith localize=true toggled=true}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<fieldset class="biography-section">
|
||||
<fieldset class="glassy biography-section">
|
||||
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.backgroundTitle'}}</legend>
|
||||
{{formInput background.field value=background.value enriched=background.enriched toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="biography-section">
|
||||
<fieldset class="glassy biography-section">
|
||||
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.connectionsTitle'}}</legend>
|
||||
{{formInput connections.field value=connections.value enriched=connections.enriched toggled=true}}
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
canCreate=false
|
||||
showActions=@root.editable
|
||||
}}
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@
|
|||
{{#if (gt this.characters.length 0)}}
|
||||
{{> 'systems/daggerheart/templates/ui/combatTracker/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.GENERAL.Character.plural") turns=this.characters}}
|
||||
{{/if}}
|
||||
{{#if (gt this.friendlies.length 0)}}
|
||||
{{> 'systems/daggerheart/templates/ui/combatTracker/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.APPLICATIONS.CombatTracker.adversaryCategories.friendly") turns=this.friendlies}}
|
||||
{{/if}}
|
||||
{{#if (gt this.adversaries.length 0)}}
|
||||
{{> 'systems/daggerheart/templates/ui/combatTracker/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.GENERAL.Adversary.plural") turns=this.adversaries}}
|
||||
{{> 'systems/daggerheart/templates/ui/combatTracker/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.APPLICATIONS.CombatTracker.adversaryCategories.adversaries") turns=this.adversaries}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -1,4 +1,14 @@
|
|||
<div>
|
||||
<header class="countdowns-header">
|
||||
<i class="fa-solid fa-clock-rotate-left" inert></i>
|
||||
<span class="window-title">{{localize "DAGGERHEART.UI.Countdowns.title"}}</span>
|
||||
<a class="header-control" data-tooltip aria-label="DAGGERHEART.APPLICATIONS.CountdownEdit.editTitle" data-action="editCountdowns">
|
||||
<i class="fa-solid fa-wrench" inert></i>
|
||||
</a>
|
||||
<a class="header-control" data-tooltip aria-label="DAGGERHEART.UI.Countdowns.toggleIconMode" data-action="toggleViewMode">
|
||||
<i class="fa-solid fa-down-left-and-up-right-to-center" inert></i>
|
||||
</a>
|
||||
</header>
|
||||
<div class="countdowns-container">
|
||||
{{#each countdowns as | countdown id |}}
|
||||
<div class="countdown-container {{#if ../iconOnly}}icon-only{{/if}}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue