[Feature] Sortable inventories and adversary/environment drag/drop (#1357)

* Add ability to sort inventories in player and party sheets

* Format base actor sheet

* Check item validity when creating on an actor

* Block dragdrop on adversaries and environments

* Support drag and drop in adversary and environment sheets

* Fix regression with dropping to character sheet

* Move vault when created handling to domain card preCreate
This commit is contained in:
Carlos Fernandez 2025-12-06 06:05:10 -08:00 committed by GitHub
parent 2171c1b433
commit b57e98071f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 151 additions and 195 deletions

View file

@ -322,10 +322,10 @@ export default function DHApplicationMixin(Base) {
_onDrop(event) {
event.stopPropagation();
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
if (data.fromInternal === this.document.uuid) return;
if (data.type === 'ActiveEffect') {
if (data.type === 'ActiveEffect' && data.fromInternal !== this.document.uuid) {
this.document.createEmbeddedDocuments('ActiveEffect', [data.data]);
} else {
return super._onDrop(event);
}
}