mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
[Feature] Transform Linked Actors (#2046)
* Added ability to transform linked actors * Updated to use the utils getWorldActor function * Animate change and fix error when converting to unlinked --------- Co-authored-by: Carlos Fernandez <cfern1990@gmail.com>
This commit is contained in:
parent
44dd3bd2e1
commit
98fedf3990
9 changed files with 101 additions and 32 deletions
|
|
@ -114,7 +114,10 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
return this._id;
|
||||
}
|
||||
|
||||
/** Returns true if the current user is the owner of the containing item */
|
||||
/**
|
||||
* Returns true if the current user is the owner of the containing item.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get isOwner() {
|
||||
return this.item?.isOwner ?? true;
|
||||
}
|
||||
|
|
@ -143,6 +146,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
|
||||
/**
|
||||
* Return the first Actor parent found.
|
||||
* @returns {DhpActor | null}
|
||||
*/
|
||||
get actor() {
|
||||
return this.item instanceof DhpActor
|
||||
|
|
@ -155,6 +159,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
/**
|
||||
* Returns true if the action is usable.
|
||||
* An action is usable on any actor type. For example, an adversary might have a base attack action.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get usable() {
|
||||
const actor = this.actor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue