Fix merge conflicts

This commit is contained in:
Chris Ryan 2025-09-07 09:00:45 +10:00
commit 5d5cfbb459
76 changed files with 1572 additions and 673 deletions

View file

@ -199,8 +199,7 @@ export const typeConfig = {
key: 'system.itemFeatures',
label: 'DAGGERHEART.GENERAL.features',
choices: () =>
Object.entries(CONFIG.DH.ITEM.weaponFeatures)
.map(([k, v]) => ({ value: k, label: v.label })),
Object.entries(CONFIG.DH.ITEM.weaponFeatures).map(([k, v]) => ({ value: k, label: v.label })),
operator: 'contains3'
}
]
@ -241,8 +240,7 @@ export const typeConfig = {
key: 'system.itemFeatures',
label: 'DAGGERHEART.GENERAL.features',
choices: () =>
Object.entries(CONFIG.DH.ITEM.armorFeatures)
.map(([k, v]) => ({ value: k, label: v.label })),
Object.entries(CONFIG.DH.ITEM.armorFeatures).map(([k, v]) => ({ value: k, label: v.label })),
operator: 'contains3'
}
]
@ -372,14 +370,30 @@ export const typeConfig = {
label: 'DAGGERHEART.ITEMS.Subclass.spellcastingTrait'
}
],
filters: []
},
beastforms: {
columns: [
{
key: 'system.tier',
label: 'DAGGERHEART.GENERAL.Tiers.singular'
},
{
key: 'system.mainTrait',
label: 'DAGGERHEART.GENERAL.Trait.single'
}
],
filters: [
{
key: 'system.linkedClass.uuid',
label: 'Class',
choices: (items) => {
const list = items.map(item => ({ value: item.system.linkedClass.uuid, label: item.system.linkedClass.name }));
return list.reduce((a,c) => {
if(!(a.find(i => i.value === c.value))) a.push(c);
choices: items => {
const list = items.map(item => ({
value: item.system.linkedClass.uuid,
label: item.system.linkedClass.name
}));
return list.reduce((a, c) => {
if (!a.find(i => i.value === c.value)) a.push(c);
return a;
}, []);
}
@ -417,7 +431,7 @@ export const compendiumConfig = {
id: 'characters',
keys: ['characters'],
label: 'DAGGERHEART.UI.ItemBrowser.folders.characters',
type: ['character'],
type: ['character']
// listType: 'characters'
},
adversaries: {
@ -431,7 +445,7 @@ export const compendiumConfig = {
id: 'ancestries',
keys: ['ancestries'],
label: 'DAGGERHEART.UI.ItemBrowser.folders.ancestries',
type: ['ancestry'],
type: ['ancestry']
/* folders: {
features: {
id: 'features',
@ -516,7 +530,7 @@ export const compendiumConfig = {
id: 'communities',
keys: ['communities'],
label: 'DAGGERHEART.UI.ItemBrowser.folders.communities',
type: ['community'],
type: ['community']
/* folders: {
features: {
id: 'features',
@ -537,7 +551,7 @@ export const compendiumConfig = {
keys: ['beastforms'],
label: 'DAGGERHEART.UI.ItemBrowser.folders.beastforms',
type: ['beastform'],
listType: 'beastforms',
listType: 'beastforms'
/* folders: {
features: {
id: 'features',

View file

@ -452,6 +452,34 @@ export const armorFeatures = {
}
};
export const allArmorFeatures = () => {
const homebrewFeatures = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).itemFeatures
.armorFeatures;
return {
...armorFeatures,
...Object.keys(homebrewFeatures).reduce((acc, key) => {
const feature = homebrewFeatures[key];
acc[key] = { ...feature, label: feature.name };
return acc;
}, {})
};
};
export const orderedArmorFeatures = () => {
const homebrewFeatures = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).itemFeatures
.armorFeatures;
const allFeatures = { ...armorFeatures, ...homebrewFeatures };
const all = Object.keys(allFeatures).map(key => {
const feature = allFeatures[key];
return {
...feature,
id: key,
label: feature.label ?? feature.name
};
});
return Object.values(all).sort((a, b) => game.i18n.localize(a.label).localeCompare(game.i18n.localize(b.label)));
};
export const weaponFeatures = {
barrier: {
label: 'DAGGERHEART.CONFIG.WeaponFeature.barrier.name',
@ -1383,6 +1411,34 @@ export const weaponFeatures = {
}
};
export const allWeaponFeatures = () => {
const homebrewFeatures = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).itemFeatures
.weaponFeatures;
return {
...weaponFeatures,
...Object.keys(homebrewFeatures).reduce((acc, key) => {
const feature = homebrewFeatures[key];
acc[key] = { ...feature, label: feature.name };
return acc;
}, {})
};
};
export const orderedWeaponFeatures = () => {
const homebrewFeatures = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).itemFeatures
.weaponFeatures;
const allFeatures = { ...weaponFeatures, ...homebrewFeatures };
const all = Object.keys(allFeatures).map(key => {
const feature = allFeatures[key];
return {
...feature,
id: key,
label: feature.label ?? feature.name
};
});
return Object.values(all).sort((a, b) => game.i18n.localize(a.label).localeCompare(game.i18n.localize(b.label)));
};
export const featureTypes = {
ancestry: {
id: 'ancestry',

View file

@ -31,20 +31,20 @@ export const gameSettings = {
};
export const actionAutomationChoices = {
never: {
id: "never",
label: "Never"
never: {
id: 'never',
label: 'Never'
},
showDialog: {
id: "showDialog",
label: "Show Dialog only"
id: 'showDialog',
label: 'Show Dialog only'
},
// npcOnly: {
// id: "npcOnly",
// label: "Always for non-characters"
// id: "npcOnly",
// label: "Always for non-characters"
// },
always: {
id: "always",
label: "Always"
id: 'always',
label: 'Always'
}
}
};