mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 13:11: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.action = action;
|
||||||
this.openSection = null;
|
this.openSection = null;
|
||||||
// console.log(this.action)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get title(){
|
|
||||||
// return `Action - ${this.action.name}`;
|
|
||||||
// }
|
|
||||||
|
|
||||||
static DEFAULT_OPTIONS = {
|
static DEFAULT_OPTIONS = {
|
||||||
tag: 'form',
|
tag: 'form',
|
||||||
id: 'daggerheart-action',
|
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.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;
|
if(this.action.damage?.hasOwnProperty('includeBase')) context.hasBaseDamage = !!this.action.parent.damage;
|
||||||
context.getRealIndex = this.getRealIndex.bind(this);
|
context.getRealIndex = this.getRealIndex.bind(this);
|
||||||
|
|
||||||
console.log(context, this.action)
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,15 +94,6 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
||||||
this.render();
|
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) {
|
static addElement(event) {
|
||||||
const data = this.action.toObject(),
|
const data = this.action.toObject(),
|
||||||
key = $(event.target).closest('.action-category-data').data('key');
|
key = $(event.target).closest('.action-category-data').data('key');
|
||||||
|
|
@ -143,7 +127,6 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
||||||
|
|
||||||
static async addEffect(event) {
|
static async addEffect(event) {
|
||||||
if ( !this.action.effects ) return;
|
if ( !this.action.effects ) return;
|
||||||
// console.log(this, this.action.item)
|
|
||||||
const effectData = this._addEffectData.bind(this)(),
|
const effectData = this._addEffectData.bind(this)(),
|
||||||
[created] = await this.action.item.createEmbeddedDocuments("ActiveEffect", [effectData], { render: false }),
|
[created] = await this.action.item.createEmbeddedDocuments("ActiveEffect", [effectData], { render: false }),
|
||||||
data = this.action.toObject();
|
data = this.action.toObject();
|
||||||
|
|
|
||||||
|
|
@ -99,11 +99,9 @@ export default class WeaponSheet extends DaggerheartSheet(ItemSheetV2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async addAction() {
|
static async addAction() {
|
||||||
// const actionType = await WeaponSheet.selectActionType();
|
|
||||||
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)
|
actionIndexes = this.document.system.actions.map(x => x._id.split('-')[2]).sort((a, b) => a - b)
|
||||||
try {
|
try {
|
||||||
// const cls = DHAction,
|
|
||||||
const cls = actionsTypes[actionType?.type] ?? actionsTypes.attack,
|
const cls = actionsTypes[actionType?.type] ?? actionsTypes.attack,
|
||||||
action = new cls(
|
action = new cls(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ const fields = foundry.data.fields;
|
||||||
- Add Drag & Drop for documentUUID field (Macro & Summon)
|
- Add Drag & Drop for documentUUID field (Macro & Summon)
|
||||||
- Add optionnal Role for Healing ?
|
- Add optionnal Role for Healing ?
|
||||||
- Handle Roll result as part of formula if needed
|
- Handle Roll result as part of formula if needed
|
||||||
|
- Target Check
|
||||||
|
- Cost Check
|
||||||
|
- Range Check
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export class DHBaseAction extends foundry.abstract.DataModel {
|
export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,7 @@ import { actionsTypes } from "../action/_module.mjs";
|
||||||
|
|
||||||
// Temporary Solution
|
// Temporary Solution
|
||||||
export default class ActionField extends foundry.data.fields.ObjectField {
|
export default class ActionField extends foundry.data.fields.ObjectField {
|
||||||
/** @override */
|
|
||||||
// initialize(value, model, options={}) {
|
|
||||||
// console.log('initialize', value.type)
|
|
||||||
// this.model = actionsTypes[value?.type] ?? actionsTypes.attack;
|
|
||||||
// this.fields = this._initialize(this.model.defineSchema());
|
|
||||||
// return super.initialize(value, model, options)
|
|
||||||
// }
|
|
||||||
getModel(value) {
|
getModel(value) {
|
||||||
return actionsTypes[value.type] ?? actionsTypes.attack;
|
return actionsTypes[value.type] ?? actionsTypes.attack;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,6 @@ export default class DhpActor extends Actor {
|
||||||
),
|
),
|
||||||
rolls: [roll]
|
rolls: [roll]
|
||||||
});
|
});
|
||||||
console.log(systemData)
|
|
||||||
|
|
||||||
await cls.create(msg.toObject());
|
await cls.create(msg.toObject());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ export default class DhpItem extends Item {
|
||||||
prepareEmbeddedDocuments() {
|
prepareEmbeddedDocuments() {
|
||||||
super.prepareEmbeddedDocuments();
|
super.prepareEmbeddedDocuments();
|
||||||
for ( const action of this.system.actions ?? [] ) action.prepareData();
|
for ( const action of this.system.actions ?? [] ) action.prepareData();
|
||||||
// for ( const action of this.system.actions ?? [] ) console.log(action);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue