mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
[Fix] origin change values and prioritize item options (#1835)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
* Fix origin key replacement and prioritize item options * Rename key to value * Some fixes * Attempt to always retrieve the source item for same actor origin * Fix getters in item roll data * Performance improvement * Allow apply to item system data * Replace implementation with shallow proxy * Add delete to the shallow proxy * Add proxy trap for the in operator --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
c82bcbeb01
commit
6d09c5504d
6 changed files with 70 additions and 37 deletions
|
|
@ -7,7 +7,12 @@
|
|||
* @property {boolean} isInventoryItem- Indicates whether items of this type is a Inventory Item
|
||||
*/
|
||||
|
||||
import { addLinkedItemsDiff, getScrollTextData, updateLinkedItemApps } from '../../helpers/utils.mjs';
|
||||
import {
|
||||
addLinkedItemsDiff,
|
||||
getScrollTextData,
|
||||
createShallowProxy,
|
||||
updateLinkedItemApps
|
||||
} from '../../helpers/utils.mjs';
|
||||
import { ActionsField } from '../fields/actionField.mjs';
|
||||
import FormulaField from '../fields/formulaField.mjs';
|
||||
|
||||
|
|
@ -159,8 +164,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
* @returns {object}
|
||||
*/
|
||||
getRollData(options = {}) {
|
||||
const actorRollData = this.actor?.getRollData() ?? {};
|
||||
const data = { ...actorRollData, item: { ...this } };
|
||||
const data = this.actor?.getRollData() ?? {};
|
||||
data.item = createShallowProxy(this);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue