mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Merged with main
This commit is contained in:
commit
a5b656f533
51 changed files with 650 additions and 1032 deletions
24
lang/en.json
24
lang/en.json
|
|
@ -49,25 +49,32 @@
|
||||||
},
|
},
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack"
|
"name": "Attack",
|
||||||
|
"tooltip": "Offensive Action like weapon attack, spellcast, etc."
|
||||||
},
|
},
|
||||||
"beastform": {
|
"beastform": {
|
||||||
"name": "Beastform"
|
"name": "Beastform",
|
||||||
|
"tooltip": "Shapeshift the user into another form."
|
||||||
},
|
},
|
||||||
"damage": {
|
"damage": {
|
||||||
"name": "Damage"
|
"name": "Damage",
|
||||||
|
"tooltip": "Direct damage without a roll."
|
||||||
},
|
},
|
||||||
"effect": {
|
"effect": {
|
||||||
"name": "Effect"
|
"name": "Generic",
|
||||||
|
"tooltip": "Generic action that only display a chat message if nothing is configured."
|
||||||
},
|
},
|
||||||
"healing": {
|
"healing": {
|
||||||
"name": "Healing"
|
"name": "Healing",
|
||||||
|
"tooltip": "Restore resources to the target. May have a roll configured."
|
||||||
},
|
},
|
||||||
"macro": {
|
"macro": {
|
||||||
"name": "Macro"
|
"name": "Macro",
|
||||||
|
"tooltip": "Execute a macro by UUID."
|
||||||
},
|
},
|
||||||
"summon": {
|
"summon": {
|
||||||
"name": "Summon"
|
"name": "Summon",
|
||||||
|
"tooltip": "Create tokens in the scene."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1465,6 +1472,7 @@
|
||||||
"Appearance": {
|
"Appearance": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
"displayFear": { "label": "Fear Display" },
|
"displayFear": { "label": "Fear Display" },
|
||||||
|
"dualityColorScheme": { "label": "Chat Style" },
|
||||||
"showGenericStatusEffects": { "label": "Show Foundry Status Effects" }
|
"showGenericStatusEffects": { "label": "Show Foundry Status Effects" }
|
||||||
},
|
},
|
||||||
"fearDisplay": {
|
"fearDisplay": {
|
||||||
|
|
@ -1545,7 +1553,7 @@
|
||||||
"duality": "Duality Rolls",
|
"duality": "Duality Rolls",
|
||||||
"diceSoNice": {
|
"diceSoNice": {
|
||||||
"title": "Dice So Nice",
|
"title": "Dice So Nice",
|
||||||
"hint": "Coloration of Hope and Fear dice if the Dice So Nice module is used.",
|
"hint": "Coloration of Duality dice if the Dice So Nice module is used.",
|
||||||
"foreground": "Foreground",
|
"foreground": "Foreground",
|
||||||
"background": "Background",
|
"background": "Background",
|
||||||
"outline": "Outline",
|
"outline": "Outline",
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,4 @@ export { default as DeathMove } from './deathMove.mjs';
|
||||||
export { default as Downtime } from './downtime.mjs';
|
export { default as Downtime } from './downtime.mjs';
|
||||||
export { default as OwnershipSelection } from './ownershipSelection.mjs';
|
export { default as OwnershipSelection } from './ownershipSelection.mjs';
|
||||||
export { default as ResourceDiceDialog } from './resourceDiceDialog.mjs';
|
export { default as ResourceDiceDialog } from './resourceDiceDialog.mjs';
|
||||||
|
export { default as ActionSelectionDialog } from './actionSelectionDialog.mjs';
|
||||||
|
|
|
||||||
87
module/applications/dialogs/actionSelectionDialog.mjs
Normal file
87
module/applications/dialogs/actionSelectionDialog.mjs
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||||
|
|
||||||
|
export default class ActionSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
constructor(item, event, options = {}) {
|
||||||
|
super(options);
|
||||||
|
this.#item = item;
|
||||||
|
this.#event = event;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ['daggerheart', 'dh-style', 'dialog'],
|
||||||
|
actions: {
|
||||||
|
choose: ActionSelectionDialog.#onChooseAction
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
width: 400
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
static PARTS = {
|
||||||
|
actions: {
|
||||||
|
template: 'systems/daggerheart/templates/dialogs/actionSelect.hbs'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#item;
|
||||||
|
|
||||||
|
get item() {
|
||||||
|
return this.#item;
|
||||||
|
}
|
||||||
|
|
||||||
|
#event;
|
||||||
|
|
||||||
|
get event() {
|
||||||
|
return this.#event;
|
||||||
|
}
|
||||||
|
|
||||||
|
#action;
|
||||||
|
|
||||||
|
get action() {
|
||||||
|
return this.#action ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
get title() {
|
||||||
|
return game.i18n.localize('DAGGERHEART.CONFIG.SelectAction.selectAction');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
/** @inheritDoc */
|
||||||
|
async _prepareContext(options) {
|
||||||
|
const actions = this.#item.system.actionsList,
|
||||||
|
itemName = this.#item.name;
|
||||||
|
return {
|
||||||
|
...(await super._prepareContext(options)),
|
||||||
|
actions,
|
||||||
|
itemName
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #onChooseAction(event, button) {
|
||||||
|
const { actionId } = button.dataset;
|
||||||
|
this.#action = this.#item.system.actionsList.find(a => a._id === actionId);
|
||||||
|
Object.defineProperty(this.#event, 'shiftKey', {
|
||||||
|
get() {
|
||||||
|
return event.shiftKey;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
static create(item, event, options) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
const dialog = new this(item, event, options);
|
||||||
|
dialog.addEventListener('close', () => resolve(dialog.action), { once: true });
|
||||||
|
dialog.render({ force: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -64,8 +64,8 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
||||||
context.selectedActivity = this.selectedActivity;
|
context.selectedActivity = this.selectedActivity;
|
||||||
context.moveData = this.moveData;
|
context.moveData = this.moveData;
|
||||||
|
|
||||||
const shortRestMovesSelected = this.#nrSelectedMoves('shortRest');
|
const shortRestMovesSelected = this.nrSelectedMoves('shortRest');
|
||||||
const longRestMovesSelected = this.#nrSelectedMoves('longRest');
|
const longRestMovesSelected = this.nrSelectedMoves('longRest');
|
||||||
context.nrChoices = {
|
context.nrChoices = {
|
||||||
...this.nrChoices,
|
...this.nrChoices,
|
||||||
shortRest: {
|
shortRest: {
|
||||||
|
|
@ -89,7 +89,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
||||||
static selectMove(_, target) {
|
static selectMove(_, target) {
|
||||||
const { category, move } = target.dataset;
|
const { category, move } = target.dataset;
|
||||||
|
|
||||||
const nrSelected = this.#nrSelectedMoves(category);
|
const nrSelected = this.nrSelectedMoves(category);
|
||||||
|
|
||||||
if (nrSelected + this.nrChoices[category].taken >= this.nrChoices[category].max) {
|
if (nrSelected + this.nrChoices[category].taken >= this.nrChoices[category].max) {
|
||||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.noMoreMoves'));
|
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.noMoreMoves'));
|
||||||
|
|
@ -176,7 +176,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
#nrSelectedMoves(category) {
|
nrSelectedMoves(category) {
|
||||||
return Object.values(this.moveData[category].moves).reduce((acc, x) => acc + (x.selected ?? 0), 0);
|
return Object.values(this.moveData[category].moves).reduce((acc, x) => acc + (x.selected ?? 0), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,37 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
static TABS = {
|
||||||
|
diceSoNice: {
|
||||||
|
tabs: [
|
||||||
|
{ id: 'hope', label: 'DAGGERHEART.GENERAL.hope' },
|
||||||
|
{ id: 'fear', label: 'DAGGERHEART.GENERAL.fear' },
|
||||||
|
{ id: 'advantage', label: 'DAGGERHEART.GENERAL.Advantage.full' },
|
||||||
|
{ id: 'disadvantage', label: 'DAGGERHEART.GENERAL.Advantage.full' }
|
||||||
|
],
|
||||||
|
initial: 'hope'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
changeTab(tab, group, options) {
|
||||||
|
super.changeTab(tab, group, options);
|
||||||
|
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
const context = await super._prepareContext(_options);
|
const context = await super._prepareContext(_options);
|
||||||
context.settingFields = this.settings;
|
context.settingFields = this.settings;
|
||||||
|
|
||||||
|
context.diceSoNiceTextures = game.dice3d?.exports?.TEXTURELIST ?? {};
|
||||||
|
context.diceSoNiceColorsets = game.dice3d?.exports?.COLORSETS ?? {};
|
||||||
|
context.diceTab = {
|
||||||
|
key: this.tabGroups.diceSoNice,
|
||||||
|
source: this.settings._source.diceSoNice[this.tabGroups.diceSoNice],
|
||||||
|
fields: this.settings.schema.fields.diceSoNice.fields[this.tabGroups.diceSoNice].fields
|
||||||
|
};
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -65,4 +92,13 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_getTabs(tabs) {
|
||||||
|
for (const v of Object.values(tabs)) {
|
||||||
|
v.active = this.tabGroups[v.group] ? this.tabGroups[v.group] === v.id : v.active;
|
||||||
|
v.cssClass = v.active ? 'active' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return tabs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,148 +0,0 @@
|
||||||
import { actionsTypes } from '../../../data/action/_module.mjs';
|
|
||||||
import DHActionConfig from '../../sheets-configs/action-config.mjs';
|
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
|
||||||
|
|
||||||
export default class DhSettingsActionView extends HandlebarsApplicationMixin(ApplicationV2) {
|
|
||||||
constructor(resolve, reject, title, name, icon, img, description, actions) {
|
|
||||||
super({});
|
|
||||||
|
|
||||||
this.resolve = resolve;
|
|
||||||
this.reject = reject;
|
|
||||||
this.viewTitle = title;
|
|
||||||
this.name = name;
|
|
||||||
this.icon = icon;
|
|
||||||
this.img = img;
|
|
||||||
this.description = description;
|
|
||||||
this.actions = actions;
|
|
||||||
}
|
|
||||||
|
|
||||||
get title() {
|
|
||||||
return this.viewTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DEFAULT_OPTIONS = {
|
|
||||||
tag: 'form',
|
|
||||||
classes: ['daggerheart', 'setting', 'dh-style'],
|
|
||||||
position: { width: 440, height: 'auto' },
|
|
||||||
actions: {
|
|
||||||
editImage: this.onEditImage,
|
|
||||||
addItem: this.addItem,
|
|
||||||
editItem: this.editItem,
|
|
||||||
removeItem: this.removeItem,
|
|
||||||
resetMoves: this.resetMoves,
|
|
||||||
saveForm: this.saveForm
|
|
||||||
},
|
|
||||||
form: { handler: this.updateData, submitOnChange: true, closeOnSubmit: false }
|
|
||||||
};
|
|
||||||
|
|
||||||
static PARTS = {
|
|
||||||
header: { template: 'systems/daggerheart/templates/settings/components/action-view-header.hbs' },
|
|
||||||
main: {
|
|
||||||
template: 'systems/daggerheart/templates/settings/components/action-view.hbs'
|
|
||||||
},
|
|
||||||
footer: { template: 'systems/daggerheart/templates/settings/components/action-view-footer.hbs' }
|
|
||||||
};
|
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
|
||||||
const context = await super._prepareContext(_options);
|
|
||||||
context.name = this.name;
|
|
||||||
context.icon = this.icon;
|
|
||||||
context.img = this.img;
|
|
||||||
context.description = this.description;
|
|
||||||
context.enrichedDescription = await foundry.applications.ux.TextEditor.enrichHTML(context.description);
|
|
||||||
context.actions = this.actions;
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
static async updateData(event, element, formData) {
|
|
||||||
const { name, icon, description } = foundry.utils.expandObject(formData.object);
|
|
||||||
this.name = name;
|
|
||||||
this.icon = icon;
|
|
||||||
this.description = description;
|
|
||||||
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
static async saveForm(event) {
|
|
||||||
this.resolve({
|
|
||||||
name: this.name,
|
|
||||||
icon: this.icon,
|
|
||||||
img: this.img,
|
|
||||||
description: this.description,
|
|
||||||
actions: this.actions
|
|
||||||
});
|
|
||||||
this.close(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static close(fromSave) {
|
|
||||||
if (!fromSave) {
|
|
||||||
this.reject();
|
|
||||||
}
|
|
||||||
|
|
||||||
super.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
static onEditImage() {
|
|
||||||
const fp = new foundry.applications.apps.FilePicker.implementation({
|
|
||||||
current: this.img,
|
|
||||||
type: 'image',
|
|
||||||
callback: async path => {
|
|
||||||
this.img = path;
|
|
||||||
this.render();
|
|
||||||
},
|
|
||||||
top: this.position.top + 40,
|
|
||||||
left: this.position.left + 10
|
|
||||||
});
|
|
||||||
return fp.browse();
|
|
||||||
}
|
|
||||||
|
|
||||||
async selectActionType() {
|
|
||||||
const content = await foundry.applications.handlebars.renderTemplate(
|
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
|
||||||
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
|
||||||
),
|
|
||||||
title = 'Select Action Type',
|
|
||||||
type = 'form',
|
|
||||||
data = {};
|
|
||||||
return Dialog.prompt({
|
|
||||||
title,
|
|
||||||
label: title,
|
|
||||||
content,
|
|
||||||
type,
|
|
||||||
callback: html => {
|
|
||||||
const form = html[0].querySelector('form'),
|
|
||||||
fd = new foundry.applications.ux.FormDataExtended(form);
|
|
||||||
foundry.utils.mergeObject(data, fd.object, { inplace: true });
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
rejectClose: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static async addItem() {
|
|
||||||
const actionType = await this.selectActionType();
|
|
||||||
const cls = actionsTypes[actionType?.type] ?? actionsTypes.attack,
|
|
||||||
action = new cls({
|
|
||||||
_id: foundry.utils.randomID(),
|
|
||||||
type: actionType.type,
|
|
||||||
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType.type].name),
|
|
||||||
...cls.getSourceConfig(this.document)
|
|
||||||
});
|
|
||||||
|
|
||||||
this.actions.push(action);
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
static async editItem(_, button) {
|
|
||||||
await new DHActionConfig(this.actions[button.dataset.id]).render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static removeItem(event, button) {
|
|
||||||
this.actions = this.actions.filter((_, index) => index !== Number.parseInt(button.dataset.id));
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
static resetMoves() {}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
import { DhHomebrew } from '../../data/settings/_module.mjs';
|
import { DhHomebrew } from '../../data/settings/_module.mjs';
|
||||||
import DhSettingsActionView from './components/settingsActionsView.mjs';
|
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class DhHomebrewSettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class DhHomebrewSettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
@ -73,23 +71,21 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
||||||
|
|
||||||
static async editItem(_, target) {
|
static async editItem(_, target) {
|
||||||
const move = this.settings.restMoves[target.dataset.type].moves[target.dataset.id];
|
const move = this.settings.restMoves[target.dataset.type].moves[target.dataset.id];
|
||||||
new Promise((resolve, reject) => {
|
const path = `restMoves.${target.dataset.type}.moves.${target.dataset.id}`;
|
||||||
new DhSettingsActionView(
|
const editedMove = await game.system.api.applications.sheetConfigs.DowntimeConfig.configure(
|
||||||
resolve,
|
move,
|
||||||
reject,
|
path,
|
||||||
game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.downtimeMoves'),
|
this.settings
|
||||||
move.name,
|
);
|
||||||
move.icon,
|
if (!editedMove) return;
|
||||||
move.img,
|
|
||||||
move.description,
|
await this.updateAction.bind(this)(editedMove, target.dataset.type, target.dataset.id);
|
||||||
move.actions
|
|
||||||
).render(true);
|
|
||||||
}).then(data => this.updateAction.bind(this)(data, target.dataset.type, target.dataset.id));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateAction(data, type, id) {
|
async updateAction(data, type, id) {
|
||||||
await this.settings.updateSource({
|
await this.settings.updateSource({
|
||||||
[`restMoves.${type}.moves.${id}`]: {
|
[`restMoves.${type}.moves.${id}`]: {
|
||||||
|
actions: data.actions,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
icon: data.icon,
|
icon: data.icon,
|
||||||
img: data.img,
|
img: data.img,
|
||||||
|
|
@ -139,7 +135,11 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
||||||
acc[key] = {
|
acc[key] = {
|
||||||
...move,
|
...move,
|
||||||
name: game.i18n.localize(move.name),
|
name: game.i18n.localize(move.name),
|
||||||
description: game.i18n.localize(move.description)
|
description: game.i18n.localize(move.description),
|
||||||
|
actions: move.actions.map(action => ({
|
||||||
|
...action,
|
||||||
|
name: game.i18n.localize(action.name)
|
||||||
|
}))
|
||||||
};
|
};
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
export { default as ActionConfig } from './action-config.mjs';
|
export { default as ActionConfig } from './action-config.mjs';
|
||||||
export { default as AdversarySettings } from './adversary-settings.mjs';
|
export { default as AdversarySettings } from './adversary-settings.mjs';
|
||||||
export { default as CompanionSettings } from './companion-settings.mjs';
|
export { default as CompanionSettings } from './companion-settings.mjs';
|
||||||
|
export { default as DowntimeConfig } from './downtimeConfig.mjs';
|
||||||
export { default as EnvironmentSettings } from './environment-settings.mjs';
|
export { default as EnvironmentSettings } from './environment-settings.mjs';
|
||||||
export { default as ActiveEffectConfig } from './activeEffectConfig.mjs';
|
export { default as ActiveEffectConfig } from './activeEffectConfig.mjs';
|
||||||
export { default as DhTokenConfig } from './token-config.mjs';
|
export { default as DhTokenConfig } from './token-config.mjs';
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@ import DaggerheartSheet from '../sheets/daggerheart-sheet.mjs';
|
||||||
|
|
||||||
const { ApplicationV2 } = foundry.applications.api;
|
const { ApplicationV2 } = foundry.applications.api;
|
||||||
export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
||||||
constructor(action) {
|
constructor(action, sheetUpdate) {
|
||||||
super({});
|
super({});
|
||||||
|
|
||||||
this.action = action;
|
this.action = action;
|
||||||
|
this.sheetUpdate = sheetUpdate;
|
||||||
this.openSection = null;
|
this.openSection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -171,6 +172,8 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
||||||
const submitData = this._prepareSubmitData(event, formData),
|
const submitData = this._prepareSubmitData(event, formData),
|
||||||
data = foundry.utils.mergeObject(this.action.toObject(), submitData);
|
data = foundry.utils.mergeObject(this.action.toObject(), submitData);
|
||||||
this.action = await this.action.update(data);
|
this.action = await this.action.update(data);
|
||||||
|
|
||||||
|
this.sheetUpdate?.(this.action);
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -236,7 +239,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
||||||
if (!this.action.effects) return;
|
if (!this.action.effects) return;
|
||||||
const index = button.dataset.index,
|
const index = button.dataset.index,
|
||||||
effectId = this.action.effects[index]._id;
|
effectId = this.action.effects[index]._id;
|
||||||
this.constructor.removeElement.bind(this)(event);
|
this.constructor.removeElement.bind(this)(event, button);
|
||||||
this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]);
|
this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
162
module/applications/sheets-configs/downtimeConfig.mjs
Normal file
162
module/applications/sheets-configs/downtimeConfig.mjs
Normal file
|
|
@ -0,0 +1,162 @@
|
||||||
|
import { actionsTypes } from '../../data/action/_module.mjs';
|
||||||
|
import DHActionConfig from './action-config.mjs';
|
||||||
|
|
||||||
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
|
export default class DowntimeConfig extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
constructor(move, movePath, settings, options) {
|
||||||
|
super(options);
|
||||||
|
|
||||||
|
this.move = move;
|
||||||
|
|
||||||
|
this.movePath = movePath;
|
||||||
|
this.actionsPath = `${movePath}.actions`;
|
||||||
|
this.settings = settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
get title() {
|
||||||
|
return game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.downtimeMoves');
|
||||||
|
}
|
||||||
|
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
tag: 'form',
|
||||||
|
classes: ['daggerheart', 'setting', 'dh-style'],
|
||||||
|
position: { width: 440, height: 'auto' },
|
||||||
|
window: {
|
||||||
|
icon: 'fa-solid fa-gears'
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
editImage: this.onEditImage,
|
||||||
|
addItem: this.addItem,
|
||||||
|
editItem: this.editItem,
|
||||||
|
removeItem: this.removeItem,
|
||||||
|
resetMoves: this.resetMoves,
|
||||||
|
saveForm: this.saveForm
|
||||||
|
},
|
||||||
|
form: { handler: this.updateData, submitOnChange: true, closeOnSubmit: false }
|
||||||
|
};
|
||||||
|
|
||||||
|
static PARTS = {
|
||||||
|
header: { template: 'systems/daggerheart/templates/settings/downtime-config/header.hbs' },
|
||||||
|
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||||
|
main: { template: 'systems/daggerheart/templates/settings/downtime-config/main.hbs' },
|
||||||
|
actions: { template: 'systems/daggerheart/templates/settings/downtime-config/actions.hbs' },
|
||||||
|
footer: { template: 'systems/daggerheart/templates/settings/downtime-config/footer.hbs' }
|
||||||
|
};
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
static TABS = {
|
||||||
|
primary: {
|
||||||
|
tabs: [{ id: 'main' }, { id: 'actions' }],
|
||||||
|
initial: 'main',
|
||||||
|
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async _prepareContext(_options) {
|
||||||
|
const context = await super._prepareContext(_options);
|
||||||
|
context.move = this.move;
|
||||||
|
context.move.enrichedDescription = await foundry.applications.ux.TextEditor.enrichHTML(
|
||||||
|
context.move.description
|
||||||
|
);
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
static async updateData(event, element, formData) {
|
||||||
|
const data = foundry.utils.expandObject(formData.object);
|
||||||
|
foundry.utils.mergeObject(this.move, data);
|
||||||
|
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async saveForm() {
|
||||||
|
this.close({ submitted: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
static onEditImage() {
|
||||||
|
const fp = new foundry.applications.apps.FilePicker.implementation({
|
||||||
|
current: this.img,
|
||||||
|
type: 'image',
|
||||||
|
callback: async path => {
|
||||||
|
this.move.img = path;
|
||||||
|
this.render();
|
||||||
|
},
|
||||||
|
top: this.position.top + 40,
|
||||||
|
left: this.position.left + 10
|
||||||
|
});
|
||||||
|
return fp.browse();
|
||||||
|
}
|
||||||
|
|
||||||
|
async selectActionType() {
|
||||||
|
return (
|
||||||
|
(await foundry.applications.api.DialogV2.input({
|
||||||
|
window: { title: game.i18n.localize('DAGGERHEART.CONFIG.SelectAction.selectType') },
|
||||||
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
|
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
||||||
|
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
||||||
|
),
|
||||||
|
ok: {
|
||||||
|
label: game.i18n.format('DOCUMENT.Create', {
|
||||||
|
type: game.i18n.localize('DAGGERHEART.GENERAL.Action.single')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})) ?? {}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async addItem() {
|
||||||
|
const { type: actionType } = await this.selectActionType();
|
||||||
|
if (!actionType) return;
|
||||||
|
|
||||||
|
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
||||||
|
action = new cls(
|
||||||
|
{
|
||||||
|
type: actionType,
|
||||||
|
name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType].name),
|
||||||
|
img: 'icons/magic/life/cross-worn-green.webp',
|
||||||
|
actionType: 'action',
|
||||||
|
systemPath: this.actionsPath
|
||||||
|
},
|
||||||
|
{
|
||||||
|
parent: this.settings
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
await this.settings.updateSource({ [`${this.actionsPath}.${action.id}`]: action });
|
||||||
|
this.move = foundry.utils.getProperty(this.settings, this.movePath);
|
||||||
|
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async editItem(_, target) {
|
||||||
|
const actionId = target.dataset.id;
|
||||||
|
const action = this.move.actions.get(actionId);
|
||||||
|
await new DHActionConfig(action, async updatedMove => {
|
||||||
|
await this.settings.updateSource({ [`${this.actionsPath}.${actionId}`]: updatedMove });
|
||||||
|
this.move = foundry.utils.getProperty(this.settings, this.movePath);
|
||||||
|
this.render();
|
||||||
|
}).render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async removeItem(_, target) {
|
||||||
|
await this.settings.updateSource({ [`${this.actionsPath}.-=${target.dataset.id}`]: null });
|
||||||
|
this.move = foundry.utils.getProperty(this.settings, this.movePath);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static resetMoves() {}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
_onClose(options = {}) {
|
||||||
|
if (!options.submitted) this.move = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static async configure(move, movePath, settings, options = {}) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
const app = new this(move, movePath, settings, options);
|
||||||
|
app.addEventListener('close', () => resolve(app.move), { once: true });
|
||||||
|
app.render({ force: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -517,9 +517,10 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const item = getDocFromElement(event.currentTarget);
|
const item = getDocFromElement(event.currentTarget);
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
const max = item.system.resource.max ? itemAbleRollParse(item.system.resource.max, this.document, item) : null;
|
const max = event.currentTarget.max ? Number(event.currentTarget.max) : null;
|
||||||
const value = max ? Math.min(Number(event.currentTarget.value), max) : event.currentTarget.value;
|
const value = max ? Math.min(Number(event.currentTarget.value), max) : event.currentTarget.value;
|
||||||
await item.update({ 'system.resource.value': value });
|
await item.update({ 'system.resource.value': value });
|
||||||
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateItemQuantity(event) {
|
async updateItemQuantity(event) {
|
||||||
|
|
@ -527,6 +528,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
await item.update({ 'system.quantity': event.currentTarget.value });
|
await item.update({ 'system.quantity': event.currentTarget.value });
|
||||||
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateArmorMarks(event) {
|
async updateArmorMarks(event) {
|
||||||
|
|
|
||||||
|
|
@ -2,37 +2,44 @@ export const actionTypes = {
|
||||||
attack: {
|
attack: {
|
||||||
id: 'attack',
|
id: 'attack',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
|
||||||
icon: 'fa-swords'
|
icon: 'fa-khanda',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.attack.tooltip'
|
||||||
},
|
},
|
||||||
healing: {
|
healing: {
|
||||||
id: 'healing',
|
id: 'healing',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.healing.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.healing.name',
|
||||||
icon: 'fa-kit-medical'
|
icon: 'fa-kit-medical',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.healing.tooltip'
|
||||||
},
|
},
|
||||||
damage: {
|
damage: {
|
||||||
id: 'damage',
|
id: 'damage',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.damage.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.damage.name',
|
||||||
icon: 'fa-bone-break'
|
icon: 'fa-heart-crack',
|
||||||
},
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.damage.tooltip'
|
||||||
summon: {
|
|
||||||
id: 'summon',
|
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.summon.name',
|
|
||||||
icon: 'fa-ghost'
|
|
||||||
},
|
|
||||||
effect: {
|
|
||||||
id: 'effect',
|
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.effect.name',
|
|
||||||
icon: 'fa-person-rays'
|
|
||||||
},
|
|
||||||
macro: {
|
|
||||||
id: 'macro',
|
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.macro.name',
|
|
||||||
icon: 'fa-scroll'
|
|
||||||
},
|
},
|
||||||
beastform: {
|
beastform: {
|
||||||
id: 'beastform',
|
id: 'beastform',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.beastform.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.beastform.name',
|
||||||
icon: 'fa-paw'
|
icon: 'fa-paw',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.beastform.tooltip'
|
||||||
|
},
|
||||||
|
summon: {
|
||||||
|
id: 'summon',
|
||||||
|
name: 'DAGGERHEART.ACTIONS.TYPES.summon.name',
|
||||||
|
icon: 'fa-ghost',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.summon.tooltip'
|
||||||
|
},
|
||||||
|
effect: {
|
||||||
|
id: 'effect',
|
||||||
|
name: 'DAGGERHEART.ACTIONS.TYPES.effect.name',
|
||||||
|
icon: 'fa-person-rays',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.effect.tooltip'
|
||||||
|
},
|
||||||
|
macro: {
|
||||||
|
id: 'macro',
|
||||||
|
name: 'DAGGERHEART.ACTIONS.TYPES.macro.name',
|
||||||
|
icon: 'fa-scroll',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.macro.tooltip'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,8 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-bandage',
|
icon: 'fa-solid fa-bandage',
|
||||||
img: 'icons/magic/life/cross-worn-green.webp',
|
img: 'icons/magic/life/cross-worn-green.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.tendToWounds.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.tendToWounds.description'),
|
||||||
actions: [
|
actions: {
|
||||||
{
|
tendToWounds: {
|
||||||
type: 'healing',
|
type: 'healing',
|
||||||
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.tendToWounds.name'),
|
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.tendToWounds.name'),
|
||||||
img: 'icons/magic/life/cross-worn-green.webp',
|
img: 'icons/magic/life/cross-worn-green.webp',
|
||||||
|
|
@ -154,7 +154,7 @@ export const defaultRestOptions = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
},
|
},
|
||||||
clearStress: {
|
clearStress: {
|
||||||
id: 'clearStress',
|
id: 'clearStress',
|
||||||
|
|
@ -162,8 +162,8 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-regular fa-face-surprise',
|
icon: 'fa-regular fa-face-surprise',
|
||||||
img: 'icons/magic/perception/eye-ringed-green.webp',
|
img: 'icons/magic/perception/eye-ringed-green.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.clearStress.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.clearStress.description'),
|
||||||
actions: [
|
actions: {
|
||||||
{
|
clearStress: {
|
||||||
type: 'healing',
|
type: 'healing',
|
||||||
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.clearStress.name'),
|
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.clearStress.name'),
|
||||||
img: 'icons/magic/perception/eye-ringed-green.webp',
|
img: 'icons/magic/perception/eye-ringed-green.webp',
|
||||||
|
|
@ -178,7 +178,7 @@ export const defaultRestOptions = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
},
|
},
|
||||||
repairArmor: {
|
repairArmor: {
|
||||||
id: 'repairArmor',
|
id: 'repairArmor',
|
||||||
|
|
@ -186,8 +186,8 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-hammer',
|
icon: 'fa-solid fa-hammer',
|
||||||
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.repairArmor.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.repairArmor.description'),
|
||||||
actions: [
|
actions: {
|
||||||
{
|
repairArmor: {
|
||||||
type: 'healing',
|
type: 'healing',
|
||||||
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.repairArmor.name'),
|
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.repairArmor.name'),
|
||||||
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
||||||
|
|
@ -202,7 +202,7 @@ export const defaultRestOptions = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
},
|
},
|
||||||
prepare: {
|
prepare: {
|
||||||
id: 'prepare',
|
id: 'prepare',
|
||||||
|
|
@ -210,7 +210,7 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-dumbbell',
|
icon: 'fa-solid fa-dumbbell',
|
||||||
img: 'icons/skills/trades/academics-merchant-scribe.webp',
|
img: 'icons/skills/trades/academics-merchant-scribe.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.prepare.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.shortRest.prepare.description'),
|
||||||
actions: []
|
actions: {}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
longRest: () => ({
|
longRest: () => ({
|
||||||
|
|
@ -220,7 +220,23 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-bandage',
|
icon: 'fa-solid fa-bandage',
|
||||||
img: 'icons/magic/life/cross-worn-green.webp',
|
img: 'icons/magic/life/cross-worn-green.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.tendToWounds.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.tendToWounds.description'),
|
||||||
actions: []
|
actions: {
|
||||||
|
tendToWounds: {
|
||||||
|
type: 'healing',
|
||||||
|
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.tendToWounds.name'),
|
||||||
|
img: 'icons/magic/life/cross-worn-green.webp',
|
||||||
|
actionType: 'action',
|
||||||
|
healing: {
|
||||||
|
applyTo: healingTypes.hitPoints.id,
|
||||||
|
value: {
|
||||||
|
custom: {
|
||||||
|
enabled: true,
|
||||||
|
formula: '@system.resources.hitPoints.max'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
clearStress: {
|
clearStress: {
|
||||||
id: 'clearStress',
|
id: 'clearStress',
|
||||||
|
|
@ -228,7 +244,23 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-regular fa-face-surprise',
|
icon: 'fa-regular fa-face-surprise',
|
||||||
img: 'icons/magic/perception/eye-ringed-green.webp',
|
img: 'icons/magic/perception/eye-ringed-green.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.clearStress.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.clearStress.description'),
|
||||||
actions: []
|
actions: {
|
||||||
|
clearStress: {
|
||||||
|
type: 'healing',
|
||||||
|
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.clearStress.name'),
|
||||||
|
img: 'icons/magic/perception/eye-ringed-green.webp',
|
||||||
|
actionType: 'action',
|
||||||
|
healing: {
|
||||||
|
applyTo: healingTypes.stress.id,
|
||||||
|
value: {
|
||||||
|
custom: {
|
||||||
|
enabled: true,
|
||||||
|
formula: '@system.resources.stress.max'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
repairArmor: {
|
repairArmor: {
|
||||||
id: 'repairArmor',
|
id: 'repairArmor',
|
||||||
|
|
@ -236,7 +268,23 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-hammer',
|
icon: 'fa-solid fa-hammer',
|
||||||
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.repairArmor.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.repairArmor.description'),
|
||||||
actions: []
|
actions: {
|
||||||
|
repairArmor: {
|
||||||
|
type: 'healing',
|
||||||
|
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.repairArmor.name'),
|
||||||
|
img: 'icons/skills/trades/smithing-anvil-silver-red.webp',
|
||||||
|
actionType: 'action',
|
||||||
|
healing: {
|
||||||
|
applyTo: healingTypes.armorStack.id,
|
||||||
|
value: {
|
||||||
|
custom: {
|
||||||
|
enabled: true,
|
||||||
|
formula: '@system.armorScore'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
prepare: {
|
prepare: {
|
||||||
id: 'prepare',
|
id: 'prepare',
|
||||||
|
|
@ -244,7 +292,7 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-dumbbell',
|
icon: 'fa-solid fa-dumbbell',
|
||||||
img: 'icons/skills/trades/academics-merchant-scribe.webp',
|
img: 'icons/skills/trades/academics-merchant-scribe.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.prepare.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.prepare.description'),
|
||||||
actions: []
|
actions: {}
|
||||||
},
|
},
|
||||||
workOnAProject: {
|
workOnAProject: {
|
||||||
id: 'workOnAProject',
|
id: 'workOnAProject',
|
||||||
|
|
@ -252,7 +300,7 @@ export const defaultRestOptions = {
|
||||||
icon: 'fa-solid fa-diagram-project',
|
icon: 'fa-solid fa-diagram-project',
|
||||||
img: 'icons/skills/social/thumbsup-approval-like.webp',
|
img: 'icons/skills/social/thumbsup-approval-like.webp',
|
||||||
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.workOnAProject.description'),
|
description: game.i18n.localize('DAGGERHEART.APPLICATIONS.Downtime.longRest.workOnAProject.description'),
|
||||||
actions: []
|
actions: {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
||||||
async use(event, ...args) {
|
async use(event, ...args) {
|
||||||
if (!this.actor) throw new Error("An Action can't be used outside of an Actor context.");
|
if (!this.actor) throw new Error("An Action can't be used outside of an Actor context.");
|
||||||
|
|
||||||
|
if (this.chatDisplay) this.toChat();
|
||||||
|
|
||||||
let config = this.prepareConfig(event);
|
let config = this.prepareConfig(event);
|
||||||
for (let i = 0; i < this.constructor.extraSchemas.length; i++) {
|
for (let i = 0; i < this.constructor.extraSchemas.length; i++) {
|
||||||
let clsField = this.constructor.getActionField(this.constructor.extraSchemas[i]);
|
let clsField = this.constructor.getActionField(this.constructor.extraSchemas[i]);
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export default class DHHealingAction extends DHBaseAction {
|
||||||
healing: game.i18n.localize(CONFIG.DH.GENERAL.healingTypes[this.healing.applyTo].label)
|
healing: game.i18n.localize(CONFIG.DH.GENERAL.healingTypes[this.healing.applyTo].label)
|
||||||
}),
|
}),
|
||||||
roll: formulas,
|
roll: formulas,
|
||||||
targets: (data.system?.targets ?? data.targets).filter(t => t.hit),
|
targets: systemData.targets?.filter(t => t.hit),
|
||||||
messageType: 'healing',
|
messageType: 'healing',
|
||||||
source: systemData.source,
|
source: systemData.source,
|
||||||
data: this.getRollData(),
|
data: this.getRollData(),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import DHBaseAction from '../../data/action/baseAction.mjs';
|
|
||||||
|
|
||||||
const fields = foundry.data.fields;
|
const fields = foundry.data.fields;
|
||||||
|
|
||||||
export default class DHAdversaryRoll extends foundry.abstract.TypeDataModel {
|
export default class DHAdversaryRoll extends foundry.abstract.TypeDataModel {
|
||||||
|
|
@ -44,7 +42,9 @@ export default class DHAdversaryRoll extends foundry.abstract.TypeDataModel {
|
||||||
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
||||||
this.currentTargets =
|
this.currentTargets =
|
||||||
this.targetSelection !== true
|
this.targetSelection !== true
|
||||||
? Array.from(game.user.targets).map(t => DHBaseAction.formatTarget(t))
|
? Array.from(game.user.targets).map(t =>
|
||||||
|
game.system.api.fields.ActionFields.TargetField.formatTarget(t)
|
||||||
|
)
|
||||||
: this.targets;
|
: this.targets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import DHBaseAction from "../action/baseAction.mjs";
|
|
||||||
|
|
||||||
export default class DHApplyEffect extends foundry.abstract.TypeDataModel {
|
export default class DHApplyEffect extends foundry.abstract.TypeDataModel {
|
||||||
static defineSchema() {
|
static defineSchema() {
|
||||||
const fields = foundry.data.fields;
|
const fields = foundry.data.fields;
|
||||||
|
|
@ -27,7 +25,9 @@ export default class DHApplyEffect extends foundry.abstract.TypeDataModel {
|
||||||
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
||||||
this.currentTargets =
|
this.currentTargets =
|
||||||
this.targetSelection !== true
|
this.targetSelection !== true
|
||||||
? Array.from(game.user.targets).map(t => DHBaseAction.formatTarget(t))
|
? Array.from(game.user.targets).map(t =>
|
||||||
|
game.system.api.fields.ActionFields.TargetField.formatTarget(t)
|
||||||
|
)
|
||||||
: this.targets;
|
: this.targets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@ export default class DHDamageRoll extends foundry.abstract.TypeDataModel {
|
||||||
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
||||||
this.currentTargets =
|
this.currentTargets =
|
||||||
this.targetSelection !== true
|
this.targetSelection !== true
|
||||||
? Array.from(game.user.targets).map(t => DHBaseAction.formatTarget(t))
|
? Array.from(game.user.targets).map(t =>
|
||||||
|
game.system.api.fields.ActionFields.TargetField.formatTarget(t)
|
||||||
|
)
|
||||||
: this.targets;
|
: this.targets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,9 @@ export function ActionMixin(Base) {
|
||||||
if (!type || !game.system.api.models.actions.actionsTypes[type]) {
|
if (!type || !game.system.api.models.actions.actionsTypes[type]) {
|
||||||
({ type } =
|
({ type } =
|
||||||
(await foundry.applications.api.DialogV2.input({
|
(await foundry.applications.api.DialogV2.input({
|
||||||
window: { title: 'Select Action Type' },
|
window: { title: game.i18n.localize('DAGGERHEART.CONFIG.SelectAction.selectType') },
|
||||||
|
position: { width: 300 },
|
||||||
|
classes: ['daggerheart', 'dh-style'],
|
||||||
content: await foundry.applications.handlebars.renderTemplate(
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
||||||
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
||||||
|
|
@ -202,11 +204,20 @@ export function ActionMixin(Base) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async update(updates, options = {}) {
|
async update(updates, options = {}) {
|
||||||
const path = this.inCollection ? `system.${this.systemPath}.${this.id}` : `system.${this.systemPath}`,
|
const isSetting = !this.parent.parent;
|
||||||
|
const basePath = isSetting ? this.systemPath : `system.${this.systemPath}`;
|
||||||
|
const path = this.inCollection ? `${basePath}.${this.id}` : basePath;
|
||||||
|
let result = null;
|
||||||
|
if (isSetting) {
|
||||||
|
await this.parent.updateSource({ [path]: updates }, options);
|
||||||
|
result = this.parent;
|
||||||
|
} else {
|
||||||
result = await this.item.update({ [path]: updates }, options);
|
result = await this.item.update({ [path]: updates }, options);
|
||||||
|
}
|
||||||
|
|
||||||
return this.inCollection
|
return this.inCollection
|
||||||
? foundry.utils.getProperty(result, `system.${this.systemPath}`).get(this.id)
|
? foundry.utils.getProperty(result, basePath).get(this.id)
|
||||||
: foundry.utils.getProperty(result, `system.${this.systemPath}`);
|
: foundry.utils.getProperty(result, basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const attributeField = label =>
|
||||||
|
|
||||||
const resourceField = (max = 0, label, reverse = false) =>
|
const resourceField = (max = 0, label, reverse = false) =>
|
||||||
new fields.SchemaField({
|
new fields.SchemaField({
|
||||||
value: new fields.NumberField({ initial: 0, integer: true, label }),
|
value: new fields.NumberField({ initial: 0, min: 0, integer: true, label }),
|
||||||
max: new fields.NumberField({ initial: max, integer: true }),
|
max: new fields.NumberField({ initial: max, integer: true }),
|
||||||
isReversed: new fields.BooleanField({ initial: reverse })
|
isReversed: new fields.BooleanField({ initial: reverse })
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ export default class DhAppearance extends foundry.abstract.DataModel {
|
||||||
dualityColorScheme: new fields.StringField({
|
dualityColorScheme: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
choices: DualityRollColor,
|
choices: DualityRollColor,
|
||||||
initial: DualityRollColor.normal.value
|
initial: DualityRollColor.normal.value,
|
||||||
|
label: 'DAGGERHEART.SETTINGS.Appearance.FIELDS.dualityColorScheme.label'
|
||||||
}),
|
}),
|
||||||
diceSoNice: new fields.SchemaField({
|
diceSoNice: new fields.SchemaField({
|
||||||
hope: new fields.SchemaField({
|
hope: new fields.SchemaField({
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { defaultRestOptions } from '../../config/generalConfig.mjs';
|
import { defaultRestOptions } from '../../config/generalConfig.mjs';
|
||||||
|
import { ActionsField } from '../fields/actionField.mjs';
|
||||||
|
|
||||||
export default class DhHomebrew extends foundry.abstract.DataModel {
|
export default class DhHomebrew extends foundry.abstract.DataModel {
|
||||||
static LOCALIZATION_PREFIXES = ['DAGGERHEART.SETTINGS.Homebrew']; // Doesn't work for some reason
|
static LOCALIZATION_PREFIXES = ['DAGGERHEART.SETTINGS.Homebrew']; // Doesn't work for some reason
|
||||||
|
|
@ -61,7 +62,7 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
|
||||||
base64: false
|
base64: false
|
||||||
}),
|
}),
|
||||||
description: new fields.HTMLField(),
|
description: new fields.HTMLField(),
|
||||||
actions: new fields.ArrayField(new fields.ObjectField())
|
actions: new ActionsField()
|
||||||
}),
|
}),
|
||||||
{ initial: defaultRestOptions.longRest() }
|
{ initial: defaultRestOptions.longRest() }
|
||||||
)
|
)
|
||||||
|
|
@ -78,7 +79,7 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
|
||||||
base64: false
|
base64: false
|
||||||
}),
|
}),
|
||||||
description: new fields.HTMLField(),
|
description: new fields.HTMLField(),
|
||||||
actions: new fields.ArrayField(new fields.ObjectField())
|
actions: new ActionsField()
|
||||||
}),
|
}),
|
||||||
{ initial: defaultRestOptions.shortRest() }
|
{ initial: defaultRestOptions.shortRest() }
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -568,13 +568,7 @@ export default class DhpActor extends Actor {
|
||||||
}
|
}
|
||||||
|
|
||||||
convertDamageToThreshold(damage) {
|
convertDamageToThreshold(damage) {
|
||||||
return damage >= this.system.damageThresholds.severe
|
return damage >= this.system.damageThresholds.severe ? 3 : damage >= this.system.damageThresholds.major ? 2 : 1;
|
||||||
? 3
|
|
||||||
: damage >= this.system.damageThresholds.major
|
|
||||||
? 2
|
|
||||||
: damage >= this.system.damageThresholds.minor
|
|
||||||
? 1
|
|
||||||
: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
convertStressDamageToHP(resources) {
|
convertStressDamageToHP(resources) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import ActionSelectionDialog from '../applications/dialogs/actionSelectionDialog.mjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override and extend the basic Item implementation.
|
* Override and extend the basic Item implementation.
|
||||||
* @extends {foundry.documents.Item}
|
* @extends {foundry.documents.Item}
|
||||||
|
|
@ -94,46 +96,16 @@ export default class DHItem extends foundry.documents.Item {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectActionDialog(prevEvent) {
|
|
||||||
const content = await foundry.applications.handlebars.renderTemplate(
|
|
||||||
'systems/daggerheart/templates/dialogs/actionSelect.hbs',
|
|
||||||
{
|
|
||||||
actions: this.system.actionsList,
|
|
||||||
itemName: this.name
|
|
||||||
}
|
|
||||||
),
|
|
||||||
title = game.i18n.localize('DAGGERHEART.CONFIG.SelectAction.selectAction');
|
|
||||||
|
|
||||||
return foundry.applications.api.DialogV2.prompt({
|
|
||||||
window: { title },
|
|
||||||
classes: ['daggerheart', 'dh-style'],
|
|
||||||
content,
|
|
||||||
ok: {
|
|
||||||
label: title,
|
|
||||||
callback: (event, button, dialog) => {
|
|
||||||
Object.defineProperty(prevEvent, 'shiftKey', {
|
|
||||||
get() {
|
|
||||||
return event.shiftKey;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return this.system.actionsList.find(a => a._id === button.form.elements.actionId.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async use(event) {
|
async use(event) {
|
||||||
const actions = new Set(this.system.actionsList);
|
const actions = new Set(this.system.actionsList);
|
||||||
if (actions?.size) {
|
if (actions?.size) {
|
||||||
let action = actions.first();
|
let action = actions.first();
|
||||||
if (actions.size > 1 && !event?.shiftKey) {
|
if (actions.size > 1 && !event?.shiftKey) {
|
||||||
// Actions Choice Dialog
|
// Actions Choice Dialog
|
||||||
action = await this.selectActionDialog(event);
|
action = await ActionSelectionDialog.create(this, event);
|
||||||
}
|
}
|
||||||
if (action) return action.use(event);
|
if (action) return action.use(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.toChat();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async toChat(origin) {
|
async toChat(origin) {
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,8 @@ export default class RegisterHandlebarsHelpers {
|
||||||
|
|
||||||
static rollParsed(value, actor, item, numerical) {
|
static rollParsed(value, actor, item, numerical) {
|
||||||
const isNumerical = typeof numerical === 'boolean' ? numerical : false;
|
const isNumerical = typeof numerical === 'boolean' ? numerical : false;
|
||||||
const result = itemAbleRollParse(value, actor, item);
|
const result = itemAbleRollParse(value, actor.getRollData(), item);
|
||||||
return isNumerical && !result ? 0 : result;
|
return isNumerical ? (!result ? 0 : Number(result)) : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static setVar(name, value, context) {
|
static setVar(name, value, context) {
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,62 @@
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
.application.daggerheart.dh-style {
|
.application.daggerheart.dh-style {
|
||||||
.actions-list {
|
.actions-list,
|
||||||
|
.action-buttons-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.action-item {
|
.action-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-buttons-list {
|
||||||
|
gap: 10px;
|
||||||
|
button {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
padding: 6px 40px 6px 6px;
|
||||||
|
height: fit-content;
|
||||||
|
img {
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-family: @font-body;
|
||||||
|
flex: 1;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-list {
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
.action-item {
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
transition: background-color 0.3s ease-in-out;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
|
cursor: pointer;
|
||||||
|
flex: 1;
|
||||||
|
i {
|
||||||
|
text-align: center;
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type='radio'] {
|
||||||
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
|
|
||||||
&:not(:last-child) {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mark-container {
|
.mark-container {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1px solid light-dark(@dark-blue, @golden);
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
|
@ -62,6 +58,10 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,618 +0,0 @@
|
||||||
@keyframes glow {
|
|
||||||
0% {
|
|
||||||
box-shadow: 0 0 1px 1px #f3c267;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
box-shadow: 0 0 2px 2px #f3c267;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes glow-dark {
|
|
||||||
0% {
|
|
||||||
box-shadow: 0 0 1px 1px #18162e;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
box-shadow: 0 0 2px 2px #18162e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Cinzel';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: url(https://fonts.gstatic.com/s/cinzel/v25/8vIU7ww63mVu7gtR-kwKxNvkNOjw-tbnTYo.ttf) format('truetype');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Cinzel';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: url(https://fonts.gstatic.com/s/cinzel/v25/8vIU7ww63mVu7gtR-kwKxNvkNOjw-jHgTYo.ttf) format('truetype');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Cinzel Decorative';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: url(https://fonts.gstatic.com/s/cinzeldecorative/v18/daaHSScvJGqLYhG8nNt8KPPswUAPniZoaelD.ttf)
|
|
||||||
format('truetype');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Montserrat';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: url(https://fonts.gstatic.com/s/montserrat/v30/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew-.ttf) format('truetype');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Montserrat';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
font-display: swap;
|
|
||||||
src: url(https://fonts.gstatic.com/s/montserrat/v30/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu170w-.ttf) format('truetype');
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.dh-style h1 {
|
|
||||||
font-family: 'Cinzel Decorative', serif;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.dh-style h2,
|
|
||||||
.application.sheet.daggerheart.dh-style h3 {
|
|
||||||
font-family: 'Cinzel', serif;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.dh-style h4 {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
border: none;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0;
|
|
||||||
text-shadow: none;
|
|
||||||
color: #f3c267;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.dh-style h5 {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #f3c267;
|
|
||||||
margin: 0;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.dh-style p,
|
|
||||||
.application.sheet.daggerheart.dh-style span {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.dh-style small {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
.application.dh-style {
|
|
||||||
border: 1px solid light-dark(#18162e, #f3c267);
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='text'],
|
|
||||||
.application.dh-style input[type='number'] {
|
|
||||||
background: light-dark(transparent, transparent);
|
|
||||||
border-radius: 6px;
|
|
||||||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
|
|
||||||
backdrop-filter: blur(9.5px);
|
|
||||||
-webkit-backdrop-filter: blur(9.5px);
|
|
||||||
outline: none;
|
|
||||||
color: light-dark(#18162e, #f3c267);
|
|
||||||
border: 1px solid light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='text']:hover[type='text'],
|
|
||||||
.application.dh-style input[type='number']:hover[type='text'],
|
|
||||||
.application.dh-style input[type='text']:hover[type='number'],
|
|
||||||
.application.dh-style input[type='number']:hover[type='number'],
|
|
||||||
.application.dh-style input[type='text']:focus[type='text'],
|
|
||||||
.application.dh-style input[type='number']:focus[type='text'],
|
|
||||||
.application.dh-style input[type='text']:focus[type='number'],
|
|
||||||
.application.dh-style input[type='number']:focus[type='number'] {
|
|
||||||
background: light-dark(rgba(0, 0, 0, 0.05), rgba(24, 22, 46, 0.33));
|
|
||||||
box-shadow: none;
|
|
||||||
outline: 2px solid light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='text']:disabled[type='text'],
|
|
||||||
.application.dh-style input[type='number']:disabled[type='text'],
|
|
||||||
.application.dh-style input[type='text']:disabled[type='number'],
|
|
||||||
.application.dh-style input[type='number']:disabled[type='number'] {
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='text']:disabled[type='text']:hover,
|
|
||||||
.application.dh-style input[type='number']:disabled[type='text']:hover,
|
|
||||||
.application.dh-style input[type='text']:disabled[type='number']:hover,
|
|
||||||
.application.dh-style input[type='number']:disabled[type='number']:hover {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='checkbox']:checked::after,
|
|
||||||
.application.dh-style input[type='radio']:checked::after {
|
|
||||||
color: light-dark(#222, #f3c267);
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='checkbox']:checked::before,
|
|
||||||
.application.dh-style input[type='radio']:checked::before {
|
|
||||||
color: light-dark(#22222240, #f3c26740);
|
|
||||||
}
|
|
||||||
.application.dh-style input[type='checkbox']::before,
|
|
||||||
.application.dh-style input[type='radio']::before {
|
|
||||||
color: light-dark(#22222240, #f3c26740);
|
|
||||||
}
|
|
||||||
.application.dh-style button {
|
|
||||||
background: light-dark(transparent, #f3c267);
|
|
||||||
border: 1px solid light-dark(#18162e, #18162e);
|
|
||||||
color: light-dark(#18162e, #18162e);
|
|
||||||
outline: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.application.dh-style button:hover {
|
|
||||||
background: light-dark(rgba(0, 0, 0, 0.3), #18162e);
|
|
||||||
color: light-dark(#18162e, #f3c267);
|
|
||||||
}
|
|
||||||
.application.dh-style button.glow {
|
|
||||||
animation: glow 0.75s infinite alternate;
|
|
||||||
}
|
|
||||||
.application.dh-style button:disabled {
|
|
||||||
background: light-dark(transparent, #f3c267);
|
|
||||||
color: light-dark(#18162e, #18162e);
|
|
||||||
opacity: 0.6;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
.application.dh-style button:disabled:hover {
|
|
||||||
background: light-dark(transparent, #f3c267);
|
|
||||||
color: light-dark(#18162e, #18162e);
|
|
||||||
}
|
|
||||||
.application.dh-style select {
|
|
||||||
background: light-dark(transparent, transparent);
|
|
||||||
color: light-dark(#222, #efe6d8);
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
border: 1px solid light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.application.dh-style select:focus,
|
|
||||||
.application.dh-style select:hover {
|
|
||||||
outline: 2px solid light-dark(#222, #efe6d8);
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.application.dh-style select option,
|
|
||||||
.application.dh-style select optgroup {
|
|
||||||
color: #efe6d8;
|
|
||||||
background-color: #18162e;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
.application.dh-style select:disabled {
|
|
||||||
opacity: 0.6;
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
.application.dh-style multi-select {
|
|
||||||
position: relative;
|
|
||||||
height: 34px;
|
|
||||||
}
|
|
||||||
.application.dh-style multi-select .tags {
|
|
||||||
justify-content: flex-start;
|
|
||||||
margin: 4px;
|
|
||||||
height: inherit;
|
|
||||||
}
|
|
||||||
.application.dh-style multi-select .tags .tag {
|
|
||||||
padding: 0.3rem 0.5rem;
|
|
||||||
color: light-dark(#18162e, #f3c267);
|
|
||||||
background-color: light-dark(#18162e10, #f3c26740);
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
border-radius: 3px;
|
|
||||||
transition: 0.13s ease-out;
|
|
||||||
gap: 0.5rem;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.application.dh-style multi-select .tags .tag .remove {
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
.application.dh-style multi-select select {
|
|
||||||
position: absolute;
|
|
||||||
height: inherit;
|
|
||||||
outline: initial;
|
|
||||||
}
|
|
||||||
.application.dh-style p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.application.dh-style ul {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
.application.dh-style li {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.application.dh-style a:hover,
|
|
||||||
.application.dh-style a.active {
|
|
||||||
font-weight: bold;
|
|
||||||
text-shadow: 0 0 8px light-dark(#18162e, #f3c267);
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset {
|
|
||||||
align-items: center;
|
|
||||||
margin-top: 5px;
|
|
||||||
border-radius: 6px;
|
|
||||||
border-color: light-dark(#18162e, #f3c267);
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.glassy {
|
|
||||||
background-color: light-dark(#18162e10, #f3c26710);
|
|
||||||
border-color: transparent;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.glassy legend {
|
|
||||||
padding: 2px 12px;
|
|
||||||
border-radius: 3px;
|
|
||||||
background-color: light-dark(#18162e, #f3c267);
|
|
||||||
color: light-dark(#efe6d8, #18162e);
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.fit-height {
|
|
||||||
height: 95%;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.flex {
|
|
||||||
display: flex;
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.flex.wrap {
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px 20px;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.flex .inline-child {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .list-w-img {
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .list-w-img label {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .list-w-img img {
|
|
||||||
width: 2rem;
|
|
||||||
height: 2rem;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.one-column {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: start;
|
|
||||||
gap: 10px;
|
|
||||||
min-height: 64px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.one-column > .one-column {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.two-columns {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 2fr;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.two-columns.even {
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.two-columns .full-width {
|
|
||||||
grid-column: span 2;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset legend {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
color: light-dark(#18162e, #f3c267);
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset input[type='text'],
|
|
||||||
.application.dh-style fieldset input[type='number'] {
|
|
||||||
color: light-dark(#222, #efe6d8);
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset input[type='text']:focus,
|
|
||||||
.application.dh-style fieldset input[type='number']:focus,
|
|
||||||
.application.dh-style fieldset input[type='text']:hover,
|
|
||||||
.application.dh-style fieldset input[type='number']:hover {
|
|
||||||
outline: 2px solid light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset[disabled],
|
|
||||||
.application.dh-style fieldset.child-disabled .form-group,
|
|
||||||
.application.dh-style fieldset select[disabled],
|
|
||||||
.application.dh-style fieldset input[disabled] {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset.child-disabled .form-group {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .nest-inputs {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
gap: 5px;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .nest-inputs .btn {
|
|
||||||
padding-top: 15px;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .nest-inputs .image {
|
|
||||||
height: 40px;
|
|
||||||
width: 40px;
|
|
||||||
object-fit: cover;
|
|
||||||
border-radius: 6px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .nest-inputs > .checkbox {
|
|
||||||
align-self: end;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .form-group {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .form-group label {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .form-group.checkbox {
|
|
||||||
width: fit-content;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset .form-group.checkbox .form-fields {
|
|
||||||
height: 32px;
|
|
||||||
align-content: center;
|
|
||||||
}
|
|
||||||
.application.dh-style fieldset:has(.list-w-img) {
|
|
||||||
gap: 0;
|
|
||||||
}
|
|
||||||
.application.dh-style .two-columns {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 2fr;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.application.dh-style .two-columns.even {
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
}
|
|
||||||
.application.dh-style line-div {
|
|
||||||
display: block;
|
|
||||||
height: 1px;
|
|
||||||
width: 100%;
|
|
||||||
border-bottom: 1px solid light-dark(#18162e, #f3c267);
|
|
||||||
mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%);
|
|
||||||
}
|
|
||||||
.application.dh-style side-line-div {
|
|
||||||
display: block;
|
|
||||||
height: 1px;
|
|
||||||
width: 100%;
|
|
||||||
border-bottom: 1px solid light-dark(#18162e, #f3c267);
|
|
||||||
mask-image: linear-gradient(270deg, transparent 0%, black 100%);
|
|
||||||
}
|
|
||||||
.application.dh-style side-line-div.invert {
|
|
||||||
mask-image: linear-gradient(270deg, black 0%, transparent 100%);
|
|
||||||
}
|
|
||||||
.application.dh-style .item-description {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
grid-column: 1/-1;
|
|
||||||
transition:
|
|
||||||
opacity 0.3s ease-out,
|
|
||||||
transform 0.3s ease-out;
|
|
||||||
}
|
|
||||||
.application.dh-style .item-description.invisible {
|
|
||||||
height: 0;
|
|
||||||
opacity: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
transform: translateY(-20px);
|
|
||||||
transform-origin: top;
|
|
||||||
}
|
|
||||||
.application.dh-style .item-buttons {
|
|
||||||
grid-column: span 3;
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
.application.dh-style .item-buttons button {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style fieldset h2,
|
|
||||||
.application.setting.dh-style fieldset h3,
|
|
||||||
.application.setting.dh-style fieldset h4 {
|
|
||||||
margin: 8px 0 4px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style fieldset .title-hint {
|
|
||||||
font-size: 12px;
|
|
||||||
font-variant: small-caps;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style fieldset .field-section .split-section {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style fieldset .label-container {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style fieldset .label-container label {
|
|
||||||
align-self: center;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style footer {
|
|
||||||
margin-top: 8px;
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style footer button {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style .form-group {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style .form-group label {
|
|
||||||
font-size: 16px;
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
}
|
|
||||||
.application.setting.dh-style .form-group .form-fields {
|
|
||||||
display: flex;
|
|
||||||
gap: 4px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify {
|
|
||||||
background: light-dark(transparent, transparent);
|
|
||||||
border: 1px solid light-dark(#222, #efe6d8);
|
|
||||||
height: 34px;
|
|
||||||
--tags-disabled-bg: none;
|
|
||||||
--tags-border-color: none;
|
|
||||||
--tags-hover-border-color: none;
|
|
||||||
--tags-focus-border-color: none;
|
|
||||||
--tag-border-radius: 3px;
|
|
||||||
--tag-bg: light-dark(#18162e, #f3c267);
|
|
||||||
--tag-remove-btn-color: light-dark(#18162e, #f3c267);
|
|
||||||
--tag-hover: light-dark(#18162e, #f3c267);
|
|
||||||
--tag-text-color: light-dark(#efe6d8, #222);
|
|
||||||
--tag-text-color--edit: light-dark(#efe6d8, #222);
|
|
||||||
--tag-pad: 0.3em 0.5em;
|
|
||||||
--tag-inset-shadow-size: 1.2em;
|
|
||||||
--tag-invalid-color: #d39494;
|
|
||||||
--tag-invalid-bg: rgba(211, 148, 148, 0.5);
|
|
||||||
--tag--min-width: 1ch;
|
|
||||||
--tag--max-width: 100%;
|
|
||||||
--tag-hide-transition: 0.3s;
|
|
||||||
--tag-remove-bg: light-dark(#18162e40, #f3c26740);
|
|
||||||
--tag-remove-btn-color: light-dark(#efe6d8, #222);
|
|
||||||
--tag-remove-btn-bg: none;
|
|
||||||
--tag-remove-btn-bg--hover: light-dark(#efe6d8, #222);
|
|
||||||
--input-color: inherit;
|
|
||||||
--placeholder-color: light-dark(#efe6d815, #22222215);
|
|
||||||
--placeholder-color-focus: light-dark(#efe6d815, #22222215);
|
|
||||||
--loader-size: 0.8em;
|
|
||||||
--readonly-striped: 1;
|
|
||||||
border-radius: 3px;
|
|
||||||
margin-right: 1px;
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify tag div {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
height: 22px;
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify tag div span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify tag div img {
|
|
||||||
margin-left: 8px;
|
|
||||||
height: 20px;
|
|
||||||
width: 20px;
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify__dropdown {
|
|
||||||
border: 1px solid light-dark(#222, #efe6d8) !important;
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
color: light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify__dropdown .tagify__dropdown__wrapper {
|
|
||||||
background-image: url(../assets/parchments/dh-parchment-dark.png);
|
|
||||||
background-color: transparent;
|
|
||||||
border: 0;
|
|
||||||
color: light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.system-daggerheart .tagify__dropdown .tagify__dropdown__wrapper .tagify__dropdown__item--active {
|
|
||||||
background-color: light-dark(#222, #efe6d8);
|
|
||||||
color: light-dark(#efe6d8, #222);
|
|
||||||
}
|
|
||||||
.system-daggerheart.theme-light .tagify__dropdown .tagify__dropdown__wrapper {
|
|
||||||
background-image: url(../assets/parchments/dh-parchment-light.png);
|
|
||||||
}
|
|
||||||
.theme-light .application.sheet.dh-style button.glow {
|
|
||||||
animation: glow-dark 0.75s infinite alternate;
|
|
||||||
}
|
|
||||||
.theme-light .application .component.dh-style.card-preview-container {
|
|
||||||
background-image: url('../assets/parchments/dh-parchment-light.png');
|
|
||||||
}
|
|
||||||
.theme-light .application .component.dh-style.card-preview-container .preview-text-container {
|
|
||||||
background-image: url(../assets/parchments/dh-parchment-dark.png);
|
|
||||||
}
|
|
||||||
.theme-light .application .component.dh-style.card-preview-container .preview-selected-icon-container {
|
|
||||||
background-image: url(../assets/parchments/dh-parchment-dark.png);
|
|
||||||
color: var(--color-light-5);
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container {
|
|
||||||
position: relative;
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 2px solid var(--color-tabs-border);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
aspect-ratio: 0.75;
|
|
||||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container.selectable {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container.disabled {
|
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-image-outer-container {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-image-container {
|
|
||||||
flex: 1;
|
|
||||||
border-radius: 4px 4px 0 0;
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-text-container {
|
|
||||||
flex: 1;
|
|
||||||
border-radius: 0 0 4px 4px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 18px;
|
|
||||||
text-align: center;
|
|
||||||
color: var(--color-text-selection-bg);
|
|
||||||
background-image: url(../assets/parchments/dh-parchment-light.png);
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-empty-container {
|
|
||||||
pointer-events: none;
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-empty-container .preview-empty-inner-container {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.application
|
|
||||||
.component.dh-style.card-preview-container
|
|
||||||
.preview-empty-container
|
|
||||||
.preview-empty-inner-container
|
|
||||||
.preview-add-icon {
|
|
||||||
font-size: 48px;
|
|
||||||
}
|
|
||||||
.application
|
|
||||||
.component.dh-style.card-preview-container
|
|
||||||
.preview-empty-container
|
|
||||||
.preview-empty-inner-container
|
|
||||||
.preview-empty-subtext {
|
|
||||||
position: absolute;
|
|
||||||
top: 10%;
|
|
||||||
font-size: 18px;
|
|
||||||
font-variant: small-caps;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-selected-icon-container {
|
|
||||||
position: absolute;
|
|
||||||
height: 54px;
|
|
||||||
width: 54px;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 2px solid;
|
|
||||||
font-size: 48px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background-image: url(../assets/parchments/dh-parchment-light.png);
|
|
||||||
color: var(--color-dark-5);
|
|
||||||
}
|
|
||||||
.application .component.dh-style.card-preview-container .preview-selected-icon-container i {
|
|
||||||
position: relative;
|
|
||||||
right: 2px;
|
|
||||||
}
|
|
||||||
|
|
@ -97,6 +97,19 @@
|
||||||
color: light-dark(@dark-blue, @dark-blue);
|
color: light-dark(@dark-blue, @dark-blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.reverted {
|
||||||
|
background: light-dark(@dark-blue-10, @golden-10);
|
||||||
|
color: light-dark(@dark-blue, @golden);
|
||||||
|
border: 1px solid light-dark(@dark, transparent);
|
||||||
|
&:hover {
|
||||||
|
background: light-dark(transparent, @golden);
|
||||||
|
color: light-dark(@dark-blue, @dark-blue);
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
|
||||||
&:hover {
|
&:not(.single-img):hover {
|
||||||
.inventory-item-header .img-portait {
|
.inventory-item-header .img-portait {
|
||||||
.roll-img {
|
.roll-img {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,15 @@
|
||||||
.sheet.daggerheart.dh-style {
|
.daggerheart.dh-style {
|
||||||
.tab-form-footer {
|
.tab-form-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 10px;
|
gap: 8px;
|
||||||
|
|
||||||
|
&.spaced {
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.padded {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-items {
|
.settings-items {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,11 @@
|
||||||
<ul class="actions-list">
|
<ul class="actions-list">
|
||||||
{{#each types}}
|
{{#each types}}
|
||||||
<li class="action-item">
|
<li class="action-item">
|
||||||
<input type="radio" name="type" value="{{id}}" {{#if (eq @index 0)}}checked{{/if}}>
|
<label class="label" for="{{id}}" data-tooltip="{{localize tooltip}}" data-tooltip-direction="LEFT">
|
||||||
<span class="label">{{localize name}}</span>
|
<i class="fa-solid {{icon}} fa-xl"></i>
|
||||||
|
<span class="label">{{localize name}}</span>
|
||||||
|
</label>
|
||||||
|
<input type="radio" name="type" id="{{id}}" value="{{id}}" {{#if (eq @index 0)}}checked{{/if}}>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
||||||
</legend>
|
</legend>
|
||||||
<ul class="items-list">
|
<ul class="items-list">
|
||||||
{{#each source as | effect index |}}
|
{{!-- {{#each source as | effect index |}}
|
||||||
<div class="inventory-item" data-effect-id="{{effect._id}}" data-action="editEffect">
|
<div class="inventory-item" data-effect-id="{{effect._id}}" data-action="editEffect">
|
||||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||||
<img class="item-img" src="{{img}}">
|
<img class="item-img" src="{{img}}">
|
||||||
|
|
@ -18,6 +18,25 @@
|
||||||
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/each}} --}}
|
||||||
|
{{#each source as | effect index |}}
|
||||||
|
<div class="inventory-item single-img" data-effect-id="{{effect._id}}" data-action="editEffect">
|
||||||
|
<div class="inventory-item-header">
|
||||||
|
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||||
|
<div class="img-portait">
|
||||||
|
<img class="item-img" src="{{img}}">
|
||||||
|
</div>
|
||||||
|
<div class="item-label">
|
||||||
|
<div class="item-name">{{name}}</div>
|
||||||
|
</div>
|
||||||
|
{{/with}}
|
||||||
|
<input type="hidden" name="effects.{{index}}._id" value="{{effect._id}}">
|
||||||
|
{{#if @root.source.save.trait}}{{formInput ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave") dataset=(object tooltip=(localize "DAGGERHEART.UI.Tooltip.appliedEvenIfSuccessful") tooltipDirection="UP")}}{{/if}}
|
||||||
|
<div class="controls">
|
||||||
|
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{formField fields.applyTo value=source.type name="healing.applyTo" localize=true}}
|
{{formField fields.applyTo value=source.applyTo name="healing.applyTo" localize=true}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{#*inline "formula"}}
|
{{#*inline "formula"}}
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
||||||
<header class="dialog-header">
|
<header class="dialog-header">
|
||||||
<h1>{{itemName}}</h1>
|
<h1>{{itemName}}</h1>
|
||||||
</header>
|
</header>
|
||||||
<ul class="actions-list">
|
<ul class="action-buttons-list">
|
||||||
{{#each actions}}
|
{{#each actions}}
|
||||||
<li class="action-item">
|
<li class="action-item">
|
||||||
<input type="radio" id="action-{{_id}}" name="actionId" value="{{_id}}" {{#if (eq @index 0)}}checked{{/if}}>
|
<button type="button" class="list-button reverted" data-action-id="{{id}}" data-action="choose">
|
||||||
<label class="label" for="action-{{_id}}">{{ name }}</label>
|
<img src="{{ img }}">
|
||||||
|
<span>{{ name }}</span>
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -5,110 +5,48 @@
|
||||||
{{formGroup settingFields.schema.fields.displayFear value=settingFields._source.displayFear localize=true}}
|
{{formGroup settingFields.schema.fields.displayFear value=settingFields._source.displayFear localize=true}}
|
||||||
{{formGroup settingFields.schema.fields.showGenericStatusEffects value=settingFields._source.showGenericStatusEffects localize=true}}
|
{{formGroup settingFields.schema.fields.showGenericStatusEffects value=settingFields._source.showGenericStatusEffects localize=true}}
|
||||||
|
|
||||||
|
{{formGroup settingFields.schema.fields.dualityColorScheme value=settingFields._source.dualityColorScheme localize=true}}
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.duality"}}</legend>
|
<legend>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.title"}}</legend>
|
||||||
|
|
||||||
{{formInput settingFields.schema.fields.dualityColorScheme value=settingFields._source.dualityColorScheme localize=true}}
|
|
||||||
|
|
||||||
<h2>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.title"}}</h2>
|
|
||||||
<div class="title-hint">{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.hint"}}</div>
|
<div class="title-hint">{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.hint"}}</div>
|
||||||
|
|
||||||
<fieldset>
|
<section class='tab-navigation'>
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.hope"}}</legend>
|
<div class='navigation-container'>
|
||||||
|
<div class="navigation-inner-container">
|
||||||
<div class="field-section">
|
<line-div></line-div>
|
||||||
<div class="split-section">
|
<nav class='feature-tab sheet-tabs tabs' data-group='diceSoNice'>
|
||||||
<div class="label-container">
|
{{#each tabs as |tab|}}
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
<a class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.foreground value=settingFields._source.diceSoNice.hope.foreground localize=true}}
|
{{localize tab.label}}
|
||||||
</div>
|
</a>
|
||||||
<div class="label-container">
|
{{/each}}
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
</nav>
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.background value=settingFields._source.diceSoNice.hope.background localize=true}}
|
<line-div></line-div>
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.outline value=settingFields._source.diceSoNice.hope.outline localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.hope.fields.edge value=settingFields._source.diceSoNice.hope.edge localize=true}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</section>
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.fear"}}</legend>
|
|
||||||
|
|
||||||
<div class="field-section">
|
<div class="field-section">
|
||||||
<div class="split-section">
|
<div class="split-section">
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.foreground value=settingFields._source.diceSoNice.fear.foreground localize=true}}
|
{{formInput diceTab.fields.foreground value=diceTab.source.foreground localize=true}}
|
||||||
</div>
|
</div>
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.background value=settingFields._source.diceSoNice.fear.background localize=true}}
|
{{formInput diceTab.fields.background value=diceTab.source.background localize=true}}
|
||||||
</div>
|
</div>
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.outline value=settingFields._source.diceSoNice.fear.outline localize=true}}
|
{{formInput diceTab.fields.outline value=diceTab.source.outline localize=true}}
|
||||||
</div>
|
</div>
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.fear.fields.edge value=settingFields._source.diceSoNice.fear.edge localize=true}}
|
{{formInput diceTab.fields.edge value=diceTab.source.edge localize=true}}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</div>
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.Advantage.full"}}</legend>
|
|
||||||
|
|
||||||
<div class="field-section">
|
|
||||||
<div class="split-section">
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.foreground value=settingFields._source.diceSoNice.advantage.foreground localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.background value=settingFields._source.diceSoNice.advantage.background localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.outline value=settingFields._source.diceSoNice.advantage.outline localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.advantage.fields.edge value=settingFields._source.diceSoNice.advantage.edge localize=true}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}</legend>
|
|
||||||
|
|
||||||
<div class="field-section">
|
|
||||||
<div class="split-section">
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.foreground value=settingFields._source.diceSoNice.disadvantage.foreground localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.background value=settingFields._source.diceSoNice.disadvantage.background localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.outline value=settingFields._source.diceSoNice.disadvantage.outline localize=true}}
|
|
||||||
</div>
|
|
||||||
<div class="label-container">
|
|
||||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
|
||||||
{{formInput settingFields.schema.fields.diceSoNice.fields.disadvantage.fields.edge value=settingFields._source.diceSoNice.disadvantage.edge localize=true}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<footer class="form-footer">
|
<footer class="form-footer">
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "Icon"}}</label>
|
|
||||||
|
|
||||||
<div class="form-field">
|
|
||||||
<input type="text" name="icon" value="{{icon}}" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "Description"}}</legend>
|
|
||||||
|
|
||||||
<prose-mirror name="description" value="{{description}}">
|
|
||||||
{{{ enrichedDescription }}}
|
|
||||||
</prose-mirror>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
15
templates/settings/downtime-config/actions.hbs
Normal file
15
templates/settings/downtime-config/actions.hbs
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
||||||
|
data-tab='{{tabs.actions.id}}'
|
||||||
|
data-group='{{tabs.actions.group}}'
|
||||||
|
>
|
||||||
|
<fieldset class="one-column">
|
||||||
|
<legend>{{localize "DAGGERHEART.GENERAL.Action.plural"}} <a><i class="fa-solid fa-plus icon-button" data-action="addItem"></i></a></legend>
|
||||||
|
|
||||||
|
<div class="settings-items">
|
||||||
|
{{#each move.actions as |action|}}
|
||||||
|
{{> "systems/daggerheart/templates/settings/components/settings-item-line.hbs" id=action.id }}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
<section class='tab-form-footer'>
|
<section class='tab-form-footer spaced'>
|
||||||
|
<button data-action="close">{{localize "Cancel"}}</button>
|
||||||
<button data-action="saveForm"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
<button data-action="saveForm"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<header class='settings-item-header'>
|
<header class='settings-item-header'>
|
||||||
<img class='profile' src='{{this.img}}' data-action='editImage' data-edit='img' />
|
<img class='profile' src='{{move.img}}' data-action='editImage' data-edit='img' />
|
||||||
<div class='item-info'>
|
<div class='item-info'>
|
||||||
<h1 class='item-name'><input type='text' name='name' value='{{this.name}}' /></h1>
|
<h1 class='item-name'><input type='text' name='name' value='{{move.name}}' /></h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
19
templates/settings/downtime-config/main.hbs
Normal file
19
templates/settings/downtime-config/main.hbs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.main.cssClass}} {{tabs.main.id}}'
|
||||||
|
data-tab='{{tabs.main.id}}'
|
||||||
|
data-group='{{tabs.main.group}}'
|
||||||
|
>
|
||||||
|
<fieldset class="one-column">
|
||||||
|
<legend>{{localize "Icon"}}</legend>
|
||||||
|
|
||||||
|
<input type="text" name="icon" value="{{move.icon}}" />
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset class="one-column">
|
||||||
|
<legend>{{localize "Description"}}</legend>
|
||||||
|
|
||||||
|
<prose-mirror name="description" value="{{move.description}}">
|
||||||
|
{{{ move.enrichedDescription }}}
|
||||||
|
</prose-mirror>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -12,6 +12,6 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="action-category">
|
<fieldset class="action-category">
|
||||||
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
|
||||||
{{formInput fields.description value=source.description name="description" }}
|
{{formInput fields.description value=source.description enriched=source.description name="description" toggled=true }}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="resources-section">
|
<div class="resources-section">
|
||||||
<div class="status-bar">
|
<div class="status-bar">
|
||||||
<div class='status-value'>
|
<div class='status-value'>
|
||||||
<p><input class="bar-input" name="system.resources.hitPoints.value"
|
<p><input class="bar-input" name="system.resources.hitPoints.value" min="0" max='{{source.system.resources.hitPoints.max}}'
|
||||||
value="{{source.system.resources.hitPoints.value}}" type="number"></p>
|
value="{{source.system.resources.hitPoints.value}}" type="number"></p>
|
||||||
<p>/</p>
|
<p>/</p>
|
||||||
<p class="bar-label">{{source.system.resources.hitPoints.max}}</p>
|
<p class="bar-label">{{source.system.resources.hitPoints.max}}</p>
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="status-bar">
|
<div class="status-bar">
|
||||||
<div class='status-value'>
|
<div class='status-value'>
|
||||||
<p><input class="bar-input" name="system.resources.stress.value"
|
<p><input class="bar-input" name="system.resources.stress.value" min="0" max='{{source.system.resources.stress.max}}'
|
||||||
value="{{source.system.resources.stress.value}}" type="number"></p>
|
value="{{source.system.resources.stress.value}}" type="number"></p>
|
||||||
<p>/</p>
|
<p>/</p>
|
||||||
<p class="bar-label">{{source.system.resources.stress.max}}</p>
|
<p class="bar-label">{{source.system.resources.stress.max}}</p>
|
||||||
|
|
|
||||||
|
|
@ -118,10 +118,10 @@
|
||||||
|
|
||||||
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||||
<div class="character-downtime-container">
|
<div class="character-downtime-container">
|
||||||
<button data-action="useDowntime" data-type="shortRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}">
|
<button type="button" data-action="useDowntime" data-type="shortRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}">
|
||||||
<i class="fa-solid fa-chair"></i>
|
<i class="fa-solid fa-chair"></i>
|
||||||
</button>
|
</button>
|
||||||
<button data-action="useDowntime" data-type="longRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}">
|
<button type="button" data-action="useDowntime" data-type="longRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}">
|
||||||
<i class="fa-solid fa-bed"></i>
|
<i class="fa-solid fa-bed"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,19 @@
|
||||||
<a class="death-roll-btn" data-tooltip="DAGGERHEART.UI.Tooltip.makeDeathMove" {{#if
|
<a class="death-roll-btn" data-tooltip="DAGGERHEART.UI.Tooltip.makeDeathMove" {{#if
|
||||||
isDeath}}data-action="makeDeathMove" {{/if}}><i class="fas fa-skull death-save"></i></a>
|
isDeath}}data-action="makeDeathMove" {{/if}}><i class="fas fa-skull death-save"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info-section">
|
<div class="info-section">
|
||||||
<div class="resources-section">
|
<div class="resources-section">
|
||||||
<div class="status-bar">
|
<div class="status-bar">
|
||||||
<div class='status-value'>
|
<div class='status-value'>
|
||||||
<p><input class="bar-input" name="system.resources.hitPoints.value"
|
<p><input class="bar-input" name="system.resources.hitPoints.value" min="0" max='{{document.system.resources.hitPoints.max}}'
|
||||||
value="{{document.system.resources.hitPoints.value}}" type="number"></p>
|
value="{{document.system.resources.hitPoints.value}}" type="number"></p>
|
||||||
<p>/</p>
|
<p>/</p>
|
||||||
<p class="bar-label">{{document.system.resources.hitPoints.max}}</p>
|
<p class="bar-label">{{document.system.resources.hitPoints.max}}</p>
|
||||||
</div>
|
</div>
|
||||||
<progress
|
<progress
|
||||||
class='progress-bar'
|
class='progress-bar'
|
||||||
value='{{document.system.resources.hitPoints.value}}'
|
|
||||||
max='{{document.system.resources.hitPoints.max}}'
|
max='{{document.system.resources.hitPoints.max}}'
|
||||||
|
value='{{document.system.resources.hitPoints.value}}'
|
||||||
></progress>
|
></progress>
|
||||||
<div class="status-label">
|
<div class="status-label">
|
||||||
<h4>{{localize "DAGGERHEART.GENERAL.HitPoints.short"}}</h4>
|
<h4>{{localize "DAGGERHEART.GENERAL.HitPoints.short"}}</h4>
|
||||||
|
|
@ -26,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="status-bar">
|
<div class="status-bar">
|
||||||
<div class='status-value'>
|
<div class='status-value'>
|
||||||
<p><input class="bar-input" name="system.resources.stress.value"
|
<p><input class="bar-input" name="system.resources.stress.value" min="0" max='{{document.system.resources.stress.max}}'
|
||||||
value="{{document.system.resources.stress.value}}" type="number"></p>
|
value="{{document.system.resources.stress.value}}" type="number"></p>
|
||||||
<p>/</p>
|
<p>/</p>
|
||||||
<p class="bar-label">{{document.system.resources.stress.max}}</p>
|
<p class="bar-label">{{document.system.resources.stress.max}}</p>
|
||||||
|
|
@ -34,6 +33,7 @@
|
||||||
<progress
|
<progress
|
||||||
class='progress-bar stress-color'
|
class='progress-bar stress-color'
|
||||||
value='{{document.system.resources.stress.value}}'
|
value='{{document.system.resources.stress.value}}'
|
||||||
|
min="0"
|
||||||
max='{{document.system.resources.stress.max}}'
|
max='{{document.system.resources.stress.max}}'
|
||||||
></progress>
|
></progress>
|
||||||
<div class="status-label">
|
<div class="status-label">
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="status-bar">
|
<div class="status-bar">
|
||||||
<div class='status-value'>
|
<div class='status-value'>
|
||||||
<p><input class="bar-input" name="system.resources.stress.value" value="{{document.system.resources.stress.value}}" type="number"></p>
|
<p><input class="bar-input" name="system.resources.stress.value" value="{{document.system.resources.stress.value}}" min="0" max='{{document.system.resources.stress.max}}' type="number"></p>
|
||||||
<p>/</p>
|
<p>/</p>
|
||||||
<p class="bar-label">{{document.system.resources.stress.max}}</p>
|
<p class="bar-label">{{document.system.resources.stress.max}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ Parameters:
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (and (not hideResources) item.system.quantity)}}
|
{{#if (and (not hideResources) item.system.quantity)}}
|
||||||
<div class="item-resource">
|
<div class="item-resource">
|
||||||
<input type="number" class="inventory-item-quantity" value="{{item.system.quantity}}" step="1" />
|
<input type="number" class="inventory-item-quantity" value="{{item.system.quantity}}" min="0" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{{#if (eq item.system.resource.type 'simple')}}
|
{{#if (eq item.system.resource.type 'simple')}}
|
||||||
<div class="item-resource">
|
<div class="item-resource">
|
||||||
<i class="{{#if item.system.resource.icon}}{{item.system.resource.icon}}{{else}}fa-solid fa-hashtag{{/if}}"></i>
|
<i class="{{#if item.system.resource.icon}}{{item.system.resource.icon}}{{else}}fa-solid fa-hashtag{{/if}}"></i>
|
||||||
<input type="number" class="inventory-item-resource" value="{{item.system.resource.value}}" step="1" />
|
<input type="number" class="inventory-item-resource" value="{{item.system.resource.value}}" min="0" max="{{rollParsed item.system.resource.max item.actor item true}}" />
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="item-resources">
|
<div class="item-resources">
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<section class='tab-form-footer'>
|
<section class='tab-form-footer padded'>
|
||||||
<button type="submit"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
<button type="submit"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<label class="button-target-selection{{#unless @root.targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.UI.Chat.damageRoll.selectedTarget"}}</label>
|
<label class="button-target-selection{{#unless @root.targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.UI.Chat.damageRoll.selectedTarget"}}</label>
|
||||||
</div>
|
</div>
|
||||||
{{#if (and hasSave @root.targetSelection @root.hasHitTarget)}}
|
{{#if (and hasSave @root.targetSelection @root.hasHitTarget)}}
|
||||||
<button class="inner-button inner-button-right roll-all-save-button">{{localize "DAGERHEART.GENERAL.rollAll"}} <i class="fa-solid fa-shield"></i></button>
|
<button class="inner-button inner-button-right roll-all-save-button">{{localize "DAGGERHEART.GENERAL.rollAll"}} <i class="fa-solid fa-shield"></i></button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="target-section">
|
<div class="target-section">
|
||||||
{{#each currentTargets as |target|}}
|
{{#each currentTargets as |target|}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue