Compare commits

..

No commits in common. "c337338c8b69c2ebfe5a4889b8a958228ac41a9c" and "a839ca006667de2db5a769ec511305886e935f4a" have entirely different histories.

11 changed files with 30 additions and 76 deletions

View file

@ -355,8 +355,6 @@ Hooks.on(CONFIG.DH.HOOKS.hooksConfig.groupRollStart, async data => {
});
const updateActorsRangeDependentEffects = async token => {
if (!token) return;
const rangeMeasurement = game.settings.get(
CONFIG.DH.id,
CONFIG.DH.SETTINGS.gameSettings.variantRules

View file

@ -74,7 +74,9 @@
"name": "Summon",
"tooltip": "Create tokens in the scene.",
"error": "You do not have permission to summon tokens or there is no active scene.",
"invalidDrop": "You can only drop Actor entities to summon."
"invalidDrop": "You can only drop Actor entities to summon.",
"chatMessageTitle": "Test2",
"chatMessageHeaderTitle": "Summoning"
},
"transform": {
"name": "Transform",
@ -2014,10 +2016,6 @@
"hint": "Multiply any damage dealt to you by this number"
}
},
"Battlepoints": {
"full": "Battlepoints",
"short": "BP"
},
"Bonuses": {
"rest": {
"downtimeAction": "Downtime Action",
@ -2433,7 +2431,6 @@
"next": "Next",
"none": "None",
"noTarget": "No current target",
"optionalThing": "Optional {thing}",
"partner": "Partner",
"player": {
"single": "Player",
@ -2460,7 +2457,6 @@
"rollDamage": "Roll Damage",
"rollWith": "{roll} Roll",
"save": "Save",
"saveSettings": "Save Settings",
"scalable": "Scalable",
"scars": "Scars",
"situationalBonus": "Situational Bonus",
@ -2615,14 +2611,8 @@
},
"Weapon": {
"weaponType": "Weapon Type",
"primaryWeapon": {
"full": "Primary Weapon",
"short": "Primary"
},
"secondaryWeapon": {
"full": "Secondary Weapon",
"short": "Secondary"
}
"primaryWeapon": "Primary Weapon",
"secondaryWeapon": "Secondary Weapon"
}
},
"MACROS": {
@ -3077,7 +3067,6 @@
},
"ItemBrowser": {
"title": "Daggerheart Compendium Browser",
"windowTitle": "Compendium Browser",
"hint": "Select a Folder in sidebar to start browsing through the compendium",
"browserSettings": "Browser Settings",
"columnName": "Name",

View file

@ -11,10 +11,7 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
this.character = character;
this.setup = {
traits: Object.keys(this.character.system.traits).reduce((acc, key) => {
acc[key] = { value: null };
return acc;
}, {}),
traits: this.character.system.traits,
ancestryName: {
primary: '',
secondary: ''
@ -380,10 +377,8 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
];
return Object.values(this.setup.traits).reduce((acc, x) => {
const index = traitCompareArray.indexOf(x.value);
if (index === -1) return acc;
traitCompareArray.splice(index, 1);
acc += 1;
acc += index !== -1;
return acc;
}, 0);
}

View file

@ -37,7 +37,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
tag: 'div',
window: {
frame: true,
title: 'DAGGERHEART.UI.ItemBrowser.windowTitle',
title: 'Compendium Browser',
icon: 'fa-solid fa-book-atlas',
positioned: true,
resizable: true
@ -583,9 +583,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
const { itemUuid } = event.target.closest('[data-item-uuid]').dataset,
item = await foundry.utils.fromUuid(itemUuid),
dragData = item.toDragData();
event.dataTransfer.setData('text/plain', JSON.stringify(dragData));
event.dataTransfer.setDragImage(event.target.querySelector('img'), 0, 0);
}
_canDragStart() {

View file

@ -74,13 +74,12 @@ export const typeConfig = {
columns: [
{
key: 'type',
label: 'DAGGERHEART.GENERAL.type',
format: type => type ? `TYPES.Item.${type}` : '-'
label: 'DAGGERHEART.GENERAL.type'
},
{
key: 'system.secondary',
label: 'DAGGERHEART.UI.ItemBrowser.subtype',
format: isSecondary => (isSecondary ? 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon.short' : isSecondary === false ? 'DAGGERHEART.ITEMS.Weapon.primaryWeapon.short' : '-')
format: isSecondary => (isSecondary ? 'secondary' : isSecondary === false ? 'primary' : '-')
},
{
key: 'system.tier',
@ -100,8 +99,8 @@ export const typeConfig = {
key: 'system.secondary',
label: 'DAGGERHEART.UI.ItemBrowser.subtype',
choices: [
{ value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon.full' },
{ value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full' }
{ value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon' },
{ value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon' }
]
},
{
@ -259,13 +258,11 @@ export const typeConfig = {
columns: [
{
key: 'system.type',
label: 'DAGGERHEART.GENERAL.type',
format: type => type ? `DAGGERHEART.CONFIG.DomainCardTypes.${type}` : '-'
label: 'DAGGERHEART.GENERAL.type'
},
{
key: 'system.domain',
label: 'DAGGERHEART.GENERAL.Domain.single',
format: domain => domain ? CONFIG.DH.DOMAIN.allDomains()[domain].label : '-'
label: 'DAGGERHEART.GENERAL.Domain.single'
},
{
key: 'system.level',
@ -377,7 +374,7 @@ export const typeConfig = {
columns: [
{
key: 'system.linkedClass',
label: 'TYPES.Item.class',
label: 'Class',
format: linkedClass => linkedClass?.name ?? 'DAGGERHEART.UI.ItemBrowser.missing'
},
{
@ -389,7 +386,7 @@ export const typeConfig = {
filters: [
{
key: 'system.linkedClass.uuid',
label: 'TYPES.Item.class',
label: 'Class',
choices: items => {
const list = items
.filter(item => item.system.linkedClass)
@ -413,8 +410,7 @@ export const typeConfig = {
},
{
key: 'system.mainTrait',
label: 'DAGGERHEART.GENERAL.Trait.single',
format: trait => (trait ? `DAGGERHEART.CONFIG.Traits.${trait}.name` : '-')
label: 'DAGGERHEART.GENERAL.Trait.single'
}
],
filters: [

View file

@ -175,11 +175,6 @@
opacity: 0.2;
}
&.no-horizontal-padding {
padding-left: 0;
padding-right: 0;
}
legend {
margin-left: auto;
margin-right: auto;
@ -283,15 +278,6 @@
flex-direction: column;
gap: 5px;
&.separated {
border-bottom: 2px solid;
padding-bottom: 8px;
}
.form-group {
padding: 0 0.75rem;
}
.experience-inner-container {
position: relative;
display: flex;

View file

@ -4,25 +4,17 @@
data-group='{{tabs.experience.group}}'
>
<div class="main-selections-container">
<fieldset class="section-container no-horizontal-padding">
<fieldset class="section-container">
<legend>{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.initialExperiences"}} {{experience.nrSelected}}/{{experience.nrTotal}}</legend>
<div class="experiences-inner-container">
{{#each experience.values as |experience id|}}
<div class="experience-container {{#unless @last}}separated{{/unless}}">
<div class="form-group">
<label>{{localize "DAGGERHEART.GENERAL.label"}}</label>
<div class="experience-inner-container">
<input class="experience-description" type="text" name="{{concat "experiences." id ".name" }}" value="{{experience.name}}" placeholder="{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.newExperience"}}" />
<span class="experience-value">{{numberFormat this.value sign=true}}</span>
</div>
<div class="experience-container">
<div class="experience-inner-container">
<input class="experience-description" type="text" name="{{concat "experiences." id ".name" }}" value="{{experience.name}}" placeholder="{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.newExperience"}}" />
<span class="experience-value">{{numberFormat this.value sign=true}}</span>
</div>
<div class="form-group">
<label>{{localize "DAGGERHEART.GENERAL.optionalThing" thing=(localize "DAGGERHEART.GENERAL.description")}}</label>
<div class="form-fields">
<textarea name="{{concat "experiences." id ".description"}}">{{experience.description}}</textarea>
</div>
</div>
<textarea name="{{concat "experiences." id ".description"}}">{{experience.description}}</textarea>
</div>
{{/each}}
</div>

View file

@ -1,3 +1,3 @@
<footer>
<button data-action="finish">{{localize "DAGGERHEART.GENERAL.saveSettings"}}</button>
<button data-action="finish">{{localize "Save Settings"}}</button>
</footer>

View file

@ -5,9 +5,9 @@
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
<div class='item-description'>
{{#if source.system.secondary}}
<h3>{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full"}}</h3>
<h3>{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}}</h3>
{{else}}
<h3>{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon.full"}}</h3>
<h3>{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon"}}</h3>
{{/if}}
<h3>
{{localize (concat 'DAGGERHEART.CONFIG.Traits.' source.system.attack.roll.trait '.short')}}

View file

@ -7,9 +7,9 @@
{{#each category as |grouping index|}}
<div class="battlepoint-grouping-container">
{{#if grouping.nr}}
<label>{{key}} {{localize "DAGGERHEART.GENERAL.Battlepoints.short"}} - {{concat (localize grouping.description) ' ' '('grouping.nr 'x)'}}</label>
<label>{{key}} BP: {{concat (localize grouping.description) ' ' '('grouping.nr 'x)'}}</label>
{{else}}
<label class="unselected-grouping">{{key}} {{localize "DAGGERHEART.GENERAL.Battlepoints.short"}} - {{localize grouping.description}}</label>
<label class="unselected-grouping">{{key}} BP - {{localize grouping.description}}</label>
{{/if}}
</div>
{{/each}}
@ -26,7 +26,7 @@
{{else}}
<input type="checkbox" data-combat-id="{{@root.combatId}}" data-category="{{toggle.categoryKey}}" data-grouping="{{toggle.toggleKey}}" {{checked toggle.checked}} />
{{/if}}
<label class="unselected-grouping">{{toggle.categoryKey}} {{localize "DAGGERHEART.GENERAL.Battlepoints.short"}}: {{localize toggle.description}}</label>
<label class="unselected-grouping">{{toggle.categoryKey}} BP: {{localize toggle.description}}</label>
</div>
{{/each}}
</div>

View file

@ -3,7 +3,7 @@
<h2 class="tooltip-title">{{item.name}}</h2>
<div class="tags">
<div class="tag">
<span>{{#if item.system.secondary}}{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full"}}{{else}}{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon.full"}}{{/if}}</span>
<span>{{#if item.system.secondary}}{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}}{{else}}{{localize "DAGGERHEART.ITEMS.Weapon.primaryWeapon"}}{{/if}}</span>
</div>
<div class="tag">
{{#with (lookup config.GENERAL.burden item.system.burden) as | burden |}}