[Fix] Itemlink Redux Revengeance (#399)

* Small random fixes

* Added use of ItemLinkFields

* Multiclass levelup fixes

* Fixed our onCreate methods unintentionally being run on all clients

* Remade apps handling

* Added for all class items and subclass

* Restored foreignDocumentUuidField

* Improved

* PR fxies

* Fixed tooltip enrichment

* .

* Reverted silly change
This commit is contained in:
WBHarry 2025-07-26 00:37:30 +02:00 committed by GitHub
parent fcba5041e9
commit 2a4777f1a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 648 additions and 489 deletions

View file

@ -37,7 +37,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
this.extraSchemas.forEach(s => {
let clsField;
if(clsField = this.getActionField(s)) schemaFields[s] = new clsField();
if ((clsField = this.getActionField(s))) schemaFields[s] = new clsField();
});
return schemaFields;
@ -117,14 +117,14 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
async use(event, ...args) {
if (!this.actor) throw new Error("An Action can't be used outside of an Actor context.");
if(this.chatDisplay) this.toChat();
if (this.chatDisplay) this.toChat();
let config = this.prepareConfig(event);
for(let i = 0; i < this.constructor.extraSchemas.length; i++) {
for (let i = 0; i < this.constructor.extraSchemas.length; i++) {
let clsField = this.constructor.getActionField(this.constructor.extraSchemas[i]);
if(clsField?.prepareConfig) {
if (clsField?.prepareConfig) {
const keep = clsField.prepareConfig.call(this, config);
if(config.isFastForward && !keep) return;
if (config.isFastForward && !keep) return;
}
}

View file

@ -4,7 +4,7 @@ export default class DHEffectAction extends DHBaseAction {
static extraSchemas = [...super.extraSchemas, 'effects', 'target'];
async trigger(event, data) {
if(this.effects.length) {
if (this.effects.length) {
const cls = getDocumentClass('ChatMessage'),
msg = {
type: 'applyEffect',