159 - Companion (#224)

* Initial datamodel

* Fixed attack

* Temp

* Fixed normal levelup

* Fixed showing summary of new experiences

* Touchups

* level sync fixes

* Reworked Action storage

* Companions now take stress when damaged

* Fixed Feature flow

* Removed retroactive companion levelup

* Restored delevel on partner removal

* PR fixes

* Added a check for card duplicates on character
This commit is contained in:
WBHarry 2025-07-01 17:19:41 +02:00 committed by GitHub
parent 6f1529fefe
commit b7e4169079
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 1682 additions and 1012 deletions

View file

@ -1,4 +1,4 @@
export default class DhContextMenu extends ContextMenu {
export default class DhContextMenu extends foundry.applications.ux.ContextMenu.implementation {
constructor(container, selector, menuItems, options) {
super(container, selector, menuItems, options);
@ -26,10 +26,16 @@ export default class DhContextMenu extends ContextMenu {
event.preventDefault();
event.stopPropagation();
const { clientX, clientY } = event;
const selector = "[data-item-id]";
const selector = '[data-item-id]';
const target = event.target.closest(selector) ?? event.currentTarget.closest(selector);
target?.dispatchEvent(new PointerEvent("contextmenu", {
view: window, bubbles: true, cancelable: true, clientX, clientY
}));
target?.dispatchEvent(
new PointerEvent('contextmenu', {
view: window,
bubbles: true,
cancelable: true,
clientX,
clientY
})
);
}
}