mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Remove console log
This commit is contained in:
parent
d7a2c05694
commit
3d034cd24e
6 changed files with 4 additions and 28 deletions
|
|
@ -7,13 +7,8 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
|
||||
this.action = action;
|
||||
this.openSection = null;
|
||||
// console.log(this.action)
|
||||
}
|
||||
|
||||
// get title(){
|
||||
// return `Action - ${this.action.name}`;
|
||||
// }
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
tag: 'form',
|
||||
id: 'daggerheart-action',
|
||||
|
|
@ -67,8 +62,6 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
if(!!this.action.effects) context.effects = this.action.effects.map(e => this.action.item.effects.get(e._id));
|
||||
if(this.action.damage?.hasOwnProperty('includeBase')) context.hasBaseDamage = !!this.action.parent.damage;
|
||||
context.getRealIndex = this.getRealIndex.bind(this);
|
||||
|
||||
console.log(context, this.action)
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
@ -101,15 +94,6 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
this.render();
|
||||
}
|
||||
|
||||
/* cleanData(data) {
|
||||
for(let k in data) {
|
||||
if(typeof data[k] === 'object' && !Array.isArray(data[k])) {
|
||||
if(!isNaN(Object.keys(data[k])[0])) data[k] = Object.values(data[k]);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
} */
|
||||
|
||||
static addElement(event) {
|
||||
const data = this.action.toObject(),
|
||||
key = $(event.target).closest('.action-category-data').data('key');
|
||||
|
|
@ -143,7 +127,6 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
|
||||
static async addEffect(event) {
|
||||
if ( !this.action.effects ) return;
|
||||
// console.log(this, this.action.item)
|
||||
const effectData = this._addEffectData.bind(this)(),
|
||||
[created] = await this.action.item.createEmbeddedDocuments("ActiveEffect", [effectData], { render: false }),
|
||||
data = this.action.toObject();
|
||||
|
|
|
|||
|
|
@ -99,11 +99,9 @@ export default class WeaponSheet extends DaggerheartSheet(ItemSheetV2) {
|
|||
}
|
||||
|
||||
static async addAction() {
|
||||
// const actionType = await WeaponSheet.selectActionType();
|
||||
const actionType = await WeaponSheet.selectActionType(),
|
||||
actionIndexes = this.document.system.actions.map(x => x._id.split('-')[2]).sort((a, b) => a - b)
|
||||
try {
|
||||
// const cls = DHAction,
|
||||
const cls = actionsTypes[actionType?.type] ?? actionsTypes.attack,
|
||||
action = new cls(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue