diff --git a/lang/en.json b/lang/en.json index 4c374458..332de6a0 100755 --- a/lang/en.json +++ b/lang/en.json @@ -213,6 +213,7 @@ "Features": "Features", "proficiency": "Proficiency", "unarmored": "Unarmored", + "newFeature": "New Feature", "Experience": { "Single": "Experience", "plural": "Experiences" diff --git a/module/applications/sheets-configs/adversary-settings.mjs b/module/applications/sheets-configs/adversary-settings.mjs index 22ad4b18..675f07ff 100644 --- a/module/applications/sheets-configs/adversary-settings.mjs +++ b/module/applications/sheets-configs/adversary-settings.mjs @@ -1,7 +1,3 @@ -import DHActionConfig from './action-config.mjs'; -import DHBaseItemSheet from '../sheets/api/base-item.mjs'; -import { actionsTypes } from '../../data/action/_module.mjs'; - const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; export default class DHAdversarySettings extends HandlebarsApplicationMixin(ApplicationV2) { @@ -26,9 +22,9 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl actions: { addExperience: this.#addExperience, removeExperience: this.#removeExperience, - addAction: this.#addAction, - editAction: this.#editAction, - removeAction: this.#removeAction + addFeature: this.#addFeature, + editFeature: this.#editFeature, + removeFeature: this.#removeFeature }, form: { handler: this.updateForm, @@ -55,9 +51,9 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl id: 'experiences', template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/experiences.hbs' }, - actions: { - id: 'actions', - template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/actions.hbs' + features: { + id: 'features', + template: 'systems/daggerheart/templates/sheets-settings/adversary-settings/features.hbs' } }; @@ -86,13 +82,13 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl icon: null, label: 'DAGGERHEART.General.tabs.experiences' }, - actions: { + features: { active: false, cssClass: '', group: 'primary', - id: 'actions', + id: 'features', icon: null, - label: 'DAGGERHEART.General.tabs.actions' + label: 'DAGGERHEART.General.tabs.features' } }; @@ -130,46 +126,25 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl this.render(); } - static async #addAction(_event, _button) { - const actionType = await DHBaseItemSheet.selectActionType(); - if (!actionType) return; - try { - const cls = actionsTypes[actionType] ?? actionsTypes.attack, - action = new cls( - { - _id: foundry.utils.randomID(), - type: actionType, - name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType].name), - ...cls.getSourceConfig(this.actor) - }, - { - parent: this.actor - } - ); - await this.actor.update({ 'system.actions': [...this.actor.system.actions, action] }); - await new DHActionConfig(this.actor.system.actions[this.actor.system.actions.length - 1]).render({ - force: true - }); - this.render(); - } catch (error) { - console.log(error); - } + static async #addFeature(_, _button) { + await this.actor.createEmbeddedDocuments('Item', [ + { + type: 'feature', + name: game.i18n.localize('DAGGERHEART.General.newFeature'), + img: 'icons/skills/melee/weapons-crossed-swords-black.webp' + } + ]); + this.render(); } - static async #editAction(event, target) { + static async #editFeature(event, target) { event.stopPropagation(); - const actionIndex = target.dataset.index; - await new DHActionConfig(this.actor.system.actions[actionIndex]).render({ - force: true - }); + this.actor.items.get(target.id).sheet.render(true); } - static async #removeAction(event, target) { + static async #removeFeature(event, target) { event.stopPropagation(); - const actionIndex = target.dataset.index; - await this.actor.update({ - 'system.actions': this.actor.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex)) - }); + await this.actor.deleteEmbeddedDocuments('Item', [target.id]); this.render(); } diff --git a/module/applications/sheets-configs/environment-settings.mjs b/module/applications/sheets-configs/environment-settings.mjs index 5e0c5cda..c8dd2a49 100644 --- a/module/applications/sheets-configs/environment-settings.mjs +++ b/module/applications/sheets-configs/environment-settings.mjs @@ -1,7 +1,3 @@ -import DHActionConfig from './action-config.mjs'; -import DHBaseItemSheet from '../sheets/api/base-item.mjs'; -import { actionsTypes } from '../../data/action/_module.mjs'; - const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(ApplicationV2) { @@ -25,9 +21,9 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap }, position: { width: 455, height: 'auto' }, actions: { - addAction: this.#addAction, - editAction: this.#editAction, - removeAction: this.#removeAction, + addFeature: this.#addFeature, + editFeature: this.#editFeature, + removeFeature: this.#removeFeature, addCategory: this.#addCategory, deleteProperty: this.#deleteProperty, viewAdversary: this.#viewAdversary, @@ -51,9 +47,9 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap id: 'details', template: 'systems/daggerheart/templates/sheets-settings/environment-settings/details.hbs' }, - actions: { - id: 'actions', - template: 'systems/daggerheart/templates/sheets-settings/environment-settings/actions.hbs' + features: { + id: 'features', + template: 'systems/daggerheart/templates/sheets-settings/environment-settings/features.hbs' }, adversaries: { id: 'adversaries', @@ -70,13 +66,13 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap icon: null, label: 'DAGGERHEART.General.tabs.details' }, - actions: { + features: { active: false, cssClass: '', group: 'primary', - id: 'actions', + id: 'features', icon: null, - label: 'DAGGERHEART.General.tabs.actions' + label: 'DAGGERHEART.General.tabs.features' }, adversaries: { active: false, @@ -122,46 +118,23 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap return tabs; } - static async #addAction(_event, _button) { - const actionType = await DHBaseItemSheet.selectActionType(); - if (!actionType) return; - try { - const cls = actionsTypes[actionType] ?? actionsTypes.attack, - action = new cls( - { - _id: foundry.utils.randomID(), - type: actionType, - name: game.i18n.localize(CONFIG.DH.ACTIONS.actionTypes[actionType].name), - ...cls.getSourceConfig(this.actor) - }, - { - parent: this.actor - } - ); - await this.actor.update({ 'system.actions': [...this.actor.system.actions, action] }); - await new DHActionConfig(this.actor.system.actions[this.actor.system.actions.length - 1]).render({ - force: true - }); - this.render(); - } catch (error) { - console.log(error); - } + static async #addFeature(_, _button) { + await this.actor.createEmbeddedDocuments('Item', [ + { + type: 'feature', + name: game.i18n.localize('DAGGERHEART.General.newFeature'), + img: 'icons/magic/perception/orb-crystal-ball-scrying-blue.webp' + } + ]); + this.render(); } - static async #editAction(event, target) { - event.stopPropagation(); - const actionIndex = target.dataset.index; - await new DHActionConfig(this.actor.system.actions[actionIndex]).render({ - force: true - }); + static async #editFeature(_, target) { + this.actor.items.get(target.id).sheet.render(true); } - static async #removeAction(event, target) { - event.stopPropagation(); - const actionIndex = target.dataset.index; - await this.actor.update({ - 'system.actions': this.actor.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex)) - }); + static async #removeFeature(_, target) { + await this.actor.deleteEmbeddedDocuments('Item', [target.id]); this.render(); } diff --git a/module/applications/sheets/actors/adversary.mjs b/module/applications/sheets/actors/adversary.mjs index a48c1fa4..cbcd3f24 100644 --- a/module/applications/sheets/actors/adversary.mjs +++ b/module/applications/sheets/actors/adversary.mjs @@ -29,19 +29,19 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) { static PARTS = { sidebar: { template: 'systems/daggerheart/templates/sheets/actors/adversary/sidebar.hbs' }, header: { template: 'systems/daggerheart/templates/sheets/actors/adversary/header.hbs' }, - actions: { template: 'systems/daggerheart/templates/sheets/actors/adversary/actions.hbs' }, + features: { template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs' }, notes: { template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs' }, effects: { template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs' } }; static TABS = { - actions: { + features: { active: true, cssClass: '', group: 'primary', - id: 'actions', + id: 'features', icon: null, - label: 'DAGGERHEART.General.tabs.actions' + label: 'DAGGERHEART.General.tabs.features' }, notes: { active: false, @@ -71,9 +71,9 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) { return context; } - getAction(element) { + getItem(element) { const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId, - item = this.document.system.actions.find(x => x.id === itemId); + item = this.document.items.get(itemId); return item; } @@ -108,7 +108,7 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) { } static async useItem(event) { - const action = this.getAction(event) ?? this.actor.system.attack; + const action = this.getItem(event) ?? this.actor.system.attack; action.use(event); } @@ -134,7 +134,7 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) { cls.create(msg.toObject()); } else { - const item = this.getAction(event) ?? this.document.system.attack; + const item = this.getItem(event) ?? this.document.system.attack; item.toChat(this.document.id); } } diff --git a/module/applications/sheets/actors/environment.mjs b/module/applications/sheets/actors/environment.mjs index 733e8e10..1182a764 100644 --- a/module/applications/sheets/actors/environment.mjs +++ b/module/applications/sheets/actors/environment.mjs @@ -26,7 +26,7 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) { static PARTS = { header: { template: 'systems/daggerheart/templates/sheets/actors/environment/header.hbs' }, - actions: { template: 'systems/daggerheart/templates/sheets/actors/environment/actions.hbs' }, + features: { template: 'systems/daggerheart/templates/sheets/actors/environment/features.hbs' }, potentialAdversaries: { template: 'systems/daggerheart/templates/sheets/actors/environment/potentialAdversaries.hbs' }, @@ -34,13 +34,13 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) { }; static TABS = { - actions: { + features: { active: true, cssClass: '', group: 'primary', - id: 'actions', + id: 'features', icon: null, - label: 'DAGGERHEART.General.tabs.actions' + label: 'DAGGERHEART.General.tabs.features' }, potentialAdversaries: { active: false, @@ -69,9 +69,9 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) { return context; } - getAction(element) { + getItem(element) { const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId, - item = this.document.system.actions.find(x => x.id === itemId); + item = this.document.items.get(itemId); return item; } @@ -114,7 +114,7 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) { } static async useItem(event, button) { - const action = this.getAction(event); + const action = this.getItem(event); if (!action) { await this.viewAdversary(event, button); } else { @@ -123,7 +123,7 @@ export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) { } static async toChat(event) { - const item = this.getAction(event); + const item = this.getItem(event); item.toChat(this.document.id); } diff --git a/module/data/actor/adversary.mjs b/module/data/actor/adversary.mjs index ec2b96eb..35d816c5 100644 --- a/module/data/actor/adversary.mjs +++ b/module/data/actor/adversary.mjs @@ -43,7 +43,6 @@ export default class DhpAdversary extends BaseDataActor { hitPoints: resourceField(), stress: resourceField() }), - actions: new fields.ArrayField(new ActionField()), attack: new ActionField({ initial: { name: 'Attack', @@ -86,4 +85,8 @@ export default class DhpAdversary extends BaseDataActor { get attackBonus() { return this.attack.roll.bonus; } + + get features() { + return this.parent.items.filter(x => x.type === 'feature'); + } } diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index d9ea6eef..a9d9bfc6 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -97,7 +97,6 @@ export default class DhCharacter extends BaseDataActor { value: new ForeignDocumentUUIDField({ type: 'Item', nullable: true }), subclass: new ForeignDocumentUUIDField({ type: 'Item', nullable: true }) }), - actions: new fields.ArrayField(new ActionField()), levelData: new fields.EmbeddedDataField(DhLevelData), bonuses: new fields.SchemaField({ armorScore: new fields.NumberField({ integer: true, initial: 0 }), diff --git a/module/data/actor/environment.mjs b/module/data/actor/environment.mjs index db75612b..58bdc695 100644 --- a/module/data/actor/environment.mjs +++ b/module/data/actor/environment.mjs @@ -30,8 +30,11 @@ export default class DhEnvironment extends BaseDataActor { adversaries: new ForeignDocumentUUIDArrayField({ type: 'Actor' }) }) ), - actions: new fields.ArrayField(new ActionField()), notes: new fields.HTMLField() }; } + + get features() { + return this.parent.items.filter(x => x.type === 'feature'); + } } diff --git a/module/dice/d20Roll.mjs b/module/dice/d20Roll.mjs index b36c0884..fab2c06d 100644 --- a/module/dice/d20Roll.mjs +++ b/module/dice/d20Roll.mjs @@ -143,7 +143,6 @@ export default class D20Roll extends DHRoll { : config.roll.advantage == this.ADV_MODE.DISADVANTAGE ? false : null; - setDiceSoNiceForDualityRoll(roll, advantageState); this.postEvaluate(roll, config); } diff --git a/styles/daggerheart.css b/styles/daggerheart.css index ec100a38..01689471 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -4884,122 +4884,78 @@ body.theme-light.application.environment { .application.daggerheart.dh-style.dialog .tab.experiences .experience-list .experience-item a { text-align: center; } -.application.daggerheart.dh-style.dialog .tab.actions { +.application.daggerheart.dh-style.dialog .tab.features { max-height: 450px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: light-dark(#18162e, #f3c267) transparent; } -.application.daggerheart.dh-style.dialog .tab.actions .add-action-btn { +.application.daggerheart.dh-style.dialog .tab.features .add-feature-btn { width: 100%; margin-bottom: 12px; } -.application.daggerheart.dh-style.dialog .tab.actions .action-list { +.application.daggerheart.dh-style.dialog .tab.features .feature-list { display: flex; flex-direction: column; gap: 10px; } -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item { +.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 5px; border-radius: 3px; } -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item img { +.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item img { height: 40px; width: 40px; object-fit: cover; } -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label { +.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item .label { font-family: 'Montserrat', sans-serif; } -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags { - display: flex; - gap: 10px; -} -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags .tag { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - padding: 3px 5px; - font-size: 12px; - background: light-dark(#22222215, #efe6d815); - border: 1px solid light-dark(#222, #efe6d8); - border-radius: 3px; -} -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags .label { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - font-size: 12px; -} -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .controls { +.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item .controls { display: flex; gap: 5px; } -.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .controls a { +.application.daggerheart.dh-style.dialog .tab.features .feature-list .feature-item .controls a { text-align: center; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features { max-height: 450px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: light-dark(#18162e, #f3c267) transparent; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .add-action-btn { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .add-feature-btn { width: 100%; margin-bottom: 12px; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list { display: flex; flex-direction: column; gap: 10px; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 5px; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item img { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item img { height: 40px; width: 40px; object-fit: cover; border-radius: 3px; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item .label { font-family: 'Montserrat', sans-serif; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label .tags { - display: flex; - gap: 10px; -} -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label .tags .tag { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - padding: 3px 5px; - font-size: 12px; - background: light-dark(#22222215, #efe6d815); - border: 1px solid light-dark(#222, #efe6d8); - border-radius: 3px; -} -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .label .tags .label { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - font-size: 12px; -} -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .controls { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item .controls { display: flex; gap: 5px; } -.application.daggerheart.dh-style.dialog.environment-settings .tab.actions .action-list .action-item .controls a { +.application.daggerheart.dh-style.dialog.environment-settings .tab.features .feature-list .feature-item .controls a { text-align: center; } .application.daggerheart.dh-style.dialog .tab.adversaries { diff --git a/styles/daggerheart.less b/styles/daggerheart.less index 38654759..f946c344 100755 --- a/styles/daggerheart.less +++ b/styles/daggerheart.less @@ -35,9 +35,9 @@ @import './less/applications/header.less'; @import './less/applications/adversary-settings/sheet.less'; @import './less/applications/adversary-settings/experiences.less'; -@import './less/applications/adversary-settings/actions.less'; +@import './less/applications/adversary-settings/features.less'; -@import './less/applications/environment-settings/actions.less'; +@import './less/applications/environment-settings/features.less'; @import './less/applications/environment-settings/adversaries.less'; @import './less/applications//beastform.less'; diff --git a/styles/less/actors/adversary/actions.less b/styles/less/actors/adversary/actions.less index 97bb45e7..6ca46e90 100644 --- a/styles/less/actors/adversary/actions.less +++ b/styles/less/actors/adversary/actions.less @@ -1,20 +1,20 @@ -@import '../../utils/colors.less'; -@import '../../utils/fonts.less'; - -.application.sheet.daggerheart.actor.dh-style.adversary { - .tab.actions { - .action-section { - display: flex; - flex-direction: column; - gap: 10px; - overflow-y: auto; - mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%); - padding: 20px 0; - padding-top: 10px; - height: 95%; - - scrollbar-width: thin; - scrollbar-color: light-dark(@dark-blue, @golden) transparent; - } - } -} +@import '../../utils/colors.less'; +@import '../../utils/fonts.less'; + +.application.sheet.daggerheart.actor.dh-style.adversary { + .tab.features { + .feature-section { + display: flex; + flex-direction: column; + gap: 10px; + overflow-y: auto; + mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%); + padding: 20px 0; + padding-top: 10px; + height: 95%; + + scrollbar-width: thin; + scrollbar-color: light-dark(@dark-blue, @golden) transparent; + } + } +} diff --git a/styles/less/applications/adversary-settings/actions.less b/styles/less/applications/adversary-settings/actions.less deleted file mode 100644 index 55cf2828..00000000 --- a/styles/less/applications/adversary-settings/actions.less +++ /dev/null @@ -1,74 +0,0 @@ -@import '../../utils/colors.less'; -@import '../../utils/fonts.less'; - -.application.daggerheart.dh-style.dialog { - .tab.actions { - max-height: 450px; - overflow-y: auto; - scrollbar-width: thin; - scrollbar-color: light-dark(@dark-blue, @golden) transparent; - - .add-action-btn { - width: 100%; - margin-bottom: 12px; - } - - .action-list { - display: flex; - flex-direction: column; - gap: 10px; - - .action-item { - display: grid; - grid-template-columns: 40px 1fr auto; - align-items: center; - gap: 5px; - border-radius: 3px; - - img { - height: 40px; - width: 40px; - object-fit: cover; - } - - .label { - font-family: @font-body; - - .tags { - display: flex; - gap: 10px; - - .tag { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - padding: 3px 5px; - font-size: 12px; - - background: light-dark(@dark-15, @beige-15); - border: 1px solid light-dark(@dark, @beige); - border-radius: 3px; - } - - .label { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - font-size: 12px; - } - } - } - - .controls { - display: flex; - gap: 5px; - a { - text-align: center; - } - } - } - } - } -} diff --git a/styles/less/applications/adversary-settings/features.less b/styles/less/applications/adversary-settings/features.less new file mode 100644 index 00000000..5798bfa9 --- /dev/null +++ b/styles/less/applications/adversary-settings/features.less @@ -0,0 +1,48 @@ +@import '../../utils/colors.less'; +@import '../../utils/fonts.less'; + +.application.daggerheart.dh-style.dialog { + .tab.features { + max-height: 450px; + overflow-y: auto; + scrollbar-width: thin; + scrollbar-color: light-dark(@dark-blue, @golden) transparent; + + .add-feature-btn { + width: 100%; + margin-bottom: 12px; + } + + .feature-list { + display: flex; + flex-direction: column; + gap: 10px; + + .feature-item { + display: grid; + grid-template-columns: 40px 1fr auto; + align-items: center; + gap: 5px; + border-radius: 3px; + + img { + height: 40px; + width: 40px; + object-fit: cover; + } + + .label { + font-family: @font-body; + } + + .controls { + display: flex; + gap: 5px; + a { + text-align: center; + } + } + } + } + } +} diff --git a/styles/less/applications/environment-settings/actions.less b/styles/less/applications/environment-settings/actions.less deleted file mode 100644 index e4886ea9..00000000 --- a/styles/less/applications/environment-settings/actions.less +++ /dev/null @@ -1,74 +0,0 @@ -@import '../../utils/colors.less'; -@import '../../utils/fonts.less'; - -.application.daggerheart.dh-style.dialog.environment-settings { - .tab.actions { - max-height: 450px; - overflow-y: auto; - scrollbar-width: thin; - scrollbar-color: light-dark(@dark-blue, @golden) transparent; - - .add-action-btn { - width: 100%; - margin-bottom: 12px; - } - - .action-list { - display: flex; - flex-direction: column; - gap: 10px; - - .action-item { - display: grid; - grid-template-columns: 40px 1fr auto; - align-items: center; - gap: 5px; - - img { - height: 40px; - width: 40px; - object-fit: cover; - border-radius: 3px; - } - - .label { - font-family: @font-body; - - .tags { - display: flex; - gap: 10px; - - .tag { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - padding: 3px 5px; - font-size: 12px; - - background: light-dark(@dark-15, @beige-15); - border: 1px solid light-dark(@dark, @beige); - border-radius: 3px; - } - - .label { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - font-size: 12px; - } - } - } - - .controls { - display: flex; - gap: 5px; - a { - text-align: center; - } - } - } - } - } -} diff --git a/styles/less/applications/environment-settings/features.less b/styles/less/applications/environment-settings/features.less new file mode 100644 index 00000000..e4bb039f --- /dev/null +++ b/styles/less/applications/environment-settings/features.less @@ -0,0 +1,48 @@ +@import '../../utils/colors.less'; +@import '../../utils/fonts.less'; + +.application.daggerheart.dh-style.dialog.environment-settings { + .tab.features { + max-height: 450px; + overflow-y: auto; + scrollbar-width: thin; + scrollbar-color: light-dark(@dark-blue, @golden) transparent; + + .add-feature-btn { + width: 100%; + margin-bottom: 12px; + } + + .feature-list { + display: flex; + flex-direction: column; + gap: 10px; + + .feature-item { + display: grid; + grid-template-columns: 40px 1fr auto; + align-items: center; + gap: 5px; + + img { + height: 40px; + width: 40px; + object-fit: cover; + border-radius: 3px; + } + + .label { + font-family: @font-body; + } + + .controls { + display: flex; + gap: 5px; + a { + text-align: center; + } + } + } + } + } +} diff --git a/templates/sheets-settings/adversary-settings/actions.hbs b/templates/sheets-settings/adversary-settings/actions.hbs deleted file mode 100644 index f766c24a..00000000 --- a/templates/sheets-settings/adversary-settings/actions.hbs +++ /dev/null @@ -1,34 +0,0 @@ -
- -
- {{localize tabs.actions.label}} - -
-
\ No newline at end of file diff --git a/templates/sheets-settings/adversary-settings/features.hbs b/templates/sheets-settings/adversary-settings/features.hbs new file mode 100644 index 00000000..e3a73490 --- /dev/null +++ b/templates/sheets-settings/adversary-settings/features.hbs @@ -0,0 +1,26 @@ +
+ +
+ {{localize tabs.features.label}} + +
+
\ No newline at end of file diff --git a/templates/sheets-settings/environment-settings/actions.hbs b/templates/sheets-settings/environment-settings/actions.hbs deleted file mode 100644 index f766c24a..00000000 --- a/templates/sheets-settings/environment-settings/actions.hbs +++ /dev/null @@ -1,34 +0,0 @@ -
- -
- {{localize tabs.actions.label}} - -
-
\ No newline at end of file diff --git a/templates/sheets-settings/environment-settings/features.hbs b/templates/sheets-settings/environment-settings/features.hbs new file mode 100644 index 00000000..e3a73490 --- /dev/null +++ b/templates/sheets-settings/environment-settings/features.hbs @@ -0,0 +1,26 @@ +
+ +
+ {{localize tabs.features.label}} + +
+
\ No newline at end of file diff --git a/templates/sheets/actors/adversary/actions.hbs b/templates/sheets/actors/adversary/actions.hbs deleted file mode 100644 index 1c7e46fb..00000000 --- a/templates/sheets/actors/adversary/actions.hbs +++ /dev/null @@ -1,11 +0,0 @@ -
-
- {{#if document.system.actions}} - {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}} - {{/if}} -
-
\ No newline at end of file diff --git a/templates/sheets/actors/adversary/features.hbs b/templates/sheets/actors/adversary/features.hbs new file mode 100644 index 00000000..a41da05d --- /dev/null +++ b/templates/sheets/actors/adversary/features.hbs @@ -0,0 +1,11 @@ +
+
+ {{#if document.system.features}} + {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.features.label) type='feature'}} + {{/if}} +
+
\ No newline at end of file diff --git a/templates/sheets/actors/environment/actions.hbs b/templates/sheets/actors/environment/features.hbs similarity index 50% rename from templates/sheets/actors/environment/actions.hbs rename to templates/sheets/actors/environment/features.hbs index 48ee18a7..2f8ae823 100644 --- a/templates/sheets/actors/environment/actions.hbs +++ b/templates/sheets/actors/environment/features.hbs @@ -1,9 +1,9 @@ -
-
- {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}} -
+
+
+ {{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}} +
\ No newline at end of file