mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
219-fix weapon action damage and display of calculation. (#250)
* fix weapon action damage and display of calculation. * modify weapon data to split formula. * remove unused field
This commit is contained in:
parent
122621a57a
commit
c4448226e0
11 changed files with 36 additions and 29 deletions
|
|
@ -38,7 +38,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
}
|
||||
};
|
||||
|
||||
static CLEAN_ARRAYS = ["damage.parts", "cost", "effects"];
|
||||
static CLEAN_ARRAYS = ['damage.parts', 'cost', 'effects'];
|
||||
|
||||
_getTabs() {
|
||||
const tabs = {
|
||||
|
|
@ -69,7 +69,6 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
context.disableOption = this.disableOption.bind(this);
|
||||
context.isNPC = this.action.actor && this.action.actor.type !== 'character';
|
||||
context.hasRoll = this.action.hasRoll;
|
||||
console.log(context)
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
@ -97,9 +96,9 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
|
||||
_prepareSubmitData(event, formData) {
|
||||
const submitData = foundry.utils.expandObject(formData.object);
|
||||
for ( const keyPath of this.constructor.CLEAN_ARRAYS ) {
|
||||
for (const keyPath of this.constructor.CLEAN_ARRAYS) {
|
||||
const data = foundry.utils.getProperty(submitData, keyPath);
|
||||
if ( data ) foundry.utils.setProperty(submitData, keyPath, Object.values(data));
|
||||
if (data) foundry.utils.setProperty(submitData, keyPath, Object.values(data));
|
||||
}
|
||||
return submitData;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue