New labels. Time to print them somewhere.

This commit is contained in:
Nikhil Nagarajan 2025-12-15 16:03:00 -05:00
parent 9b4249b100
commit d2f9b3912b
7 changed files with 58 additions and 1 deletions

View file

@ -1033,6 +1033,12 @@
"description": ""
}
},
"FeatureForm":{
"label": "Feature Form",
"passive": "Passive",
"action":"Action",
"reaction":"Reaction"
},
"Gold": {
"title": "Gold",
"coins": "Coins",

View file

@ -31,4 +31,11 @@ export default class FeatureSheet extends DHBaseItemSheet {
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
}
};
//Might be wrong location but testing out if here is okay.
/**@override */
async _prepareContext(options) {
const context = await super._prepareContext(options);
context.featureFormChoices = CONFIG.DH.ITEM.featureForm;
return context;
}
}

View file

@ -1458,6 +1458,12 @@ export const orderedWeaponFeatures = () => {
return Object.values(all).sort((a, b) => game.i18n.localize(a.label).localeCompare(game.i18n.localize(b.label)));
};
export const featureForm = {
passive: "DAGGERHEART.CONFIG.FeatureForm.passive",
action: "DAGGERHEART.CONFIG.FeatureForm.action",
reaction: "DAGGERHEART.CONFIG.FeatureForm.reaction"
};
export const featureTypes = {
ancestry: {
id: 'ancestry',

View file

@ -30,7 +30,13 @@ export default class DHFeature extends BaseDataItem {
initial: null
}),
multiclassOrigin: new fields.BooleanField({ initial: false }),
identifier: new fields.StringField()
identifier: new fields.StringField(),
featureForm: new fields.StringField({
required: true,
initial: "passive",
choices: CONFIG.DH.ITEM.featureForm,
label: "DAGGERHEART.CONFIG.featureForm.label",
})
};
}
}

View file

@ -49,6 +49,19 @@ Parameters:
{{tag}}
</div>
{{/each}}
{{!-- Feature Form Tag Start --}}
{{#if (eq ../type 'feature')}}
{{#if (or (eq @root.document.type 'adversary') (eq @root.document.type 'environment'))}}
{{#if system.featureForm}}
<div class="tag feature-form">
<span class="recall-value">{{localize (concat "DAGGERHEART.CONFIG.FeatureForm." system.featureForm)}}</span>
</div>
{{/if}}
{{/if}}
{{/if}}
{{!-- Feature Form Tag End --}}
</div>
{{/if}}
{{/with}}

View file

@ -67,6 +67,21 @@
</div>
{{/if}}
{{/if}}
<!-- Feature Form Tags for adversary/environment actors -->
{{#if (eq type 'feature')}}
{{#if (or (eq @root.document.type 'adversary') (eq @root.document.type 'environment'))}}
{{#if item.system.featureForm}}
<div class="item-tags">
<div class="tag">
<span class="recall-label">{{localize "DAGGERHEART.CONFIG.FeatureForm.label"}}: </span>
<span class="recall-value">{{localize (concat "DAGGERHEART.CONFIG.FeatureForm." item.system.featureForm)}}</span>
</div>
</div>
{{/if}}
{{/if}}
{{/if}}
{{#if (eq type 'domainCard')}}
{{#if isSidebar}}
<div class="item-labels">

View file

@ -4,4 +4,8 @@
data-group='{{tabs.settings.group}}'
>
{{> "systems/daggerheart/templates/sheets/global/partials/resource-section/resource-section.hbs" }}
<fieldset class="two-columns">
<span>{{localize "DAGGERHEART.CONFIG.FeatureForm.label"}}</span>
{{formInput document.system.schema.fields.featureForm value=system.featureForm choices=featureFormChoices localize=true}}
</fieldset>
</section>