mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
PR Fixes
This commit is contained in:
parent
af24b5064e
commit
baa7f6352e
10 changed files with 10 additions and 11 deletions
|
|
@ -215,7 +215,6 @@
|
|||
"Features": "Features",
|
||||
"proficiency": "Proficiency",
|
||||
"unarmored": "Unarmored",
|
||||
"newFeature": "New Feature",
|
||||
"Experience": {
|
||||
"Single": "Experience",
|
||||
"plural": "Experiences"
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
|||
await this.actor.createEmbeddedDocuments('Item', [
|
||||
{
|
||||
type: 'feature',
|
||||
name: game.i18n.localize('DAGGERHEART.General.newFeature'),
|
||||
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
|
||||
img: 'icons/skills/melee/weapons-crossed-swords-black.webp'
|
||||
}
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
await this.actor.createEmbeddedDocuments('Item', [
|
||||
{
|
||||
type: 'feature',
|
||||
name: game.i18n.localize('DAGGERHEART.General.newFeature'),
|
||||
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
|
||||
img: 'icons/magic/perception/orb-crystal-ball-scrying-blue.webp'
|
||||
}
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
|||
static async #addFeature(_event, _button) {
|
||||
const feature = await game.items.documentClass.create({
|
||||
type: 'feature',
|
||||
name: game.i18n.localize('DAGGERHEART.General.newFeature')
|
||||
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
|
||||
});
|
||||
await this.document.update({
|
||||
'system.features': [...this.document.system.features.filter(x => x).map(x => x.uuid), feature.uuid]
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ export default class ClassSheet extends DHBaseItemSheet {
|
|||
const actionPath = this.getActionPath(target.dataset.type);
|
||||
const feature = await game.items.documentClass.create({
|
||||
type: 'feature',
|
||||
name: game.i18n.localize('DAGGERHEART.General.newFeature')
|
||||
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
|
||||
});
|
||||
await this.document.update({
|
||||
[`system.${actionPath}`]: [
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default class SubclassSheet extends DHBaseItemSheet {
|
|||
static async addFeature(_, target) {
|
||||
const feature = await game.items.documentClass.create({
|
||||
type: 'feature',
|
||||
name: game.i18n.localize('DAGGERHEART.General.newFeature')
|
||||
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
|
||||
});
|
||||
await this.document.update({
|
||||
[`system.${target.dataset.type}`]: feature.uuid
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ export default class DhCharacter extends BaseDataActor {
|
|||
companionFeatures = [],
|
||||
features = [];
|
||||
|
||||
for (var item of this.parent.items) {
|
||||
for (let item of this.parent.items) {
|
||||
if (item.system.type === CONFIG.DH.ITEM.featureTypes.ancestry.id) {
|
||||
ancestryFeatures.push(item);
|
||||
} else if (item.system.type === CONFIG.DH.ITEM.featureTypes.community.id) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
const removed = this.features.filter(x => !changes.system.features.includes(x));
|
||||
const added = changes.system.features.filter(x => !this.features.includes(x));
|
||||
|
||||
for (var weaponFeature of removed) {
|
||||
for (let weaponFeature of removed) {
|
||||
for (var effectId of weaponFeature.effectIds) {
|
||||
await this.parent.effects.get(effectId).delete();
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
changes.system.actions = this.actions.filter(x => !weaponFeature.actionIds.includes(x._id));
|
||||
}
|
||||
|
||||
for (var weaponFeature of added) {
|
||||
for (let weaponFeature of added) {
|
||||
const featureData = CONFIG.DH.ITEM.weaponFeatures[weaponFeature.value];
|
||||
if (featureData.effects?.length > 0) {
|
||||
const embeddedItems = await this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
data-group='{{tabs.features.group}}'
|
||||
>
|
||||
<button class="add-feature-btn" data-action="addFeature">
|
||||
{{localize "DAGGERHEART.General.newFeature"}}
|
||||
{{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
|
||||
</button>
|
||||
<fieldset>
|
||||
<legend>{{localize tabs.features.label}}</legend>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
data-group='{{tabs.features.group}}'
|
||||
>
|
||||
<button class="add-feature-btn" data-action="addFeature">
|
||||
{{localize "DAGGERHEART.General.newFeature"}}
|
||||
{{localize "DOCUMENT.New" type=(localize "TYPES.Item.feature")}}
|
||||
</button>
|
||||
<fieldset>
|
||||
<legend>{{localize tabs.features.label}}</legend>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue